from django.conf.urls import url, include from django.contrib import admin from views import QuestionList, QuestionDetail, CategoryList, OptionList, CategoryDetail from .category_quiz.category_quiz import CategoryQuiz, CheckAnswer from django.conf import settings urlpatterns = [ url(r'question/(?P<question_id>[0-9]+)/', QuestionDetail.as_view()), url(r'question/options/', OptionList.as_view()), url(r'^questions/', QuestionList.as_view()), url(r'^categories', CategoryList.as_view()), url(r'^category/(?P<category_id>[0-9]+)/$', CategoryDetail.as_view()), url(r'^checkanswer/(?P<question_id>[0-9]+)/$', CheckAnswer.as_view()), url(r'^quiz/category/(?P<category_id>[0-9]+)/$', CategoryQuiz.as_view()), ]
name='list'), url(r'^/(?P<pk>\d+)/?$', ThreadDetail.as_view(), name='view'), url(r'^/(?P<pk>\d+)/update/?$', ThreadUpdate.as_view(form_class=forms.NewsForm), name='update'), url(r'^/create/?$', ThreadCreate.as_view(form_class=forms.NewsForm), name='create'), url(r'^/(?P<thread_pk>\d+)/challenge/?$', thread_challenge_view, name='attach_challenge'), ) threadpatterns = patterns( '', url(r'^s?/?$', CategoryList.as_view(), name='list'), url(r'^/(?P<pk>\d+)/?$', ThreadDetail.as_view(), name='view'), url(r'^/(?P<pk>\d+)/update/?$', ThreadUpdate.as_view(), name='update'), url(r'^/(?P<pk>\d+)/delete/?$', ThreadDelete.as_view(), name='delete'), url(r'^/create/?$', ThreadCreate.as_view(), name='create'), url(r'^/(?P<thread_pk>\d+)/challenge/?$', thread_challenge_view, name='attach_challenge'), url(r'^/search/?$', ThreadList.as_view(), {'search': True}, name='search'), ) forumpatterns = patterns( '', url(r'^s?/?$', CategoryList.as_view(), name='list'), url(r'^/(?P<pk>\d+)/?$', CategoryDetail.as_view(), name='view'), url(r'^/(?P<pk>\d+)/?$', CategoryUpdate.as_view(), name='update'),
urlpatterns += patterns( 'django.contrib.auth.views', url(r'^login/$', 'login', {'template_name': 'home.html'}, name='mysite_login'), url(r'^logout/$', 'logout', {'next_page': '/'}, name='mysite_logout'), url(r'^registration/', RegistrationView.as_view(), name='registration'), ) category_urls = patterns( '', url(r'^Update$', EditCategory.as_view(), name='category_update'), url(r'^Delete$', DeleteCategory.as_view(), name='category_delete'), ) userpoint_urls = patterns( '', url(r'^Update$', EditUserPoint.as_view(), name='userpoint_update'), url(r'^Delete$', DeleteUserPoint.as_view(), name='userpoint_delete'), ) urlpatterns += patterns( '', url(r'^categories$', CategoryList.as_view(), name='category_list'), url(r'^category/new$', NewCategory.as_view(), name='category_insert'), url(r'^category/(?P<pk>[\w-]+)/', include(category_urls)), url(r'^userpoints$', UserPointList.as_view(), name='userpoint_list'), url(r'^userpoint/new$', NewUserPoint.as_view(), name='userpoint_insert'), url(r'^userpoint/(?P<pk>[\w-]+)/', include(userpoint_urls)), )
url(r"relation/feed", RelationFeed(), name="data-relation-feed"), url(r"^relation/(?P<slug>.+)", "relation", name="relation"), url(r"^relation/add/$", "add_relation", name="add_relation"), url(r"^relation/edit", "edit_relation", name="edit_relation"), url(r"^relation/remove", "remove_relation", name="remove_relation"), # Alterations: ## Class-Views url(r"^alterations/list/$", AlterationList.as_view(), name="list-alterations"), url(r"^alteration/(?P<pk>\d+)", DetailView.as_view(model=Alteration), name="detail-alteration"), ## Function-Views url(r"^alterations/$", "alterations", name="alterations"), url(r"^alteration/feed/$", AlterationFeed(), name="data-alteration-feed"), url(r"^alteration/(?P<slug>d+)", "alteration", name="alteration"), # Tags: ## Class-Views url(r"^tags/list/$", TagList.as_view(), name="list-entry-tags"), # Shows number of tagged entries. url(r"^tag/(?P<pk>\d+)", TagDetail.as_view(), name="entry-tag-detail"), # Shows list of tagged entries. url(r"^tag/(?P<slug>.+)", TagDetail.as_view(), name="entry-tag"), ## Function-Views url(r"^tags/$", "tags", name="entry-tags"), # url(r'^tag/(?P<slug>.+)', 'tag', name='entry-tag'), # Categories: url(r"^categories/list/$", CategoryList.as_view(), name="list-categories"), url(r"^category/detail/(?P<pk>\d+)", DetailView.as_view(model=Category), name="detail-category"), # url(r'^category/detail/(?P<slug>.+)', DetailView.as_view) url(r"^category/create", CategoryCreate.as_view(), name="create-category"), url(r"^category/update/(?P<pk>\d+)", login_required(CategoryUpdate.as_view()), name="update-category"), url(r"^category/feed/$", CategoryFeed(), name="data-category-feed"), url(r"graph/$", "graph", name="data-graph"), ) # 234567891123456789212345678931234567894123456789512345678961234567897123456789
## Function-Views url(r'^alterations/$', 'alterations', name='alterations'), url(r'^alteration/feed/$', AlterationFeed(), name='data-alteration-feed'), url(r'^alteration/(?P<slug>d+)', 'alteration', name='alteration'), # Tags: ## Class-Views url(r'^tags/list/$',TagList.as_view(), name='list-entry-tags'), # Shows number of tagged entries. url(r'^tag/(?P<pk>\d+)', TagDetail.as_view(), name='entry-tag-detail'), # Shows list of tagged entries. url(r'^tag/(?P<slug>.+)', TagDetail.as_view(), name='entry-tag'), ## Function-Views url(r'^tags/$', 'tags', name='entry-tags'), #url(r'^tag/(?P<slug>.+)', 'tag', name='entry-tag'), # Categories: url(r'^categories/list/$', CategoryList.as_view(), name='list-categories'), url(r'^category/detail/(?P<pk>\d+)', DetailView.as_view(model=Category), name='detail-category'), #url(r'^category/detail/(?P<slug>.+)', DetailView.as_view) url(r'^category/create', CategoryCreate.as_view(), name='create-category'), url(r'^category/update/(?P<pk>\d+)', login_required(CategoryUpdate.as_view()), name='update-category'), url(r'^category/feed/$', CategoryFeed(), name='data-category-feed'), url(r'^graph/$', login_required('graph'), name='data-graph'), url(r'map/$', 'hierarchy', {'template': 'data/map.html'}, name='data-map'), url(r'vivagraph/(?P<slug>[a-zA-Z\_]+)', VivaGraph.as_view(), name='data-vivagraph'), url(r'vivagraph/(?P<pk>\d?)', VivaGraph.as_view(), name='data-vivagraph'), url(r'viva/(?P<pk>\d?)', 'vivagraph', name='vivagraph'), # url(r'dictionary/$', DictionaryView.as_view(), name='dictionary') url(r'rendering/$', 'rendering', name='rendering'),
# Create a basket: /mybaskets/baskets/create/ url(r'^baskets/create/$', BasketCreate.as_view(), name='basket_create'), # Edit basket details, ex: /mybaskets/baskets/edit/1 url(r'^baskets/edit/(?P<pk>\d+)/$', UpdateView.as_view( model=Basket, form_class=BasketForm, template_name='mybaskets/form.html'), name='basket_edit'), # Delete basket, ex: /mybaskets/baskets/delete/1 url(r'^baskets/delete/(?P<pk>\d+)/$', BasketDelete.as_view(), name='delete_basket'), # List all subcategories: mybaskets/subcategory/ url(r'^subcategories/$', SubcategoryList.as_view(), name='subcategories'), # Subcategories details, ex: /mybaskets/subcategories/1 url(r'^subcategories/(?P<pk>\d+)/$', SubcategoryDetail.as_view(), name='subcategory_detail'), # List all Categories: mybaskets/categories/ url(r'^categories/$', CategoryList.as_view(), name='categories'), # Category details, ex: /mybaskets/categories/1 url(r'^categories/(?P<pk>\d+)/$', CategoryDetail.as_view(), name='category_detail'), # List all Products: mybaskets/products/ url(r'^products/$', ProductList.as_view(), name='products'), # Product details, ex: /mybaskets/products/1 url(r'^products/(?P<pk>\d+)/$', ProductDetail.as_view(), name='product_detail'), # Customer details, ex: /mybaskets/user/1/customer/ url(r'^user/(?P<pk>\d+)/customer/$', CustomerDetail.as_view(), name='customer_detail'), # Create a Customer: /mybaskets/user/1/customer/create/ url(r'^user/(?P<pk>\d+)/customer/create/$', CustomerCreate.as_view(), name='customer_create'), # Edit Customer details, ex: /mybaskets/user/1/customer/edit/1 url(r'^user/(?P<pk>\d+)/customer/edit/(?P<id>\d+)/$', UpdateView.as_view( model=Customer, form_class=CustomerForm, template_name='mybaskets/form.html'),
from django.conf.urls import url from views import ShoppingList, CategoryDetail, CategoryList urlpatterns = [ url(r'^shopping/$', ShoppingList.as_view(), name="Shopping_list"), url(r'^$', CategoryList.as_view(), name="category_list"), url(r'^(?P<slug>[-\w]+)/', CategoryDetail.as_view(), name="category_detail"), ]
url(r'^alteration/feed/$', AlterationFeed(), name='data-alteration-feed'), url(r'^alteration/(?P<slug>d+)', 'alteration', name='alteration'), # Tags: ## Class-Views url(r'^tags/list/$', TagList.as_view(), name='list-entry-tags'), # Shows number of tagged entries. url(r'^tag/(?P<pk>\d+)', TagDetail.as_view(), name='entry-tag-detail'), # Shows list of tagged entries. url(r'^tag/(?P<slug>.+)', TagDetail.as_view(), name='entry-tag'), ## Function-Views url(r'^tags/$', 'tags', name='entry-tags'), #url(r'^tag/(?P<slug>.+)', 'tag', name='entry-tag'), # Categories: url(r'^categories/list/$', CategoryList.as_view(), name='list-categories'), url(r'^category/detail/(?P<pk>\d+)', DetailView.as_view(model=Category), name='detail-category'), #url(r'^category/detail/(?P<slug>.+)', DetailView.as_view) url(r'^category/create', CategoryCreate.as_view(), name='create-category'), url(r'^category/update/(?P<pk>\d+)', login_required(CategoryUpdate.as_view()), name='update-category'), url(r'^category/feed/$', CategoryFeed(), name='data-category-feed'), url(r'^graph/$', login_required('graph'), name='data-graph'), url(r'map/$', 'hierarchy', {'template': 'data/map.html'}, name='data-map'), url(r'vivagraph/(?P<slug>[a-zA-Z\_]+)', VivaGraph.as_view(), name='data-vivagraph'), url(r'vivagraph/(?P<pk>\d?)', VivaGraph.as_view(), name='data-vivagraph'),
) urlpatterns += patterns('django.contrib.auth.views', url(r'^login/$', 'login', {'template_name': 'home.html'}, name='mysite_login'), url(r'^logout/$', 'logout', {'next_page': '/'}, name='mysite_logout'), url(r'^registration/', RegistrationView.as_view(), name='registration'), ) category_urls = patterns('', url(r'^Update$', EditCategory.as_view(), name='category_update'), url(r'^Delete$', DeleteCategory.as_view(), name='category_delete'), ) userpoint_urls = patterns('', url(r'^Update$', EditUserPoint.as_view(), name='userpoint_update'), url(r'^Delete$', DeleteUserPoint.as_view(), name='userpoint_delete'), ) urlpatterns += patterns('', url(r'^categories$', CategoryList.as_view(), name='category_list'), url(r'^category/new$', NewCategory.as_view(), name='category_insert'), url(r'^category/(?P<pk>[\w-]+)/', include(category_urls)), url(r'^userpoints$', UserPointList.as_view(), name='userpoint_list'), url(r'^userpoint/new$', NewUserPoint.as_view(), name='userpoint_insert'), url(r'^userpoint/(?P<pk>[\w-]+)/', include(userpoint_urls)), )