예제 #1
0
from django.conf.urls import patterns, url
from contacts.views import ContactView, CreateContactView

urlpatterns = patterns(
    '',
    url(r'new$', CreateContactView.as_view(), name='create-contact'),
    url(r'$', ContactView.as_view(), name='contacts'),
)
예제 #2
0
from django.conf.urls import patterns, url
from contacts.views import ContactView, CreateContactView

urlpatterns = patterns('',
        url(r'new$', CreateContactView.as_view(), name='create-contact'),
        url(r'$', ContactView.as_view(), name='contacts'),
        )

예제 #3
0
파일: urls.py 프로젝트: Rysbai/digiskills
from django.urls import path
from rest_framework.urlpatterns import format_suffix_patterns

from contacts.views import ContactView

app_name = 'contact'
urlpatterns = [
    path('', ContactView.as_view(), name='contact_list'),
]

urlpatterns = format_suffix_patterns(urlpatterns)
예제 #4
0
from django.urls import path
from contacts.views import ContactView

urlpatterns = [path("", ContactView.as_view(), name="contacts")]
예제 #5
0
from django.contrib import admin
from django.urls import include, path

from django.conf import settings
from django.conf.urls.static import static

from rest_framework.routers import DefaultRouter

from edus_app.views import Index, AccountLoginView, AccountLogoutView
from contacts.views import ContactView
from courses.views import CourseAPIListView

from graphene_django.views import GraphQLView
from .schema import schema

router = DefaultRouter()
router.register('course', CourseAPIListView)

urlpatterns = [
    path('', Index.as_view(), name='index'),
    path('api/', include(router.urls)),
    path('admin/', admin.site.urls),
    path('login/', AccountLoginView.as_view(), name='login'),
    path('logout/', AccountLogoutView.as_view(), name='logout'),
    path('courses/', include('courses.urls')),
    path('teachers/', include('members.urls', namespace='teachers')),
    path('contact/', ContactView.as_view(), name='contact'),
    path("graphql/", GraphQLView.as_view(graphiql=True, schema=schema)),
    #path('students/', include('members.urls', namespace='students')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
예제 #6
0
    url(r'^redactor/', include('redactor.urls')),

    # Homepage
    # url(r'^$', TemplateView.as_view(template_name='index.html'), name="home"),
    # or
    # url("^$", "mezzanine.pages.views.page", {"slug": "/"}, name="home"),


    # HW 2: TWO POSSIBILITIES BELOW:

    # Create new view to list out all contacts
    # url(r'^$', TemplateView.as_view(template_name='contacts.html'), name="contacts"),

    # OR
    url(r'^$', ContactView.as_view(), name='home'),

    # UNCOMMENT TO TEST ADD CONTACT
    # url(r'^$', AddContactView.as_view(), name='home'),

    # ??? Create new contact view. Does the "name=" have to match anything?
    url(r'^addcontact/', AddContactView.as_view(), name='addcontact'),

    # Make sure mezzanine is below my urls, otherwise my custom routes won't work
    ("^", include("mezzanine.urls")),

)

#used to show static assets out of the collected-static
if getattr(settings, 'SERVE_STATIC', False) and settings.SERVE_STATIC:
    urlpatterns += patterns(
예제 #7
0
from django.urls import path
from contacts.views import ContactView

app_name = "contacts"

urlpatterns = [
    path('inquiries/', ContactView.as_view(), name='inquiries'),
]
예제 #8
0
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

from contacts.views import ListContactView, CreateContactView
from contacts.views import UpdateContactView , ContactView, DeleteContactView,ListDeleteView
from contacts.views import hello_world
urlpatterns = patterns('',
    url(r'^$', ListContactView.as_view(),
        name='contacts-list',),

    url(r'^new/gulsah$', hello_world,name='hwllow',),
    

    url(r'^new$', CreateContactView.as_view(),
        name='contacts-new',),

 
    url(r'^edit/(?P<pk>\d+)/$', UpdateContactView.as_view(),
        name='contacts-edit',),

    url(r'^delete$', ListDeleteView.as_view(),
        name='delete-list',),
    url(r'^delete/(?P<pk>\d+)/$', DeleteContactView.as_view(),
        name='contacts-delete',),
        
    url(r'^(?P<pk>\d+)/$', ContactView.as_view(),
        name='contacts-view',),
)

urlpatterns += staticfiles_urlpatterns()