Exemple #1
0
from django.conf.urls import patterns, url
from core.views import ProfileRedirectView, ProfileView, users, notifications
from core.forms import CustomPasswordChangeForm

urlpatterns = patterns(
    '', url(r'^$', ProfileRedirectView.as_view(), name='base'),
    url(r'^(?P<pk>\d+)/$', ProfileView.as_view(), name='user-profile'),
    url(r'^edit/$', users.edit, name='edit'),
    url(r'^change_password/$',
        'django.contrib.auth.views.password_change', {
            'template_name': 'registration/change_password.html',
            'password_change_form': CustomPasswordChangeForm,
            'current_app': 'core:profile',
            'post_change_redirect': 'core:profile:base'
        },
        name='password_change'),
    url(r'^notifications/(?P<notification_id>\d+)/$',
        notifications.base,
        name='notifications'))
Exemple #2
0
from django.urls import path

from core.views import LoginView, LogoutView, OverviewView, ProfileView

app_name = 'core'
urlpatterns = [
    path('', OverviewView.as_view(), name="overview"),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('login/', LoginView.as_view(), name='login'),
    path('profile/', ProfileView.as_view(), name='profile')
]
Exemple #3
0
from django.urls import path, re_path, include
from django.contrib.auth import views as auth_views
from django.conf.urls.static import static
from django.conf import settings

from . import views
from core.views import ProfileView, ChargeView, MyPicoLog
from core.views import follow, FollowersView, FollowingView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('accounts/', include('django.contrib.auth.urls')),
    path('accounts/register/', views.register, name='register'),
    re_path(
        r'^accounts/register/activate/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
        views.activate,
        name='activate'),
    path('', views.HomeView.as_view(), name='home'),
    path('explore/', include('photo.urls')),
    path('charge/', ChargeView.as_view(), name='charge'),
    path('search/', views.post_search, name='search'),
    path('log/user/<str:username>', MyPicoLog.as_view(), name='mypicolog'),
    # path('log/photo/<int:pk>', name='photopicolog'),
    path('<str:username>/', ProfileView.as_view(), name='profile'),
    path('<str:username>/follow/', follow, name='follow'),
    path('<str:username>/followers', FollowersView.as_view(),
         name='followers'),
    path('<str:username>/following', FollowingView.as_view(),
         name='following'),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.urls import path
from core.views import SignUpView, ProfileView, image_upload_view
from . import views
urlpatterns = [
    path('signup/', SignUpView.as_view(), name='signup'),
    path('profile/<int:pk>/', ProfileView.as_view(), name='profile'),
    path('upload/', views.image_upload_view)
]
from core.views import ProfileView, HomeView, ManagerView, CompanyView, Signup2, NormalView
from django.urls import path
from django.conf import settings
from . import views
from django.conf.urls.static import static

urlpatterns = [
                  path('', HomeView.as_view(), name='home'),
                  path('normal/', NormalView.as_view(), name='normal'),
                  path('company/', CompanyView.as_view(), name='company'),
                  path('signup2/', Signup2.as_view(), name='signup2'),
                  path('profile/', ProfileView.as_view(), name="profile"),
                  path('member/', ManagerView.as_view(), name="manager"),
                  path('member/<str:email>/', views.ManagerMemberView, name="member"),
              ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemple #6
0
from core.views import ProfileView, robots

autocomplete_light.autodiscover()
admin.autodiscover()

v1_api = Api()
v1_api.register(AreaResource())
v1_api.register(LocationResource())

urlpatterns = patterns(
    '',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^autocomplete/', include('autocomplete_light.urls')),
    url(r'^$', details, {'slug': ''}, name='pages-root'),
    url(r'^feedback/$', 'core.views.feedback', name='feedback'),
    url(r'^mobile/', include('mobile.urls')),
    url(r'^accounts/profile/$', ProfileView.as_view(), name='account_profile'),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^api/', include(v1_api.urls)),
    url(r'^robots\.txt$', robots, name='robots.txt'),
    url(r'', include('world.urls')),
)

if settings.DEBUG:
    urlpatterns += patterns(
        '',
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
            'document_root': settings.MEDIA_ROOT,
        }),
    )
Exemple #7
0
urlpatterns = patterns('',
                       url(_(r'^register/$'), UserRegistrationView.as_view(), name="register"),
                       url(_(r'^register/email/$'), 'core.views.new_user_email_view', name="register_user_email"),


                       url(_(
                           r'^email/confirm/(?P<slug>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/$'),
                           UserEmailConfirm.as_view(), name='email_confirmation_view'),
                       url(_(r'^email/$'), ChangeEmailView.as_view(), name='email_change_view'),
                       url(_(r'^email/resend/$'), ResendEmailView.as_view(), name='email_resend_view'),
                       url(_(r'^password_change/$'), ChangePasswordView.as_view(), name='password_change'),
                       url(_(r'^login/$'), 'core.views.login', name='login',
                           kwargs={'authentication_form': AuthenticationFormCustom}),
                       url(_(r'^logout/$'), 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'),
                       url(_(r'^profile/$'), ProfileView.as_view(), name='profile'),

                       url(_(r'^password_reset/$'), 'django.contrib.auth.views.password_reset', name='password_reset',
                           kwargs={'post_reset_redirect': reverse_lazy('accounts:password_reset_done'),
                                   'template_name': 'registration/password_reset_form_velo.html',
                                   'password_reset_form': PasswordResetForm}),
                       url(_(r'^password_reset/done/$'), 'django.contrib.auth.views.password_reset_done',
                           name='password_reset_done',
                           kwargs={'template_name': 'registration/password_reset_done_velo.html'}),
                       url(_(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$'),
                           'django.contrib.auth.views.password_reset_confirm',
                           name='password_reset_confirm', kwargs={
                               'post_reset_redirect': reverse_lazy('accounts:password_reset_complete'),
                               'template_name': 'registration/password_reset_confirm_velo.html',
                               'set_password_form': SetPasswordFormCustom,
                           }),
Exemple #8
0
from django.urls import path
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView

from core.views import RegistrationView, ProfileView, ChangePasswordView, EmailConfirmView

urlpatterns = [
    path("auth/registration/", RegistrationView.as_view(),
         name="registration"),
    path("profile/", ProfileView.as_view(), name="profile"),
    path("token/", TokenObtainPairView.as_view(), name="token-obtain-pair"),
    path("token/refresh/", TokenRefreshView.as_view(), name="token-refresh"),
    path("change-password/",
         ChangePasswordView.as_view(),
         name="change-password"),
    path("email/confirm/", EmailConfirmView.as_view(), name="email-confirm"),
]
Exemple #9
0
from django.conf.urls import url

from core import views
from core.views import AuthView, ProfileView, TestListView, TestView, LogoutView, TestResultsView, StudentListView, \
    TestResultsAllView, TestEditView, ArticleListView, \
    ArticleDetailView, ArticleCreateView, ArticleEditView, ArticleDeleteView, TestCreatePlainView, AnswerListView, \
    test_search, student_search, create_test, test_search_all

urlpatterns = [
    url(r'^$', ProfileView.as_view(), name='main'),
    url(r'^auth/$', AuthView.as_view(), name='auth'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    url(r'^test/(?P<pk>\d+)$', TestView.as_view(), name='test'),
    url(r'^test/all$', TestListView.as_view(), name='test_list'),


    url(r'^test/search/$', test_search_all, name='test_search_all'),
    url(r'^test/search/result/$', test_search, name='test_search'),
    url(r'^test/edit/(?P<pk>\d+)$', TestEditView.as_view(), name='test_edit'),
    url(r'^test/create/', TestCreatePlainView.as_view(), name='test_create'),

    url(r'^scores/all/$', TestResultsAllView.as_view(), name='scores_all'),
    url(r'^scores/(?P<student_id>\d+)/$', TestResultsView.as_view(), name='scores'),

    url(r'^report/$', views.print_xlsx, name='print_xlsx'),

    url(r'^student/all/$', StudentListView.as_view(), name='students_all'),
    url(r'^student/search/$', student_search, name='student_search'),

    url(r'^article/(?P<pk>\d+)/$', ArticleDetailView.as_view(), name='article_detail'),
    url(r'^article/create/$', ArticleCreateView.as_view(), name='article_create'),
Exemple #10
0
         login_required(views.DeletePostView.as_view()),
         name='delete_post'),
    path('post/<int:post_id>/delete_success',
         TemplateView.as_view(template_name='core/delete_success.html'),
         name='delete-post-success'),
    path('post/create/', views.CreatePostView.as_view(), name='post_create'),
    path('feed/', views.FeedView.as_view(), name='feed'),
]

from django.contrib.auth.views import PasswordResetDoneView, PasswordResetView, PasswordResetConfirmView, \
    PasswordResetCompleteView

urlpatterns += [
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', logout_view, name='logout'),
    path('<int:user_id>/profile/', ProfileView.as_view(), name='profile'),
    path('<int:user_id>/profile/add_remove_friend',
         login_required(AddRemoveFriend.as_view()),
         name='add-remove-friend'),
    path('<int:user_id>/profile/edit',
         login_required(EditProfileView.as_view()),
         name='edit-profile'),
    path('signup/', SignupView.as_view(), name='signup'),
    path('password_reset/',
         PasswordResetView.as_view(
             success_url=reverse_lazy('users:password_reset_done'),
             template_name='my_auth/password_reset.html'),
         name='password_reset'),
    path('password_reset/done',
         PasswordResetDoneView.as_view(
             template_name='my_auth/password_reset_done.html'),
Exemple #11
0
from django.urls import path
from core.views import (IndexView, SummaryView, LoginView, AuthenticationView,
                        ProfileView, SavedView, LookupView,
                        GeolocationAutocompleteView, DetailAutocompleteView)

urlpatterns = [
    path('', IndexView.as_view()),
    path('summary/', SummaryView.as_view()),
    path('login/', LoginView.as_view()),
    path('auth/', AuthenticationView.as_view()),
    path('profile/', ProfileView.as_view()),
    path('saved/', SavedView.as_view()),
    path('saved/<str:kind>/<int:pk>/', SavedView.as_view()),
    path('geolocation-autocomplete/', GeolocationAutocompleteView.as_view()),
    path('detail-autocomplete/', DetailAutocompleteView.as_view()),
    path('lookup/<str:kind>/', LookupView.as_view())
]
Exemple #12
0
from core.models import Message, ReportContent, ReportUser, ReportError, Photo,\
    Address
from django.views.generic.list import ListView
from places.forms import PhotoForm
from django.contrib.auth.models import User
from django.views.generic.base import TemplateView
urlpatterns = patterns('core',
    (r'^mailbox/list.html$', MessageListView.as_view( )  ),
    (r'^mailbox/send.html$', MessageCreateView.as_view()  ),
    (r'^mailbox/respond,(?P<id>\d+).html$', RespondView.as_view()  ),
    (r'^mailbox/message,(?P<id>\d+).html$', MessageView.as_view( template_name = "core/message.html" )  ),
    (r'^report/content,(?P<id>\d+).html$', ReportContentView.as_view( form_class = ReportContentForm, model = ReportContent, success_url = "/report/success.html" ) ),
    (r'^report/user,(?P<id>\d+).html$', ReportUserView.as_view( form_class = ReportUserForm, model = ReportUser, success_url = "/report/success.html" ) ),
    (r'^report/error.html$', AuthoredFormView.as_view( form_class = ReportErrorForm, model = ReportError, success_url = "/report/success.html" ) ),
    (r'^report/success.html$', TemplateView.as_view( template_name = "core/report_success.html" ) ),
    (r'^profile.html$', ProfileView.as_view() ),
    (r'^profile/edit/image$', UserFormView.as_view( form_class = PhotoForm, model = Photo, success_url = "/profile.html" ) ),
    (r'^profile/edit/address$', UserFormView.as_view( form_class = AddressForm, model = Address , success_url = "/profile.html" ) ),
    (r'^user,(?P<id>\d+).html$', PublicProfileView.as_view() ),
    (r'^obervers.html$', ListView.as_view( model = User, template_name = "core/users.html" ) ),
    (r'^observed/users.html$', ObservedUsersView.as_view() ),
    (r'^observing/users.html$', ObservingUsersView.as_view() ),
    (r'^observe/user,(?P<id>\d+)/$', ObserveUser.as_view() ),
    (r'^observe/content,(?P<id>\d+)/$', ObserveContent.as_view() ),
    (r'^history.html$', HistoryView.as_view() ),
    (r'^events.html$', EventsView.as_view() ),
    (r'^(?P<time>[0-9.]+),events.html$', EventsView.as_view( template_name = "core/cyclic_events.html" ) ),
    (r'^vote/(?P<id>\d+)$', VoteContentView.as_view() ),
    (r'^register.html$', RegistrationView.as_view() ),
    (r'^activate/(?P<id>\d+)/(?P<code>.*)/$', ActivationView.as_view() ),
    (r'^reactivate,(?P<id>\d+).html$', ReactivationView.as_view()),
Exemple #13
0
from django.conf.urls import url
from django.contrib.auth.views import logout

from core.views import IndexView, RegistrationView, LogoutView, LoginView, ProfileView

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^registration/', RegistrationView.as_view(), name='registration'),
    url(r'^logout/', LogoutView.as_view(), name='logout'),
    url(r'^login/', LoginView.as_view(), name='login'),
    url(r'^profile/(?P<pk>\d+)/', ProfileView.as_view(), name='profile'),

]
Exemple #14
0
autocomplete_light.autodiscover()
admin.autodiscover()

v1_api = Api()
v1_api.register(AreaResource())
v1_api.register(LocationResource())

urlpatterns = patterns(
    '',

    url(r'^admin/', include(admin.site.urls)),
    url(r'^autocomplete/', include('autocomplete_light.urls')),

    url(r'^$', details, {'slug': ''}, name='pages-root'),
    url(r'^feedback/$', 'core.views.feedback', name='feedback'),
    url(r'^mobile/', include('mobile.urls')),
    url(r'^accounts/profile/$', ProfileView.as_view(), name='account_profile'),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^api/', include(v1_api.urls)),
    url(r'^robots\.txt$', robots, name='robots.txt'),
    url(r'', include('world.urls')),
)

if settings.DEBUG:
    urlpatterns += patterns('',
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
            'document_root': settings.MEDIA_ROOT,
        }),
   )