Exemple #1
0
"""Socialist 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, url
from django.contrib import admin

from app.views import HomeView, SearchView

urlpatterns = [
    url(r'^$', HomeView.as_view(), name='home'),
    url(r'^accounts/', include('accounts.urls')),
    url(r'^blog/', include('blog.urls', namespace='blog')),
    url(r'^comments/', include('django_comments.urls')),
    url(r'^search/$', SearchView.as_view(), name='search'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'i18n/', include('django.conf.urls.i18n')),
]
Exemple #2
0
from django.conf.urls.i18n import i18n_patterns
from django.utils.translation import ugettext_lazy as _

from djangoPress import settings

urlpatterns = [
    path('admin/', admin.site.urls),
    url(
        r'^media/(?P<path>.*)$',
        serve,
        {'document_root': settings.MEDIA_ROOT},
    ),
    url(r'login', LoginView.as_view(), name="login"),
    url(r'register', RegisterView.as_view(), name="register"),
    url(r'logout', auth_views.logout, {'next_page': '/'}, name='logout')
]

urlpatterns += i18n_patterns(
    url(_(r'profile/(?P<pk>\w+)'), ProfileView.as_view(), name='profile'),
    url(_(r'search$'), SearchView.as_view(), name='search'),
    url(_(r'create$'), ArticleCreation.as_view(), name="createArticle"),
    url(_(r'update/(?P<pk>\d+)'),
        ArticleUpdate.as_view(),
        name="updateArticle"),
    url(_(r'delete/(?P<pk>\d+)'),
        ArticleDelete.as_view(),
        name="deleteArticle"),
    url(_(r'^$'), IndexView.as_view(), name="index"),
    url(_(r'(?P<pk>\d+)'), ArticleDetails.as_view(), name="article"),
)
Exemple #3
0
app.jinja_env.filters['data_format_friendly'] = date_format_friendly

app.jinja_env.filters['date_simple'] = date_simple

app.jinja_env.filters['thumb_url'] = thumb_url

# end register template filters

# register app components

IndexView.register(app)

UserView.register(app)

SearchView.register(app)

PricingView.register(app)

LightboxesView.register(app)

ImageDetailsView.register(app)

OrderView.register(app)

LightboxView.register(app)

ProfileView.register(app)

DownloadHistoryView.register(app)
Exemple #4
0
Examples:
Function views
    1. Add an import:  from my_app import views
    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.contrib.auth import views as auth_views
from django.conf import settings
from django.conf.urls.static import static
from django.urls import path, include

from app.views import HomeView, LoginView, SearchView, FavouriteView

urlpatterns = [
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', auth_views.LogoutView.as_view(), name='logout'),
    path('search/', SearchView.as_view(), name='search'),
    path('favourite/', FavouriteView.as_view(), name='favourite'),
    path('accounts/', include('allauth.urls')),
    path('admin/', admin.site.urls),
    path('', HomeView.as_view(), name='home'),
]

urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Exemple #5
0
from rest_framework.documentation import include_docs_urls
from rest_framework_simplejwt import views
from django.contrib import admin
from django.urls import path, include

from app.restaurant.views import TopRestaurantsView
from app.user.views import ResetPasswordValidationView, ResetPasswordView
from app.views import MyTokenObtainPairView, SearchView

urlpatterns = [
    path('backend/admin/', admin.site.urls),
    path('backend/api/registration/', include('app.authorization.urls')),
    path('backend/api/restaurants/', include('app.restaurant.urls')),
    path('backend/api/category/', include('app.category.urls')),
    path('backend/api/comment/', include('app.comment.urls')),
    path('backend/api/reviews/', include('app.review.urls')),
    path('backend/api/home/', TopRestaurantsView.as_view()),
    path('backend/api/search/', SearchView.as_view()),

    path('backend/api/auth/token/', MyTokenObtainPairView.as_view(), name='token_obtain_pair'),
    path('backend/api/auth/token/refresh/', views.TokenRefreshView.as_view(), name='token_refresh'),
    path('backend/api/auth/token/verify/', views.TokenVerifyView.as_view(), name='token_refresh'),
    path('backend/api/docs/', include_docs_urls(title='Luna API documentation 🦁', permission_classes=[])),
    path('backend/api/auth/password-reset/validation/', ResetPasswordValidationView.as_view()),
    path('backend/api/auth/password-reset/', ResetPasswordView.as_view()),

    path('backend/api/', include('app.user.urls')),
]
Exemple #6
0
    url(r'^stories/(?P<slug>[\w-]+)/$', StoryView.as_view(), name="story"),
    url(r'^stories/(?P<slug>[\w-]+)/comment/$', StoriesCommentView.as_view(), 
        name='story comment'),
    url(r'^articles/$', ArticlesView.as_view(), name="articles"),
    url(r'^articles/article_archive/$', ArticleArchiveView.as_view(), name="article-archive"),
    url(r'^articles/(?P<slug>[\w-]+)/$', ArticleView.as_view(), name="article"),
    url(r'^articles/(?P<slug>[\w-]+)/comment/$', ArticlesCommentView.as_view(), 
        name='article comment'),
    url(r'^media/library/', include('library.urls')),
    url(r'^library/', include('library.urls')),
    url(r'^media/actual_play/', include('actual_play.urls')),
    url(r'^actual_play/', include('actual_play.urls')),
    url(r'^members/', include('django.contrib.auth.urls')),
    url(r'^markdown/', include('django_markdown.urls')),
    url(r'^accounts/', include('registration.backends.hmac.urls')),
    url(r'^accounts/profile/(?P<slug>[\-\w]+)/$', ProfileView.as_view(), 
        name='update_user'),
    url(r'^search/(?P<q>.*)$', SearchView.as_view(), name='search'),
]

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

if settings.DEBUG:
    from django.conf.urls.static import static
    urlpatterns += static(settings.STATIC_URL,
        document_root=settings.STATIC_ROOT)
Exemple #7
0
    DeleteContactView, AddEmailView, AddPhoneView, SearchView, EditEmailView, EditPhoneView, DeleteEmailView, \
    DeletePhoneView, GroupsView, GroupView, EditGroupView, DeleteGroupView, AddGroupView

from peoPool.settings import MEDIA_URL, MEDIA_ROOT, DEBUG

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', ContactsView.as_view(), name="contacts_view"),
    url(r'^show/(?P<pk>(\d)+)/$', ContactDetailView.as_view(), name="contact_view"),
    url(r'^modify/(?P<pk>(\d)+)/$', EditContactView.as_view(), name="edit_contact_view"),
    url(r'^delete/(?P<pk>(\d)+)/$', DeleteContactView.as_view(), name="delete_view"),
    url(r'^new/$', AddContactView.as_view(), name="add_contact_view"),
    url(r'^(?P<pk>(\d)+)/add_email/$', AddEmailView.as_view(), name="add_email"),
    url(r'^(?P<pk>(\d)+)/modify_email/$', EditEmailView.as_view(), name="modify_email"),
    url(r'^(?P<pk>(\d)+)/delete_email/$', DeleteEmailView.as_view(), name="delete_email"),
    url(r'^(?P<pk>(\d)+)/add_phone/$', AddPhoneView.as_view(), name="add_phone"),
    url(r'^(?P<pk>(\d)+)/modify_phone/$', EditPhoneView.as_view(), name="modify_phone"),
    url(r'^(?P<pk>(\d)+)/delete_phone/$', DeletePhoneView.as_view(), name="delete_phone"),
    url(r'^(?P<pk>(\d)+)/add_address/$', AddAddressView.as_view(), name="add_address_view"),
    url(r'^address/modify/(?P<pk>(\d)+)/$', EditAddressView.as_view(), name="edit_address_view"),
    url(r'^search/$', SearchView.as_view(), name="search"),
    url(r'^groups/$', GroupsView.as_view(), name="groups_view"),
    url(r'^groups/(?P<pk>(\d)+)/$', GroupView.as_view(), name="group_view"),
    url(r'^groups/modify/(?P<pk>(\d)+)/$', EditGroupView.as_view(), name="edit_group_view"),
    url(r'^groups/delete/(?P<pk>(\d)+)/$', DeleteGroupView.as_view(), name="delete_group_view"),
    url(r'^groups/new/$', AddGroupView.as_view(), name="add_group_view"),

]

if DEBUG is True:
    urlpatterns += static(MEDIA_URL, document_root=MEDIA_ROOT)
Exemple #8
0
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path

from app.views import SearchView, LogInView, AddStockView, AddressesByCustomerView, RepairByCustomerView, GetLabels, \
    AddItem, GetAllStockView, GetAllCat, Pay, GetAllPhoneModel, AddOrUpdateCatalogEntryView, AddPhoneView, \
    GetAllUserInfos, GetAllUserRepairs, GetSpecificCat, GetItemFromCatInStock, GetItemFromRepair, GetPaymentFromRepair, \
    GetAllPaymentMethod, GenerateInvoice, EditPaymentStatus, GetInfoFromRepair, LinkItemToRepair, UnPay, \
    UnLinkItemToRepair, NewRepair, simple_upload, GetAllPromo, GetAllCatPublic, GetAllPhonePublic, newClientView, \
    newQuotationView, GetQuotationListByUser, AddCatToQuotationView, GetQuotationDetailView, TestIfLogedView, ImgView, \
    GetAllOtherCatView, LabelsView, ajax

urlpatterns = [
    path('admin/', admin.site.urls),
    path('search', SearchView.as_view()),
    path('addstock', AddStockView.as_view()),
    path('customeraddresses', AddressesByCustomerView.as_view()),
    path('customerrepair', RepairByCustomerView.as_view()),
    path('getlabelpdf', GetLabels.as_view()),
    path('additem', AddItem.as_view()),
    path('stock', GetAllStockView.as_view()),
    path('getallcat', GetAllCat.as_view()),
    path('invoice', GenerateInvoice.as_view()),
    path('paymentstatus', EditPaymentStatus.as_view()),
    path('pay', Pay.as_view()),
    path('unpay', UnPay.as_view()),
    path('getallphone', GetAllPhoneModel.as_view()),
    path('addorupdatecatalogentry', AddOrUpdateCatalogEntryView.as_view()),
    path('addphone', AddPhoneView.as_view()),
    path('getalluserinfo', GetAllUserInfos.as_view()),