def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasWorkingProject.__init__(self) self.listOfSimulations = None self.fileUploadForm = DocumentForm()
def get(self, request, *args, **kwargs): """ Check whether the activation link is valid, for this both the user id and the token should be valid. Messages are shown when user belonging to the user id is already active and when the account is successfully activated. In all other cases the activation failed template is shown. Finally if the user is successfully activated, log user in and redirect to their dashboard. """ try: self.uid = base36_to_int(kwargs['uidb36']) self.user = CustomUser.objects.get(id=self.uid) self.token = kwargs['token'] except (ValueError, CustomUser.DoesNotExist): # Show template as per normal TemplateView behaviour return TemplateView.get(self, request, *args, **kwargs) if self.tgen.check_token(self.user, self.token): # Show activation message messages.info(request, _('Your account has been activated and you are now logged in.')) else: # Show template as per normal TemplateView behaviour return TemplateView.get(self, request, *args, **kwargs) # Set is_active to True and save the user self.user.is_active = True self.user.save() # Log the user in email_address = self.user.primary_email self.user = authenticate(username=email_address.email_address, no_pass=True) user_login(request, self.user) # Redirect to dashboard return redirect(reverse_lazy('dashboard'))
def get(self, request, *args, **kwargs): """ Check whether the activation link is valid, for this both the user id and the token should be valid. Messages are shown when user belonging to the user id is already active and when the account is successfully activated. In all other cases the activation failed template is shown. Finally if the user is successfully activated, log user in and redirect to their dashboard. """ try: user_id = base36_to_int(kwargs['uidb36']) user = LilyUser.objects.get(id=user_id) token = kwargs['token'] except (ValueError, LilyUser.DoesNotExist): # Show template as per normal TemplateView behaviour return TemplateView.get(self, request, *args, **kwargs) if self.token_generator.check_token(user, token): # Show activation message messages.info(request, _('I\'ve activated your account, please login.')) else: # Show template as per normal TemplateView behaviour return TemplateView.get(self, request, *args, **kwargs) # Set is_active to True and save the user user.is_active = True user.save() # Redirect to dashboard return redirect(reverse_lazy('login'))
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasWorkingModel.__init__(self) self.listOfUnitDefinitions = None self.form = ModelUnitsForm(self)
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasWorkingProject.__init__(self) self.optimizationId = None self.parameters = None self.inputParameters = None self.outputParameters = None self.modelName = None self.submodelNames = None self.modifiedSubmodelNames = None self.optimizationStatus = None self.showGraph = None self.optimPath = None self.experiments = None self.experimentsData = None self.scoreTime = [] self.scoreValues = [] self.scoreRawValues = [] self.scoreMinEv = [] self.scoreMaxEv = [] self.optimizationModel = None
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasWorkingModel.__init__(self) self.optimization = None self.form = DataOptimizationForm(self)
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasErrorMessages.__init__(self) self.computations = None self.computationsStatus = None self.conts = None self.optims = None
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasWorkingModel.__init__(self) self.listOfSpecies = None self.listOfReactions = None self.listOfCompartments = None
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasErrorMessages.__init__(self) HasWorkingModel.__init__(self) self.listOfVariables = None self.listOfEvents = None self.form = ModelEventsForm(self)
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasWorkingModel.__init__(self) HasErrorMessages.__init__(self) self.listOfCompartments = None self.listOfUnits = None self.form = ModelCompartmentsForm(self)
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasErrorMessages.__init__(self) HasWorkingModel.__init__(self) self.modelHistory = None self.modelPublication = None self.form = ModelAnnotationsForm(self)
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasWorkingProject.__init__(self) HasUserLoggedIn.__init__(self) HasErrorMessages.__init__(self) self.listOfModels = None self.fileUploadForm = DocumentForm()
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasWorkingProject.__init__(self) self.listOfFolders = None self.createFolderShow = None self.createFolderError = None self.sendFolderShow = None self.sendFolderError = None
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasWorkingProject.__init__(self) self.listOfExperiments = None self.experimentId = None self.experimentName = None self.experimentNotes = None self.fileUploadForm = DocumentForm()
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasErrorMessages.__init__(self) HasWorkingModel.__init__(self) self.listOfParameters = None self.listOfReactions = None self.listOfUnits = None self.form = ModelParametersForm(self)
def test_template_engine(self): """ A template view may provide a template engine. """ request = self.rf.get('/using/') view = TemplateView.as_view(template_name='generic_views/using.html') self.assertEqual(view(request).render().content, b'DTL\n') view = TemplateView.as_view(template_name='generic_views/using.html', template_engine='django') self.assertEqual(view(request).render().content, b'DTL\n') view = TemplateView.as_view(template_name='generic_views/using.html', template_engine='jinja2') self.assertEqual(view(request).render().content, b'Jinja2\n')
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasWorkingModel.__init__(self) HasErrorMessages.__init__(self) self.listOfConstants = None self.listComputations = None self.computation = None self.form = AnalyseBifurcationsForm(self)
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasErrorMessages.__init__(self) HasWorkingModel.__init__(self) self.listOfUnits = None self.listOfParameters = None self.sbmlLevels = None self.modelHistory = None self.modelPublication = None self.form = ModelMiscForm(self)
def setUp(self): self.user = UserFactory() self.authed_view = TemplateView.as_view(template_name='base.html') self.authed_view_kwargs = {'authed': True} self.anonymous_view = TemplateView.as_view(template_name='base.html') self.anonymous_view_kwargs = {'anonymous': True} self.other_anonymous_view = View.as_view() self.view_kwargs = { 'authed_view': self.authed_view, 'authed_view_kwargs': self.authed_view_kwargs, 'anonymous_view': self.anonymous_view, 'anonymous_view_kwargs': self.anonymous_view_kwargs}
def detail_view(self, request): """ Renders the message view to a response. """ context = { 'preview': self, } kwargs = {} if self.form_class: if request.GET: form = self.form_class(data=request.GET) else: form = self.form_class() context['form'] = form if not form.is_bound or not form.is_valid(): return TemplateView.as_view( template_name='mailviews/previews/detail.html' )(request, **context) kwargs.update(form.get_message_view_kwargs()) message_view = self.get_message_view(request, **kwargs) message = message_view.render_to_message() raw = message.message() headers = SortedDict((header, maybe_decode_header(raw[header])) for header in self.headers) context.update({ 'message': message, 'subject': message.subject, 'body': message.body, 'headers': headers, 'raw': raw.as_string(), }) alternatives = getattr(message, 'alternatives', []) try: html = next(alternative[0] for alternative in alternatives if alternative[1] == 'text/html') context.update({ 'html': html, 'escaped_html': b64encode(html.encode('utf-8')), }) except StopIteration: pass return TemplateView.as_view( template_name=self.template_name)(request, **context)
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasErrorMessages.__init__(self) HasWorkingModel.__init__(self) self.listOfVariables = None self.listOfRules = None self.ruleTypes = ["Algebraic rule", "Assignment rule", "Rate rule", "Initial assignment"] self.form = ModelRulesForm(self)
def __init__(self, **kwargs): TemplateView.__init__(self, **kwargs) HasErrorMessages.__init__(self) HasWorkingModel.__init__(self) self.listOfReactions = None self.listOfSpecies = None self.listOfParameters = None self.listOfKineticLaws = None self.reactionTypes = KineticLaw.reactionTypes self.parametersList = KineticLaw.parametersList self.allowReversibleList = KineticLaw.allowReversibleList self.form = ModelReactionsForm(self)
def get(self, request, *args, **kwargs): self.load(request, *args, **kwargs) if len(args) > 0: self.loadSedmlSimulation(request, int(args[0])) return TemplateView.get(self, request, *args, **kwargs)
def get_context_data(self, **kwargs): context = TemplateView.get_context_data(self, **kwargs) spirit = get_object_or_404(Spirit, pk=kwargs["pk"]) permissions = { "is_administrator": spirit.owner == self.request.user } context.update({ "spirit": spirit, "elements": { "positive": Element.objects.filter( applications__spirit=spirit, applications__strength__gte=0 ), "negative": Element.objects.filter( applications__spirit=spirit, applications__strength__lt=0 ), }, "permissions": permissions }) return context
def post(self,request,*args,**kwargs): self.form = BuyoutForm(request.POST) self.form2 = None self.form2_message = None self.barcode = None if request.POST.get('form-ok',None): if self.form.is_valid(): self.barcode = self.form.cleaned_data['barcode'] barcode = self.barcode articles = Article.objects.filter(Q(title__icontains=barcode) | Q(interpret__icontains=barcode) | Q(barcode=barcode)) initial = dict( [('barcode',self.barcode),] \ + ((len(articles) == 1) and [('article_id',articles[0].id)] or [])) self.form2 = BuyoutToCleanForm( initial = initial ) self.form2.fields['article_id'].choices=[(aa.id,str(aa)) for aa in articles] if len(articles) == 1: self.form2.initial['article_id'] = articles[0].id else: self.form = form if request.POST.get('form2-ok',None): self.form2 = BuyoutToCleanForm(request.POST) barcode = request.POST.get('barcode',None) articles = Article.objects.filter(Q(title__icontains=barcode) | Q(interpret__icontains=barcode) | Q(barcode=barcode)) self.form2.fields['article_id'].choices=[(aa.id,str(aa)) for aa in articles] if self.form2.is_valid(): self.form2.save() self.form2 = None self.form2_message = "Hotovo, zbozi je na sklade" self.form = BuyoutForm() return TemplateView.get(self,request,*args,**kwargs)
def slug(request, url): """Look up a page by url (which is a tree of slugs)""" page = None if url: for slug in url.split('/'): if not slug: continue try: page = Page.objects.get(slug=slug, parent=page) except Page.DoesNotExist: raise Http404 else: try: page = Page.objects.get(slug='index', parent=None) except Page.DoesNotExist: return TemplateView.as_view( template_name='wafer/index.html')(request) if 'edit' in request.GET: if not request.user.has_perm('pages.change_page'): raise PermissionDenied return EditPage.as_view()(request, pk=page.id) if 'compare' in request.GET: if not request.user.has_perm('pages.change_page'): raise PermissionDenied return ComparePage.as_view()(request, pk=page.id) return ShowPage.as_view()(request, pk=page.id)
def get_urls(self): from django.conf.urls.defaults import patterns, url, include def wrap(view, cacheable=False): def wrapper(*args, **kwargs): return self.manager_view(view, cacheable)(*args, **kwargs) return update_wrapper(wrapper, view) # Manager-site-wide views. urlpatterns = [] # Add in each model's common and manager views. for model, reg_dict in self._registry.iteritems(): info = model._meta.app_label, model._meta.module_name def fieldlist_view(*args, **kwargs): return self.modelfieldlist_view(model=model, *args, **kwargs) urlpatterns += patterns('', url(r'^%s/%s/$' % (info), wrap(fieldlist_view), name='%s_%s_fieldlist' % info ), url(r'^%s/%s/None' % (info), wrap(TemplateView.as_view(template_name=( 'ckeditor_filemodel_manager/unsaved.html' ))), name='%s_%s_unsaved' % info ), ) for fieldname_dict, manager in reg_dict.iteritems(): urlpatterns += patterns('', url(r'^%s/%s/' % info, include(manager.urls)) ) return urlpatterns
def get(self, *args, **kwargs): auth.logout(self.request) # If we have a url to redirect to, do it. Otherwise render the logged-out template. if self.get_redirect_url(**kwargs): return RedirectView.get(self, *args, **kwargs) else: return TemplateView.get(self, *args, **kwargs)
def test_url_resolves_to_correct_view(self): response = self.client.get(reverse('hello:home')) self.assertEqual( response.resolver_match.func.__name__, TemplateView.as_view().__name__ ) self.fail('Success 2: test_url_resolves_to_correct_view is passed')
def get_context_data(self, **kwargs): """ Generating variables that end up in the view goes here. """ context = TemplateView.get_context_data(self, **kwargs) self.now = kwargs.get("date", self.now) or self.now if "date" in kwargs and kwargs["date"]: self.now = parse(kwargs["date"]) self.probes = Selector.factory(kwargs["selector"]).get_probes() self.outages = Outages( self.now, self.now + relativedelta(days=1), self.probes, 900, 0.01 ) context["date"] = kwargs.get("date", "") context["selector"] = kwargs["selector"] context["geography"] = self.get_geojson() context["outages"] = self.outages.get() context["log"] = self.get_connection_log(self.outages.events) context["name"] = Selector.get_name(kwargs["selector"]) return context
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import include, path from django.views import defaults as default_views from django.views.generic import TemplateView urlpatterns = [ path("", TemplateView.as_view(template_name="pages/home.html"), name="home"), path( "about/", TemplateView.as_view(template_name="pages/about.html"), name="about" ), # Django Admin, use {% url 'admin:index' %} path(settings.ADMIN_URL, admin.site.urls), # User management path("users/", include("btre_project.users.urls", namespace="users")), path("accounts/", include("allauth.urls")), # Your stuff: custom urls includes go here ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG: # This allows the error pages to be debugged during development, just visit # these url in browser to see how these error pages look like. urlpatterns += [ path( "400/", default_views.bad_request, kwargs={"exception": Exception("Bad Request!")}, ), path(
from django.conf import settings from django.urls import include, path from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpatterns = [ # path("", TemplateView.as_view(template_name="pages/home.html"), name="home"), path( "about/", TemplateView.as_view(template_name="pages/about.html"), name="about" ), # Django Admin, use {% url 'admin:index' %} path(settings.ADMIN_URL, admin.site.urls), # User management path("users/", include("dumb_twitter.users.urls", namespace="users")), path("accounts/", include("allauth.urls")), # Your stuff: custom urls includes go here path("", include("dumb_twitter.posts.urls", namespace="posts")) ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG: # This allows the error pages to be debugged during development, just visit # these url in browser to see how these error pages look like. urlpatterns += [ path( "400/", default_views.bad_request, kwargs={"exception": Exception("Bad Request!")}, ), path(
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. 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 django.contrib.auth import views as authviews from django.views.generic import TemplateView from . import views urlpatterns = [ url(r'^$', authviews.LoginView.as_view(template_name='accounts/login_temp.html'), name='homepage'), url(r'^react/$', TemplateView.as_view(template_name='React/index.html'), name='react'), url(r'^success/$', views.SuccessfulRegistration.as_view(), name='success'), url(r'^admin/', admin.site.urls), url(r'^accounts/', include('accounts.urls')), url(r'^accounts/', include('django.contrib.auth.urls')), url(r'^notes/', include('notes.urls')), url(r'^api/', include('notes.api.urls', namespace='notesapi')), ]
""" from django.conf.urls import include, url from django.urls import path from django.views.generic import TemplateView from django.contrib import admin from django.contrib.auth import views as auth_views from django.views.decorators.cache import cache_page from account.views import * from depot.views import * urlpatterns = [ # 首页 # path('', cache_page(60 * 60)(TemplateView.as_view(template_name='modern-business/index.html')), name='index'), path('', TemplateView.as_view(template_name='modern-business/index.html'), name='index'), # 首页 # path('index/', cache_page(60 * 60)(TemplateView.as_view(template_name='modern-business/index.html')), name='index'), path('index/', TemplateView.as_view(template_name='modern-business/index.html'), name='index'), #admin页面 path('admin/', admin.site.urls, name='admin'), #后台首页 path('backend/', include('backend.urls')), ###后台功能
from django.urls import path, include from . import views from django.contrib import admin from django.views.generic import TemplateView urlpatterns = [ path('clubs/<str:instagram_profile_name>', TemplateView.as_view(template_name='Clubs/insta.html'), name="insta_profile"), path('clubs/', views.index, name="index"), path('clubs/<str:key>/', views.clubPage, name="clubPage"), ]
from restaurant_app.views import (RestaurantListView, RestaurantDetailedListView, RestaurantLocationCreateView, RestaurantLocationUpdateView) from menus.views import (ItemListView, ItemDetailView, ItemCreateView, ItemUpdateView) from django.views.generic import TemplateView from example.views import (index) urlpatterns = [ path('login/', LoginView.as_view(), name="login"), path('forgot-password/', PasswordResetView.as_view(), name="password_reset"), path('admin/', admin.site.urls), path('', TemplateView.as_view(template_name="home.html"), name="home"), path('Restaurant-list/', RestaurantListView.as_view(), name="restaurantlist"), path('Restaurant-list/create/', RestaurantLocationCreateView.as_view(), name="Createrestaurantlist"), path('Restaurant-list/<slug>/edit/', RestaurantLocationUpdateView.as_view(), name="Updaterestaurantlist"), path('Restaurant-list/<slug>/', RestaurantDetailedListView.as_view(), name="Restaurant-Detail"), path('index/', index, name="index"), path('about/', TemplateView.as_view(template_name="about.html"),
"""ulb_manager URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ 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.urls import path,include from django.views.generic import TemplateView urlpatterns = [ path('admin/', admin.site.urls), path('backend/', include('backend.urls')), path('', TemplateView.as_view(template_name="index.html")) ]
from django.conf.urls import url, include from django.views.generic import TemplateView from django.contrib.auth.views import logout from email_authentication import views urlpatterns = [ url(r'^$', TemplateView.as_view(template_name='home.html'), name='home'), url(r'^login/', views.login_view, name='login'), url(r'^logout/', logout, name='logout'), url(r'^swingtime/', include('swingtime.urls')), ]
"""reporting_app URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ 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.conf.urls import url from django.contrib import admin from django.urls import path, include from django.views.generic import TemplateView urlpatterns = [ path("", TemplateView.as_view(template_name="pages/home.html"), name="home"), url( r"^report/", include("report.urls", namespace="report"), ), path('admin/', admin.site.urls), ]
from django.views.generic import TemplateView from rest_framework import routers from rest_framework.authtoken import views as authTokenViews from quickstart import views from searchCourse.views import * from socialAuth.views import * router = routers.DefaultRouter() router.register(r'users', views.UserViewSet) router.register(r'groups', views.GroupViewSet) router.register(r'faculties', FacultyViewSet) router.register(r'departments', DepartmentViewSet) router.register(r'subjects', SubjectViewSet) router.register(r'courses', CourseViewSet) router.register(r'terms', TermViewSet) router.register(r'classes', CourseClassViewSet) router.register(r'classtimes', ClassTimeViewSet) router.register(r'classCart', ClassCartViewSet) urlpatterns = [ path('api/admin/', admin.site.urls), path('api/', include(router.urls)), path('api/rest-auth/', include('rest_auth.urls')), path('api/rest-auth/registration/', include('rest_auth.registration.urls')), path('api/rest-auth/google/login/', GoogleLogin.as_view(), name="google_login"), path('', TemplateView.as_view(template_name='index.html')) ]
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') Including another URLconf 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 django.views.generic import TemplateView from rest_framework import permissions from drf_yasg.views import get_schema_view from drf_yasg import openapi schema_view = get_schema_view( openapi.Info( title="Ickly API", default_version='v1', ), public=True, permission_classes=(permissions.AllowAny, ), ) urlpatterns = [ url(r'^$', TemplateView.as_view(template_name='index.html')), url(r'^admin/', admin.site.urls), url(r'^api/v1/', include('api.urls', namespace='api')), url(r'^swagger/$', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), url(r'^.*/', TemplateView.as_view(template_name='index.html')) ]
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, re_path, include # url() from django.views.generic import TemplateView from tweets.views import ( home_view, tweet_action_view, tweet_delete_view, tweet_detail_view, tweet_list_view, tweet_create_view, ) urlpatterns = [ path('admin/', admin.site.urls), path('', home_view), path('react/', TemplateView.as_view(template_name='react_via_dj.html')), path('create-tweet', tweet_create_view), path('tweets', tweet_list_view), path('tweets/<int:tweet_id>', tweet_detail_view), path('api/tweets/', include('tweets.urls')) ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
"""hikinglog URL Configuration. The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/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. 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 django.views.generic import TemplateView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', TemplateView.as_view(template_name="hikinglog/home.html"), name='home'), url(r'^map/', TemplateView.as_view(template_name="hikinglog/map.html"), name='map'), url(r'^api/', include('hike_api.urls')), url(r'^hikes/', include('hikes.urls')) ]
from django.conf.urls import include from django.urls import path from django.views.generic import TemplateView, RedirectView from grandchallenge.core.api import get_public_results from grandchallenge.core.views import site from grandchallenge.serving.views import ChallengeServeRedirect urlpatterns = [ path("", site, name="challenge-homepage"), path( "robots.txt/", TemplateView.as_view(template_name="robots.txt", content_type="text/plain"), name="comicsite_robots_txt", ), # Note: add new namespaces to comic_URLNode(defaulttags.URLNode) path( "evaluation/", include("grandchallenge.evaluation.urls", namespace="evaluation"), ), path("teams/", include("grandchallenge.teams.urls", namespace="teams")), path( "participants/", include("grandchallenge.participants.urls", namespace="participants"), ), path("admins/", include("grandchallenge.admins.urls", namespace="admins")), path("uploads/", include("grandchallenge.uploads.urls", namespace="uploads")), path( "datasets/",
name='wiki.approved_watch'), url(r'^/unwatch-approved$', 'unwatch_approved', name='wiki.approved_unwatch'), url(r'^.json$', 'json_view', name='wiki.json'), url(r'^/templates$', 'list_templates', name='wiki.list_templates'), url(r'^/files$', 'list_files', name='wiki.list_files'), url(r'^/tags$', 'list_tags', name='wiki.list_tags'), url(r'^/new$', 'new_document', name='wiki.new_document'), url(r'^/all$', 'list_documents', name='wiki.all_documents'), url(r'^/preview-wiki-content$', 'preview_revision', name='wiki.preview'), url(r'^/with-errors$', 'list_documents_with_errors', name='wiki.errors'), url(r'^/move-requested$', TemplateView.as_view(template_name='wiki/move_requested.html'), name='wiki.move_requested'), url(r'^/get-documents$', 'autosuggest_documents', name='wiki.autosuggest_documents'), url(r'^/external-signup$', 'external_signup', name='wiki.external_signup'), url(r'^/category/(?P<category>\d+)$', 'list_documents', name='wiki.category'), url(r'^/needs-review/(?P<tag>[^/]+)$', 'list_documents_for_review', name='wiki.list_review_tag'), url(r'^/needs-review/?', 'list_documents_for_review', name='wiki.list_review'), url(r'^/feeds/(?P<format>[^/]+)/all/?', DocumentsRecentFeed(), name="wiki.feeds.recent_documents"), url(r'^/feeds/(?P<format>[^/]+)/l10n-updates/?',
"""LinkedIn URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ 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.conf.urls import url from django.urls import path, include from django.views.generic import TemplateView from django.conf import settings from django.conf.urls.static import static urlpatterns = [] urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += [ path('api/', include('profiler.urls')), path('admin/', admin.site.urls), url(r'^', TemplateView.as_view(template_name="index.html")), ]
"""gentle URL Configuration""" from django.conf import settings from django.contrib import admin from django.conf.urls import url, include from django.conf.urls.static import static from django.views.generic import TemplateView urlpatterns = [ url(r'^$', TemplateView.as_view(template_name='gentle/home.html'), name='home'), url(r'^about/', TemplateView.as_view(template_name='gentle/about.html'), name='about'), url(r'^blog/', include('blog.urls', namespace='blog')), url(r'^admin/', admin.site.urls), ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.urls import path, include from django.conf.urls import url from api.views import VideoFileUploadView, VideoFileList, FileListView from . import views from rest_framework.routers import DefaultRouter from django.views.generic import TemplateView router = DefaultRouter() router.register('db/videofile', views.VideoFileViewSet) router.register('db/video', views.VideoViewSet) urlpatterns = [ # FBV path('api/upload', VideoFileUploadView.as_view(), name="file-upload"), path('api/upload/<int:pk>/', VideoFileList.as_view(), name="file-list"), path('api/file', FileListView.as_view(), name="file"), url(r'^(?P<path>.*)$', TemplateView.as_view(template_name='index.html')), # path('api/upload', views.VideoFile_Upload), path('', include(router.urls)), ]
from dmsite.post_requests import files, campaigns, classifier, search, upload, edits urlpatterns = [ path('rest-auth/', include('rest_auth.urls')), path('rest-auth/registration', include('rest_auth.registration.urls')), path('admin/', admin.site.urls), path('home/upload/push_file', upload.upload_file), path('search/push_query', search.perform_search), path('classify_files', classifier.classify_files), path('classify_files/save', classifier.save_classifications), path('get_files', files.get_files_by_campaign), path('get_campaigns', campaigns.get_campaigns_by_owner), path('new_campaign', campaigns.create_new_campaign), path('get_classifications', edits.get_classifications), path('save_classifications', edits.save_classifications), path('download_file', files.download_file), re_path(r'^.*', TemplateView.as_view(template_name='index.html')), # leave this just incase ^^ stops working #path('', TemplateView.as_view(template_name='index.html')), #path('home', TemplateView.as_view(template_name='index.html')), #path('search/*', TemplateView.as_view(template_name='index.html')), #path('home/upload', TemplateView.as_view(template_name='index.html')), #path('details', TemplateView.as_view(template_name='index.html')), #path('profile', TemplateView.as_view(template_name='index.html')), #path('register', TemplateView.as_view(template_name='index.html')), #path('login', TemplateView.as_view(template_name='index.html')) ] urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
from utils.rss import LatestArticleFeed from utils.sitemap import ArticleSitemap from utils.admin_site import custom_site from utils.autocomplete import TagAc, CategoryAC from ArchMd import settings import debug_toolbar urlpatterns = [ url(r'^super_admin/', admin.site.urls), url(r'^admin/', custom_site.urls), url(r'^search/', include('haystack.urls')), url(r'^ckeditor/',include('ckeditor_uploader.urls')), url(r'^__debug__/', include(debug_toolbar.urls)), url(r'^silk/', include('silk.urls', namespace='silk')), url(r'^rss|feed/', LatestArticleFeed(), name='rss'), url(r'sitemap\.xml', sitemap_view.sitemap, {'sitemaps': {'posts': ArticleSitemap}}), url(r'^category-autocomplete/$', CategoryAC.as_view(), name='category-autocomplete'), url(r'^tag-autocomplete/$', TagAc.as_view(), name='tag-autocomplete'), url(r'^resume/$', TemplateView.as_view(template_name='resume.html'), name='resume'), url(r'^', include('user.urls', namespace='user')), ] + static(settings.MEDIA_ROOT, document_root=settings.MEDIA_ROOT)
# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ######################################################################### from django.conf.urls import url, include from django.views.generic import TemplateView, RedirectView from geonode.urls import urlpatterns urlpatterns += [ ## include your urls here url(r'^clip/', include('clip_and_ship.urls')), url(r'^contact/$', TemplateView.as_view(template_name='contact.html'), name='contact'), url(r'^tutorials/$', TemplateView.as_view(template_name='tutorials.html'), name='tutorials'), ] urlpatterns = [ url(r'^/?$', TemplateView.as_view(template_name='site_index.html'), name='home'), ] + urlpatterns
Including another URLconf 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 django.conf import settings from django.conf.urls.static import static from django.views.generic import TemplateView from contract import crons urlpatterns = [] urlpatterns += [ url(r'test-cron', crons.end_divident), ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL.replace(settings.SITE_URL, ''), document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL.replace(settings.SITE_URL, ''), document_root=settings.MEDIA_ROOT) urlpatterns += static(r'/assets', document_root='./static/assets') urlpatterns += [ # url(r'^chat/', include('contract.urls')), url(r'^admin/', admin.site.urls), url( r'^sitemap.xml', TemplateView.as_view(template_name='sitemap.xml', content_type='text/xml')), url(r'', TemplateView.as_view(template_name="index.html"), name='home'), ]
"""MathEasier URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ 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.urls import path, include from django.views.generic import TemplateView # "import *" is generally bad practice, # but here it should work out alright. from character_sheet.views import * urlpatterns = [ path('admin/', admin.site.urls), path('', TemplateView.as_view(template_name="home.html"), name="home"), # path('character-sheet/', include('math_easier.urls')) ]
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.urls import path from django.views.generic import TemplateView from front_end import views urlpatterns = [ path('admin/', admin.site.urls), path('validate/', views.validate, name='validate'), path('', TemplateView.as_view(template_name='log_in.html'), name='log_in'), path('hm', views.hm, name='hm'), path('verification_page/', views.verification_page, name='verification_page'), path('verification/', views.verification, name='verification'), path('update/<int:id>/', views.update, name='update'), path('save/<int:id>/', views.save, name='save'), path('log_out/', views.log_out, name='log_out'), path('add_new_user/', views.add_new_user, name='add_new_user'), path('admin_hm/', views.admin_hm, name='admin_hm'), # path('search/',views.search, name='search') ]
from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib.auth.decorators import login_required from django.contrib.auth import views from django.contrib.auth.models import User from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from django.views.generic.base import RedirectView from django.views.generic import TemplateView from django.views.static import serve from partuniverse import views as partuniverse_view urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^about/$', TemplateView.as_view(template_name='about.html'), name='about'), url(r'^help/$', TemplateView.as_view(template_name='help.html'), name='help'), url(r'^img/(?P<path>.*)$', serve, { 'document_root': settings.MEDIA_ROOT, }), url(r'^$', partuniverse_view.dashboard, name='home'), url(r'^pmgmt/', include('partsmanagement.urls')), url(r'^accounts/', include('account.urls')), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^rest/', include('rest.urls')) ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ 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.conf import settings from django.contrib import admin from django.urls import include, path from django.views.generic import RedirectView from users import views as users_views from django.views.generic import TemplateView from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), path('', TemplateView.as_view(template_name='users/test.html')), # path(r'^$', RedirectView.as_view(url='/users/', permanent=True)), path('users/', include('users.urls')), path('accounts/', include('django.contrib.auth.urls')), path('accounts/signup/', users_views.signup, name='signup'), ] + static(settings.STATIC_URL, document_root=settings.STATIC_URL)
), url(r'^api2/projects/$', CategoryListAPIView.as_view(), name='category_list_api'), url(r'^api2/projects/(?P<slug>[\w-]+)/$', CategoryDetailAPIView.as_view(), name='category_detail_api'), url(r'^api2/projects/(?P<cat_slug>[\w-]+)/(?P<vid_slug>[\w-]+)/$', VideoDetailAPIView.as_view(), name='video_detail_api'), # Examples: #url(r'^about/$', TemplateView.as_view(template_name='base.html'), name='home'), #url(r'^pricing/$', TemplateView.as_view(template_name='base.html'), name='home'), url(r'^contact/$', TemplateView.as_view(template_name='company/contact_us.html'), name='contact_us'), url(r'^$', 'srvup.views.home', name='home'), url(r'^projects/$', 'videos.views.category_list', name='projects'), url(r'^projects/(?P<cat_slug>[\w-]+)/$', 'videos.views.category_detail', name='project_detail'), url(r'^projects/(?P<cat_slug>[\w-]+)/(?P<vid_slug>[\w-]+)/$', 'videos.views.video_detail', name='video_detail'), url(r'^dj/admin/', include(admin.site.urls)), url(r'^api/auth/token/$', 'rest_framework_jwt.views.obtain_jwt_token'), url(r'^api/auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^api/', include(router.urls)), )
name="account_reset_password_done"), url(r"^password/reset/key/(?P<uidb36>[0-9A-Za-z]+)-(?P<key>.+)/$", allauth_views.password_reset_from_key, name="account_reset_password_from_key"), url(r"^password/reset/key/done/$", allauth_views.password_reset_from_key_done, name="account_reset_password_from_key_done"), url('^social/', include(social_urls)), url('^twitter/', include(twitter_urls)), url('^foursquare/', include(foursquare_urls)), url('^google/', include(google_urls)), ] landing_urls = [ url( r'^alameda-made$', TemplateView.as_view(template_name='landing_pages/alameda_made.html'), name='alameda-made', ) ] urlpatterns = [ url(r'^accounts/', include(allauth_urls)), url(r'^admin/', include(admin.site.urls)), url(r'^api/', include(api_urls)), url(r'^benefits$', TemplateView.as_view(template_name='pages/benefits.html'), name='benefits'), url( r'^(?P<book>\d+)/import/upload/', import_views.UploadImportView.as_view(), name='import-upload-view', ),
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpatterns = [ url(r'^$', TemplateView.as_view(template_name='pages/home.html'), name='home'), url(r'^about/$', TemplateView.as_view(template_name='pages/about.html'), name='about'), # Django Admin, use {% url 'admin:index' %} url(settings.ADMIN_URL, admin.site.urls), # User management url(r'^users/', include('website.users.urls', namespace='users')), url(r'^accounts/', include('allauth.urls')), # Your stuff: custom urls includes go here ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG: # This allows the error pages to be debugged during development, just visit # these url in browser to see how these error pages look like.
url=settings.STATIC_URL + "weblate-%(size)s.png", permanent=True ), ), url( r"^apple-touch-icon\.png$", RedirectView.as_view( url=settings.STATIC_URL + "weblate-180.png", permanent=True ), ), url( r"^(?P<name>favicon\.ico)$", RedirectView.as_view(url=settings.STATIC_URL + "%(name)s", permanent=True), ), url( r"^robots\.txt$", TemplateView.as_view(template_name="robots.txt", content_type="text/plain"), ), url( r"^browserconfig\.xml$", TemplateView.as_view( template_name="browserconfig.xml", content_type="application/xml" ), ), url( r"^site\.webmanifest$", TemplateView.as_view( template_name="site.webmanifest", content_type="application/json" ), ), ]