def __init__(self, parent=None, width=0, height=0): super(App, self).__init__(parent) self.home = Home() self.resize(width, height) # self.showMaximized() self.home.setupUi(self) try: self.auth = Auth(self.home, self) except TypeError: settings = QSettings() settings.clear() QMessageBox.warning( parent, "Error", "Your Application Data is Corrupted, Restart the application") sys.exit() self.home.manLecturerBtn.clicked.connect(self.manLecturePage) self.home.manCoursesBtn.clicked.connect(self.manCoursePage) self.home.manLectHallBtn.clicked.connect(self.manLectHallPage) self.home.manClassRepsBtn.clicked.connect(self.manClassRepPage) self.home.courseGrading.clicked.connect(self.viewGradingPage) self.home.getGrading.clicked.connect(self.getRecentGrades) self.home.chngResource.clicked.connect(self.getCumulatedGrades) self.home.levelCombo.currentIndexChanged.connect(self.loadLecturers) self.home.lecturerCombo.currentIndexChanged.connect( self.loadCourseList) self.home.cr_level.currentIndexChanged.connect(self.loadcr) self.home.cr_list.itemDoubleClicked.connect(self.update_cr) self.home.lectList.itemDoubleClicked.connect(self.update_lect) self.home.aboutButton.clicked.connect(self.dispAbout) self.home.settingBtn.clicked.connect(self.settingsPage)
from django.conf.urls import patterns, url from views import Home, ContactUs, FanOut from django.views.decorators.cache import cache_page PAGE_CACHE_PERIOD = 60*5 urlpatterns = patterns('', # Signup, signin and signout #url(r'^$', Home.as_view(template_name="web/pages/index.html"),name="home"), url(r'^$', cache_page(Home.as_view(template_name="web/pages/index.html"), PAGE_CACHE_PERIOD), name='home'), url(r'^about_us/', cache_page(Home.as_view(template_name="web/pages/about_us.html"), PAGE_CACHE_PERIOD), name='about'), url(r'^blog/(?P<slug>\w+)/$', Home.as_view(template_name="web/pages/blog_post.html"),name="blogpost"), url(r'^blog/', cache_page(Home.as_view(template_name="web/pages/blog_overview.html"), PAGE_CACHE_PERIOD), name='blog'), url(r'^faq/', cache_page(Home.as_view(template_name="web/pages/faq_list.html"), PAGE_CACHE_PERIOD), name='faq'), url(r'^pricing/', cache_page(Home.as_view(template_name="web/pages/pricing_overview.html"), PAGE_CACHE_PERIOD), name='pricing'), url(r'^services/', cache_page(Home.as_view(template_name="web/pages/services_overview.html"), PAGE_CACHE_PERIOD), name='services'), url(r'^testimonials/', cache_page(Home.as_view(template_name="web/pages/testimonials.html"), PAGE_CACHE_PERIOD), name='testimonials'), url(r'^portfolio/', cache_page(Home.as_view(template_name="web/pages/portfolio.html"), PAGE_CACHE_PERIOD), name='portfolio'), url(r'^portfolio/(?P<slug>\w+)/$', Home.as_view(template_name="web/pages/portfolio_item.html"),name="portfolio"), url(r'^contact/', ContactUs.as_view(),name="contact"), url(r'^video/', cache_page(Home.as_view(template_name="web/pages/video.html"), PAGE_CACHE_PERIOD), name='video'), url(r'^send_message/', FanOut.as_view(),name="contact"), )
from django.conf.urls import url, include from views import Home from views import Adm from views import JSHome from views import Quick from views import Median urlpatterns = [ url(r'^friskby/adm/$' , Adm.as_view(), name = "friskby.view.adm"), url(r'friskby/$' , Home.as_view()), url(r'legacy/$' , JSHome.as_view()), url(r'^$' , Quick.as_view(), name = "friskby.view.quick"), url(r'median/$' , Median.as_view(), name = "friskby.view.median") ]
from django.conf.urls import patterns, url from views import Home, ContactUs, FanOut from django.views.decorators.cache import cache_page PAGE_CACHE_PERIOD = 60 * 5 urlpatterns = patterns( '', # Signup, signin and signout #url(r'^$', Home.as_view(template_name="web/pages/index.html"),name="home"), url(r'^$', cache_page(Home.as_view(template_name="web/pages/index.html"), PAGE_CACHE_PERIOD), name='home'), url(r'^about_us/', cache_page(Home.as_view(template_name="web/pages/about_us.html"), PAGE_CACHE_PERIOD), name='about'), url(r'^blog/(?P<slug>\w+)/$', Home.as_view(template_name="web/pages/blog_post.html"), name="blogpost"), url(r'^blog/', cache_page(Home.as_view(template_name="web/pages/blog_overview.html"), PAGE_CACHE_PERIOD), name='blog'), url(r'^faq/', cache_page(Home.as_view(template_name="web/pages/faq_list.html"), PAGE_CACHE_PERIOD), name='faq'), url(r'^pricing/', cache_page(
from flask import Flask from views import Home, FolderCount, AllMail, RangeMail, EmailByID app = Flask(__name__) app.config.from_object('settings.Config') # Get Application information. app.add_url_rule('/', view_func=Home.as_view('home') \ , methods=['GET']) # Get email by dovecot UID app.add_url_rule('/folder/<folderName>/email/<int:emailID>', view_func=EmailByID.as_view('EmailByID') \ , methods=['GET']) # Get all mail from a certain folder. app.add_url_rule('/folder/<folderName>', view_func=AllMail.as_view('AllMail') \ , methods=['GET']) # Get a certain number of emails from a certain folder. app.add_url_rule('/folder/<folderName>/parse/<int:parseRange>', view_func=RangeMail.as_view('RangeMail') \ , methods=['GET']) # Get the number of emails from a certain folder. app.add_url_rule('/folder/<folderName>/count', view_func=FolderCount.as_view('Foldercount') \ , methods=['GET']) if __name__ == "__main__": app.run(host=app.config['FINKIT_HOST'], \ port=app.config['FINKIT_PORT'], debug=app.config['DEBUG_STATUS'])
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() from views import Home, ClassifyView urlpatterns = patterns('', # Examples: url(r'^$', Home.as_view(), name='home'), url(r'^classifiy/$', ClassifyView.as_view(), name='classify'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), )
"""msgparser 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 from django.contrib import admin from views import FileUploadView, Home urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', Home.as_view(), name='home'), url(r'email/parse/$', FileUploadView.as_view(), name="email-parse"), ]
from django.conf.urls import patterns, include, url from django.contrib import admin from views import Home urlpatterns = patterns('', # Examples: # url(r'^$', 'kpis.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url( r'^$', Home.as_view() ), url(r'^admin/', include(admin.site.urls)), url( r'^api/', include( 'api.urls' ) ), url( r'^kpi/', include( 'kpiApp.urls' ) ), )
from django.conf.urls import patterns, include, url from django.contrib import admin from views import Home, Project_view, RecomendedProjects_view, AboutView, OurPeople, Create_skill, Edit_project, Profile, Category_view, Category_view_filter, Sub_category_view_filter, Users_view, Settings, Create_project, Register, Login, Create_profile, Trueques, Set_Password, solicitar_cambio_contrasena, cambiar_contrasena_usuario, Dashboard, register_comment, ProjectComments, UserComments, ProjectComment import views from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.staticfiles.urls import staticfiles_urlpatterns urlpatterns = patterns( '', url(r'^likes/', include('phileo.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^$', Home.as_view(), name='index'), url(r'^proyecto/(?P<username>\w+)/(?P<slug>[-_\w]+)/$', Project_view.as_view(), name='project'), url(r'^proyecto/editar/(?P<username>\w+)/(?P<slug>[-_\w]+)/$', Edit_project.as_view(), name='editproject'), url(r'^perfil/(?P<slug>[-_\w]+)/$', Profile.as_view(), name='profile'), url(r'^dashboard/(?P<slug>[-_\w]+)/$', Dashboard.as_view(), name='dashboard'), url(r'^descubre/$', Category_view.as_view() , name='category'), url(r'^colabora/(?P<tipo>\w+)/$', RecomendedProjects_view.as_view() , name='matches'), url(r'^descubre/(?P<category>\w+)/$', Category_view_filter.as_view(), name='subcategory'), url(r'^descubre/(?P<category>\w+)/(?P<subcategory>\w+)/$', Sub_category_view_filter.as_view(), name='detailsubcategory'), url(r'^encuentra/$', Users_view.as_view() , name='encuentra'), url(r'^register/$', Register.as_view(), name='register'), url(r'^login/$', Login.as_view(), name='login'), url(r'^register/perfil/$', Create_profile.as_view(), name='createprofile'), url(r'^logout/$', views.user_logout, name='logout'), url(r'^configuracion/(?P<username>\w+)/$', login_required(Settings.as_view()), name='settings'), url(r'^crea/$', login_required(Create_project.as_view()), name='create'), url(r'^crea/habilidad/$', login_required(Create_skill.as_view()), name='createSkill'), url(r'^froala_editor/', include('froala_editor.urls')), #url(r'^mensajes/', include('postman.urls', app_name='postman')),
from django.conf.urls import url, include from views import Home from views import Adm urlpatterns = [url(r'^$', Home.as_view()), url(r'adm/$', Adm.as_view())]
class App(QMainWindow): def __init__(self, parent=None, width=0, height=0): super(App, self).__init__(parent) self.home = Home() self.resize(width, height) # self.showMaximized() self.home.setupUi(self) try: self.auth = Auth(self.home, self) except TypeError: settings = QSettings() settings.clear() QMessageBox.warning( parent, "Error", "Your Application Data is Corrupted, Restart the application") sys.exit() self.home.manLecturerBtn.clicked.connect(self.manLecturePage) self.home.manCoursesBtn.clicked.connect(self.manCoursePage) self.home.manLectHallBtn.clicked.connect(self.manLectHallPage) self.home.manClassRepsBtn.clicked.connect(self.manClassRepPage) self.home.courseGrading.clicked.connect(self.viewGradingPage) self.home.getGrading.clicked.connect(self.getRecentGrades) self.home.chngResource.clicked.connect(self.getCumulatedGrades) self.home.levelCombo.currentIndexChanged.connect(self.loadLecturers) self.home.lecturerCombo.currentIndexChanged.connect( self.loadCourseList) self.home.cr_level.currentIndexChanged.connect(self.loadcr) self.home.cr_list.itemDoubleClicked.connect(self.update_cr) self.home.lectList.itemDoubleClicked.connect(self.update_lect) self.home.aboutButton.clicked.connect(self.dispAbout) self.home.settingBtn.clicked.connect(self.settingsPage) def manLecturePage(self): self.home.setActiveButton(self.home.manLecturerBtn) self.home.stackedWidget.setCurrentIndex(4) self.auth.manLecturers(f='init') self.home.addLecturer.clicked.connect(self.auth.manLecturers) def manLectHallPage(self): self.home.setActiveButton(self.home.manLectHallBtn) self.home.stackedWidget.setCurrentIndex(2) self.auth.loadLectHall() self.home.addVenue.clicked.connect(self.auth.addLectHall) def manCoursePage(self): self.home.setActiveButton(self.home.manCoursesBtn) self.home.stackedWidget.setCurrentIndex(3) self.auth.loadCourse() self.home.addCourseBtn.clicked.connect(self.auth.addCourse) def manClassRepPage(self): self.home.setActiveButton(self.home.manClassRepsBtn) self.home.stackedWidget.setCurrentIndex(5) self.auth.loadcr() self.home.addcrBtn.clicked.connect(self.auth.addcr) def viewGradingPage(self): self.home.setActiveButton(self.home.courseGrading) self.home.stackedWidget.setCurrentIndex(1) def settingsPage(self): self.home.setActiveButton(self.home.settingBtn) self.home.stackedWidget.setCurrentIndex(6) def loadCourseList(self): self.auth.loadCourseList() def loadLecturers(self): self.auth.loadLecturers() def loadcr(self): self.auth.loadcr(l='input') def getRecentGrades(self): self.auth.getGrades(t="r") def getCumulatedGrades(self): self.auth.getGrades(t="c") def addLecturers(self): self.auth.addLecturers() def update_cr(self): self.auth.update_cr() def update_lect(self): index = self.home.lectList.currentRow() modLect = Mod_Lecturer(self.auth.lect[index], self.auth.courses, self) # mod_cr = modClassRep.Mod_cr() modLect.exec_() self.close() self.auth.update_lect() def update_course(self): modCourse = modCourse.Mod_Course() def dispAbout(self): x = About() x.exec_()
from views import Shortner, DisplayShortn, Home, FilterShortner urls = [('/', ['GET'], Home.as_view('home')), ('/short', ['POST'], Shortner.as_view('shortner')), ('/<shortnerId>', ['GET', 'PUT', 'DELETE'], DisplayShortn.as_view('nnn')), ('/json/<shortnerId>', ['GET'], FilterShortner.as_view('khn'))]
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url, include from views import Home, HashtagView urlpatterns = patterns('', url(r'^$', Home.as_view(), name='twitter-home'), url(r'^hashtags/$', HashtagView.as_view(), name='twitter-hashtag'), )
from django.conf.urls import url, include from django.contrib import admin from django.views.generic import TemplateView from views import Home, ResetDB urlpatterns = [ url(r'^$', Home.as_view()), url(r'^resetdb', ResetDB.as_view()), url(r'^admin/', admin.site.urls), url(r'^bitcoin/', include('bitcoin.urls')), url(r'^ethereum/', include('ethereum.urls')), ]
#coding=utf-8 from django.conf.urls import patterns, include, url from views import Home, UploadData, NodesList, NodeMod, LatestData, NodeData, LatestPlot, NodePlot, History, Data, Nodes, Team urlpatterns = patterns( 'iaq.views', # 首页 url(r'^$', Home()), url(r'^histories.html$', History()), url(r'^data.html$', Data()), url(r'^nodes.html$', Nodes()), url(r'^team.html$', Team()), # 设备管理接口 url(r'^nodes/$', NodesList()), url(r'^nodes/(?P<node_id>\d{1,4})/$', NodeMod()), # 数据查看接口 url(r'data/$', LatestData()), url(r'^data/(?P<node_id>\d{1,4})/query/$', NodeData()), # 绘图接口 url(r'^plot/$', LatestPlot()), url(r'^plot/(?P<node_id>\d{1,4})/query/$', NodePlot()), # 节点数据上传接口 url(r'^upload/$', UploadData()), #more to add... )
from django.utils.decorators import method_decorator #custom from views import Home, Test, Landing, Login, Logout, Register, Jars from myproject import settings from django.shortcuts import render, redirect '''UTILTIES: MAybe move this somewhere else''' def anonymous_required(func): def as_view(request, *args, **kwargs): redirect_to = kwargs.get('next', settings.ANON_REDIRECT_URL) if request.user.is_authenticated(): return redirect('home') response = func(request, *args, **kwargs) return response return as_view urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^home/',login_required(Home.as_view()), name='home'), url(r'^test/', login_required(Test.as_view()), name='test'), url(r'^jars/', login_required(Jars.as_view()), name='jars'), url(r'^accounts/logout', login_required(Logout.as_view()), name='logout'), url(r'^accounts/login/', anonymous_required(Login.as_view()), name='login'), url(r'^accounts/register/', anonymous_required(Register.as_view()), name='register'), url(r'^$', anonymous_required(Landing.as_view()), name='landing') ]
) urlpatterns += staticfiles_urlpatterns() urlpatterns += patterns('', # Examples: # url(r'^$', 'lunarwhale.views.home', name='home'), # url(r'^lunarwhale/', include('lunarwhale.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), # Add a home page html for project url(r'^home/$', Home.as_view(), kwargs={'text':'Welcome to the Lunar Whale.'}, name="home"), # If this was url(r'^/$', home), you would have to visit domain// # If you remove the $, it works as a catch all url(r'^$', Home.as_view(), kwargs={'text':'Welcome to the Lunar Whale.'}, name="home"), ) # Add the name of the app and the url file it has. Now all of the urls for # this app can be included in that specific file, which allows for greater # portability urlpatterns += patterns('', (r'^galleries/', include('photomanager.urls'),) )
from django.conf.urls import url from croplet_demo.croplet.views import authorize from views import Home, MapView, callback urlpatterns = [ url(r'^$', Home.as_view(), name="home"), url(r'map/$', MapView.as_view(), name="map"), url(r'authorize/$', authorize, name="authorize"), url(r'callback/$', callback, name="callback"), ]
from django.conf.urls import patterns, url from django.contrib.auth.decorators import login_required from views import (Home, Login, Logout, StaffList, AddStaff, DeleteStaff, CheckStaffUserExists, \ SearchStaff, SetPermissions, Salesmen, DeleteSalesman, SearchSalesman, ShopeDetails, Incentives, \ SalesmanSales) urlpatterns = patterns('', url(r'^$', login_required(Home.as_view(), login_url="login"), name="dashboard"), url(r'^login/$', Login.as_view(), name="login"), url(r'^logout/$', Logout.as_view(), name="logout"), url(r'^staffs/$', login_required(StaffList.as_view(), login_url="login"), name="staffs"), url(r'^add_staff/$', login_required(AddStaff.as_view(), login_url="login"), name="add_staff"), url(r'^delete_staff/$', login_required(DeleteStaff.as_view(), login_url="login"), name="delete_staff"), url(r'^check_staff_user_exists/$', login_required(CheckStaffUserExists.as_view()), name='check_staff_user_exists'), url(r'^search_staff/$', login_required(SearchStaff.as_view(), login_url="login"), name='search_staff'), url(r'^salesmen/$', login_required(Salesmen.as_view(), login_url="login"), name="salesmen"), url(r'^delete_salesman/$', login_required(DeleteSalesman.as_view(), login_url="login"), name="delete_salesman"), url(r'^search_salesmen/$', login_required(SearchSalesman.as_view(), login_url="login"), name='search_salesmen'), url(r'^permissions/$', login_required(SetPermissions.as_view(), login_url="login"), name='permissions'), url(r'^shope/$', login_required(ShopeDetails.as_view(), login_url="login"), name='shope'), url(r'^incentives/$', login_required(Incentives.as_view(), login_url="login"), name='incentives'), url(r'^salesman/sales/$', login_required(SalesmanSales.as_view(), login_url="login"), name='salesman_sales'), )
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf.urls import url from views import (ShowNews, NewsDetail, ImportantShow, MostImportantShow, TodaySort, MonthArchive, Search, Home) urlpatterns = [ url(r'^$', Home.as_view(), name="home", ), url(r'^home/$', ShowNews.as_view() ), url(r'^home/detail/$', NewsDetail.as_view() ), url(r'^home/important/$', ImportantShow.as_view() ), url(r'^home/most_important/$', MostImportantShow.as_view() ), url(r'^home/today_sort/$',
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() from views import Home urlpatterns = patterns( "", url(r"^$", Home.as_view(), name="home"), url(r"^t/", include("style_markup.transformer.urls")), # url(r'^_ad/', include(admin.site.urls)), )
from django.conf.urls import patterns, include, url import django_sanction.urls from views import ( Home, Profile, Error ) # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'example.views.home', name='home'), # url(r'^example/', include('example.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), url(r"^o/", include(django_sanction.urls)), url(r"^o/error", Error.as_view()), url(r"^$", Home.as_view()), url(r"^accounts/profile/$", Profile.as_view()), )
app.cli.add_command(commands.import_data) app.cli.add_command(commands.list_weather) @app.before_request def before_request(): config.DATABASE.connect() @app.after_request def after_request(response): config.DATABASE.close() return response app.add_url_rule('/', view_func=Home.as_view('home')) app.add_url_rule('/humidity', view_func=ExploreHumidity.as_view('explore_humidity')) app.add_url_rule('/humidity-datalist', view_func=HumidityDataAsList.as_view('humidity_datalist')) app.add_url_rule('/station', view_func=ExploreStation.as_view('explore_station')) app.add_url_rule('/station-datalist', view_func=StationDataAsList.as_view('station_datalist')) app.add_url_rule('/temperature', view_func=ExploreTemperature.as_view('explore_temperature')) app.add_url_rule( '/temperature-datalist', view_func=TemperatureDataAsList.as_view('temperature_datalist')) app.add_url_rule('/ajax/stations/<state>', view_func=AjaxGetStations.as_view('ajax_stations'))
from django.conf.urls import url, include from views import Home from views import Adm from views import JSHome urlpatterns = [ url(r'^friskby/adm/$' , Adm.as_view()), url(r'friskby/$' , Home.as_view()), url(r'^$' , JSHome.as_view()) ]
# coding=utf-8 """Urls for changelog application.""" from django.conf.urls import patterns, url from django.conf import settings from views import Home, custom_404 urlpatterns = patterns( '', # basic app views url(regex='^$', view=Home.as_view(), name='home'), ) # Prevent cloudflare from showing an ad laden 404 with no context handler404 = custom_404 if settings.DEBUG: # static files (images, css, javascript, etc.) urlpatterns += patterns( '', (r'^media/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT }))
import apps.sales.urls import apps.workshop.urls import apps.consult.urls from views import Home urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^$', 'django.contrib.auth.views.login',{'template_name': 'login.html'}, name='login'), url(r'^change-password/$','django.contrib.auth.views.password_change', { 'template_name': 'change-password.html', }, name='change-password'), url(r'change-password-done/$','django.contrib.auth.views.password_change_done', { 'template_name': 'login.html', }, name='password_change_done'), url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name="logout"), url(r'^home/$', login_required(Home.as_view()),name='home'), url(r'^manager/', include(apps.manager.urls)), url(r'^inventory/', include(apps.inventory.urls)), url(r'^sales/', include(apps.sales.urls)), url(r'^workshop/', include(apps.workshop.urls)), url(r'^consulta/', include(apps.consult.urls)), )