Exemple #1
0
"""happycoding URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include
from django_fsu import url
from django.contrib import admin

from problem import views

urlpatterns = [
    url('', views.index, name='index'),
    url('about', views.about, name='about'),
    url('history', views.history, name='history'),
    url('accounts/', include('accounts.urls', namespace='accounts')),
    url('problem/', include('problem.urls', namespace='problem')),
    # url(r'^admin/', include(admin.site.urls)),
]
Exemple #2
0
from django_fsu import url
from . import views

urlpatterns = [
    url('<int:oj_id>', views.problem, name='problem'),
    url('<int:oj_id>/share', views.problem_share, name='share'),
    url('upvote/<int:pk>', views.code_upvote, name='code-upvote'),
    url('<int:oj_id>/share_hint', views.hint_share, name='share-hint'),
    url('hint-upvote/<int:pk>', views.hint_upvote, name='hint-upvote')
]
Exemple #3
0
from django_fsu import url
from . import views


urlpatterns = [
    url('login/', views.login, name='login'),
    url('logout/', views.logout, name='logout'),
    url('profile/<int:pk>', views.profile, name='profile'),
]
Exemple #4
0
from django_fsu import url
from . import views

urlpatterns = [
    url('login/', views.login, name='login'),
    url('logout/', views.logout, name='logout'),
    url('profile/<int:pk>', views.profile, name='profile'),
]