Esempio n. 1
0
    HomeView,
    AboutView,
    ContactView,
    ResourceListByCategoryView,
    ResourceListAddedByUserView,
    ResourceCreateView,
    ResourceUpdateView,
    ResourceDeleteView,
)

urlpatterns = [
    path('', HomeView.as_view(), name='home_view'),
    path('category/<str:category_slug>/',
         ResourceListByCategoryView.as_view(),
         name='resource_list_view'),
    path('about/', AboutView.as_view(), name='about_view'),
    path('contact/', ContactView.as_view(), name='contact_view'),

    # URls for only authenticated users
    path('resource/list/',
         login_required(ResourceListAddedByUserView.as_view()),
         name='resource_list_by_me_view'),
    path('resource/create/',
         login_required(ResourceCreateView.as_view()),
         name='resource_create_view'),
    path('resource/update/<int:pk>/',
         login_required(ResourceUpdateView.as_view()),
         name='resource_update_view'),
    path('resource/delete/<int:pk>/',
         login_required(ResourceDeleteView.as_view()),
         name='resource_delete_view'),
Esempio n. 2
0
from core import core
from core.views import IndexView, MeetView, ContactView, TestView, AboutView, NewView, BlockView, LayoutView

routes = [(
    (core, ),
    ('', IndexView.as_view('index')),
    ('show/<layout_name>', IndexView.as_view('show_layout')),
    ('about', AboutView.as_view('about')),
    ('meet', MeetView.as_view('meet')),
    ('contact', ContactView.as_view('contact')),
    ('test', TestView.as_view('test')),
    ('new', NewView.as_view('new')),
    ('blockview/<int:alt_layout>', BlockView.as_view('blockview')),
    #('show_layout/<layout>',LayoutView.as_view('show_layout')),
    ('show_layout/<layout>/<navbar>', LayoutView.as_view('show_nav_layout')),
)]
Esempio n. 3
0
 url(r'^previous-editions/$',
     TemplateView.as_view(template_name="previous_editions.html"),
     name='previous-editions'),
 url(r'^news/$',
     TemplateView.as_view(template_name="news.html"),
     name='news'),
 url(r'^badges/$',
     TemplateView.as_view(template_name="badges.html"),
     name='badges'),
 url(r'^register/$',
     TemplateView.as_view(template_name="register.html"),
     name='register'),
 url(r'^sponsors/$', CustomSponsorsView.as_view(), name='custom-sponsors'),
 url(r'^schedule/$', ScheduleView.as_view(), name='schedule'),
 url(r'^sponsors/jobs/$', SponsorsJobsView.as_view(), name='sponsors-jobs'),
 url(r'about/$', AboutView.as_view(), name='about'),
 url(r'^venue/$', VenueView.as_view(), name='venue'),
 url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
     {'document_root': settings.MEDIA_ROOT}),
 url(r'^notification/$', NotificationView.as_view(), name='notification'),
 url(r'^dashboard/', include('pythonbrasil8.dashboard.urls')),
 url(r'^accounts/login/$',
     'django.contrib.auth.views.login',
     {'extra_context': {
         'registration_form': RegistrationForm()
     }},
     name='auth_login'),
 url(r'^accounts/logout/$',
     'django.contrib.auth.views.logout', {"next_page": "/"},
     name='auth_logout'),
 url(r'^accounts/', include('registration.backends.default.urls')),
Esempio n. 4
0
from django.conf import settings
from django.conf.urls import include
from django.conf.urls import url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth import views as auth_views

from core.views import AboutView


urlpatterns = [
    url(r'^about/$', AboutView.as_view(), name='about'),
    url(r'^admin/', admin.site.urls),
    url(r'^login/$', auth_views.login, name='login'),
    url(r'', include('blog.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Esempio n. 5
0
    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 core.views import HomepageView, ContactView, AboutView, MeetTheTeam, OurPartners, Partnerships, BecomeAPartner, WhoWeAre, HowItWorks
from profiles.views import LoginView, RegistrationView, RegistrationComplete, ActivationComplete, profile_update
from profiles.forms import PimpUserRegistrationForm

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', HomepageView.as_view(), name="index"),
    url(r'^login/', LoginView.as_view(), name="login"),
    url(r'^contact/', ContactView.as_view(), name="contact"),
    url(r'^about/', AboutView.as_view(), name="about"),
    url(r'^meet-the-team', MeetTheTeam.as_view(), name="team"),
    url(r'^who-we-are/', WhoWeAre.as_view(), name="who_we_are"),
    url(r'^how-it-works/', HowItWorks.as_view(), name="how_it_works"),
    url(r'^partnerships/', Partnerships.as_view(), name="partenrships"),
    url(r'^become-a-partner/',
        BecomeAPartner.as_view(),
        name="become_a_partner"),
    url(r'^our-partners/', OurPartners.as_view(), name="our_partners"),
    url(r'^accounts/register/',
        RegistrationView.as_view(form_class=PimpUserRegistrationForm),
        name='registration_register'),
    url(r'^accounts/registration-complete/',
        RegistrationComplete.as_view(),
        name='registration_complete'),
    url(r'^accounts/activate/complete/',
Esempio n. 6
0
from django.urls import path
from core.views import HomeView, DashboardView, AboutView, FaqView
from django.conf.urls.static import static

from diagnostico_project import settings

app_name = 'core'
urlpatterns = [
    path('', HomeView.as_view(), name='home'),
    path('faq', FaqView.as_view(), name='faq'),
    path('about', AboutView.as_view(), name='about'),
    path('dashboard', DashboardView.as_view(), name='dashboard'),
]
Esempio n. 7
0
from core import core
from core.views import IndexView,MeetView,ContactView,TestView,AboutView,NewView,BlockView,LayoutView


routes = [
    ((core,),
        ('',IndexView.as_view('index')),
        ('about',AboutView.as_view('about')),
        ('meet',MeetView.as_view('meet')),
        ('contact',ContactView.as_view('contact')),
        ('test',TestView.as_view('test')),
        ('new',NewView.as_view('new')),
        ('blockview/<int:alt_layout>',BlockView.as_view('blockview')),
        ('show_layout/<layout>',LayoutView.as_view('show_layout')),
        ('show_layout/<layout>/<navbar>',LayoutView.as_view('show_nav_layout')),
    )
]
Esempio n. 8
0
    "blog": GenericSitemap(blog_dict, priority=0.6),
}

router = DefaultRouter()

router.register(r"photos", PhotoViewSet)
router.register(r"random_photos", RandomPhotoViewSet)

admin_header = f"Lawrence Trail Hawks v{__version__}"
admin.site.enable_nav_sidebar = False
admin.site.site_header = admin_header
admin.site.site_title = admin_header

urlpatterns = [
    path("", HomepageView.as_view(), name="homepage"),
    path("about/", AboutView.as_view(), name="about"),
    path("contact/", officer_list, name="contact"),
    path("contact/thanks/", ThanksView.as_view(), name="thanks"),
    path("styleguide/", StyleGuideView.as_view(), name="styleguide"),
    path("blog/", include("blog.urls")),
    path("events/", include("events.urls")),
    path("faq/", include("faq.urls")),
    path("links/", include("links.urls")),
    path("members/", include("members.urls")),
    path("news/", include("news.urls")),
    path("photos/", include("photos.urls")),
    path("races/", include("races.urls")),
    path("runs/", include("runs.urls")),
    path("sponsors/", include("sponsors.urls")),
    path("ajaximage/", include("ajaximage.urls")),
    path("api/v1/", include(router.urls)),