Beispiel #1
0
from profiles.views import ProfileFollowToggle, ProfileViewToggleQuestion, ProfileViewToggleFeedback, ProfileAjaxUpdateView, RegisterView, activate_user_view
from topics.views import TopicFollowToggle, TopicViewToggle, TopicAjaxCreateView
from questions.views import QuestionFollowToggle, QuestionFollowToggleFeedback, QuestionAjaxCreateView, QuestionAjaxUpdateView, QuestionAjaxDeleteView
from feedback.views import AnswerAjaxCreateView, AnswerFollowToggle, ReplyAnswerFollowToggle, AnswerAjaxUpdateView, AnswerAjaxDeleteView, CommentAjaxCreateView, CommentFollowToggle, CommentAjaxUpdateView, CommentAjaxDeleteView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^activate/(?P<code>[a-z0-9].*)/$',
        activate_user_view,
        name='activate'),
    url(r'^profile-follow/$',
        ProfileFollowToggle.as_view(),
        name='followProfile'),
    url(r'^profile-view-question/$',
        ProfileViewToggleQuestion.as_view(),
        name='viewProfileQuestion'),
    url(r'^profile-view-feedback/$',
        ProfileViewToggleFeedback.as_view(),
        name='viewProfileFeedback'),
    url(r'^topic-follow/$', TopicFollowToggle.as_view(), name='followTopic'),
    url(r'^topic-view/$', TopicViewToggle.as_view(), name='viewTopic'),
    url(r'^topic-create/$', TopicAjaxCreateView.as_view(), name='topicCreate'),
    url(r'^question-follow/$',
        QuestionFollowToggle.as_view(),
        name='followQuestion'),
    url(r'^question-follow-feedback/$',
        QuestionFollowToggleFeedback.as_view(),
Beispiel #2
0
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from django.views.generic import TemplateView
from django.contrib.auth.views import LoginView, LogoutView

from menus.views import HomeView
from profiles.views import ProfileFollowToggle, RegisterView, activate_user_view

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^restaurants/', include('restaurants.urls',
                                  namespace='restaurants')),
    url(r'^u/', include('profiles.urls', namespace='profiles')),
    url(r'^profile-follow/$', ProfileFollowToggle.as_view(), name='follow'),
    url(r'^items/', include('menus.urls', namespace='menus')),
    url(r'^$', HomeView.as_view(), name='home'),
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^activate/(?P<code>[a-z0-9].*)/$',
        activate_user_view,
        name='activate'),
    url(r'^about/$',
        TemplateView.as_view(template_name='about.html'),
        name='about'),
    url(r'^contact/$',
        TemplateView.as_view(template_name='contact.html'),
        name='contact'),
]
Beispiel #3
0
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path,include
from django.views.generic import TemplateView
from django.contrib.auth.views import LoginView,LogoutView

from profiles.views import ProfileFollowToggle, RegisterView,activate_user_view
from menus.views import HomeView

urlpatterns = [
    path('restaurants/',include('restaurants.urls',namespace='restaurants')),
    path('items/',include('menus.urls',namespace='menus')),
    path('u/',include('profiles.urls',namespace='profiles')),
    path('profile-follow/',ProfileFollowToggle.as_view(),name='follow'),
    path('login/',LoginView.as_view(),name='login'),
    path('logout/',LogoutView.as_view(),name='logout'),
    path('register/',RegisterView.as_view(),name='register'),
    path('activate/<code>',activate_user_view,name="activate"),
    path('',HomeView.as_view(),name='home'),
    path('about/',TemplateView.as_view(template_name = "about.html"),name='about'),
    path('contact/',TemplateView.as_view(template_name = "contact.html"),name='contact'),
    path('admin/', admin.site.urls),
]
Beispiel #4
0
from django.conf.urls import url,include
from django.contrib import admin
from django.contrib.auth.views import LoginView, LogoutView
from restaurants.views import (home,about,contact,ContactView,ContactTemplateView,restaurant_listview,
RestaurantListView,RestaurantDetailView,restaurant_create_view,RestaurantCreateView,RestaurantDetailUpdateView)
from menus.views import ItemCreateView,HomeView
from profiles.views import ProfileFollowToggle, RegisterView, activate_user_view
urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', HomeView.as_view(),name='home'),
    url(r'^restaurants/(?P<slug>[\w-]+)/$', RestaurantDetailUpdateView.as_view(),name='restaurant-detail-update'),
    url(r'^restaurants_create/$',RestaurantCreateView.as_view(),name='restaurant-create'),
    url(r'^register/$',RegisterView.as_view(),name='register'),
    url(r'^activate/(?P<code>[a-z0-9].*)/$', activate_user_view, name='activate'),
    #url(r'^restaurants/(?P<slug>[\w-]+)/update/$',RestaurantUpdateView.as_view(),name='restaurant-update'),
    #url(r'^restaurants_create/$',restaurant_create_view),
    #url(r'^restaurants/(?P<rest_id>\w+)/$', RestaurantDetailView.as_view()),
    url(r'^items/',include('menus.urls',namespace='menus')),
    url(r'^u/',include('profiles.urls',namespace='profiles')),
    url(r'^restaurants/$', restaurant_listview,name='restaurants'),
    url(r'^login/', LoginView.as_view(),name='login'),
    url(r'^logout/', LogoutView.as_view(),name='logout'),
    url(r'^about/$', about,name='about'),
    url(r'^contact/$', ContactTemplateView.as_view(),name='contact'),
    #url(r'^items_create/$',ItemCreateView.as_view(),name='create'),
    url(r'^follow/', ProfileFollowToggle.as_view(),name='follow'),
    #url(r'^items_update/$',ItemUpdateView.as_view(),name='update'),
    #url(r'^restaurants/indian/$',IndianRestaurantListView.as_view()),
    #url(r'^restaurants/(?P<slug>\w+)/$',SearchRestaurantListView.as_view()),
]
Beispiel #5
0
#     # url(r'^$', home),
#     # url(r'^contact/', contact),
#     # url(r'^about/', about),
#     # url(r'^contact/(?P<id>\d+)', ContactView.as_view()),
#     # url(r'^$', HomeView.as_view()),
#     # url(r'^about/', AboutView.as_view()),
#     # url(r'^contact/(?P<id>\d+)', ContactView.as_view()),
# ]

urlpatterns = [
    url(r'^about/$',
        TemplateView.as_view(template_name='about.html'),
        name="about"),
    url(r'^contact/$',
        TemplateView.as_view(template_name='contact.html'),
        name="contact"),
    url(r'^login/$', auth_views.LoginView.as_view(), name='login'),
    url(r'^logout/$', auth_views.LogoutView.as_view(), name='logout'),
    url(r'^activate/(?P<code>[a-z0-9].*)$',
        activate_user_view,
        name='activate'),
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^restaurants/', include('restaurants.urls',
                                  namespace="restaurants")),
    url(r'^menus/', include('menus.urls', namespace="menus")),
    url(r'^profile-follow/', ProfileFollowToggle.as_view(), name="follow"),
    url(r'^profiles/', include('profiles.urls', namespace="profiles")),
    url(r'^admin/', admin.site.urls),
    url(r'^$', TemplateView.as_view(template_name='home.html'), name="home"),
]
Beispiel #6
0
from django.views.generic import TemplateView

from django.contrib.auth.views import LoginView, LogoutView

from menus.views import HomeView
from profiles.views import ProfileFollowToggle, RegisterView, activate_user_view

app_name = "trydjango1-11"

urlpatterns = [
    re_path(r'^admin/', admin.site.urls),
    re_path(r'^$', HomeView.as_view(), name='home'),
    re_path(r'^register/$', RegisterView.as_view(), name='register'),
    re_path(r'^activate/(?P<code>[a-z0-9].*)/$',
            activate_user_view,
            name='activate'),
    re_path(r'^login/$', LoginView.as_view(), name='login'),
    re_path(r'^logout/$', LogoutView.as_view(), name='logout'),
    re_path(r'^profile-follow/$', ProfileFollowToggle.as_view(),
            name='follow'),
    path('u/', include('profiles.urls', namespace='profiles')),
    path('items/', include('menus.urls', namespace='menus')),
    path('restaurants/', include('restaurants.urls', namespace='restaurants')),
    re_path(r'^about/$',
            TemplateView.as_view(template_name='about.html'),
            name='about'),
    re_path(r'^contact/$',
            TemplateView.as_view(template_name='contact.html'),
            name='contact')
]
Beispiel #7
0
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from django.contrib.auth.views import LoginView, LogoutView

from restaurants.views import ContactView, AboutView
from menu.views import HomeView
from profiles.views import ProfileFollowToggle, RegisterView, activate_user_view

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', HomeView.as_view(), name="home"),
    url(r'^Contact/$', ContactView.as_view(), name="contact"),
    url(r'^About/$', AboutView.as_view(), name="about"),
    url(r'^login/', LoginView.as_view(), name="login"),
    url(r'^logout/', LogoutView.as_view(), name="logout"),
    url(r'^register/', RegisterView.as_view(), name="register"),
    url(r'^activate/(?P<code>[a-z0-9].*)/$',
        activate_user_view,
        name="activate"),
    url(r'^follow/$', ProfileFollowToggle.as_view(), name="follow"),
    url(r'^restaurants/', include('restaurants.urls',
                                  namespace="restaurants")),
    url(r'^menu/', include('menu.urls', namespace="menu")),
    url(r'^u/', include('profiles.urls', namespace="profiles"))
    # url(r'^restaurants/(?P<rest_id>\w+)/$', RestaurantDetailView.as_view()),
]