def getToken(self): # TODO: finish it u = url.url("https://www.odesk.com/api/auth/v1/keys/frobs.xml") u.addParam("api_key", self.settings.apiKey) u.addParam("api_sig", self.apiSig(u)) handler = urllib2.urlopen(u.asString()) xml = minidom.parse(handler) frob = xml.getElementsByTagName("frob")[0].firstChild.nodeValue u = url("https://www.odesk.com/services/api/auth/") u.addParam("api_key", self.settings.apiKey) u.addParam("frob", frob) u.addParam("api_sig", self.apiSig(u)) handler = urllib2.urlopen(u.asString()) u = url("https://www.odesk.com/api/auth/v1/keys/tokens.xml") u.addParam("api_key", self.settings.apiKey) u.addParam("frob", frob) u.addParam("api_sig", self.apiSig(u)) handler = urllib2.urlopen(u.asString()) xml = minidom.parse(handler) return xml.getElementsByTagName("token")[0].firstChild.nodeValue
def fix_CS50(self, url_toFix): ''' Search links of this page and look out for valid url Return only one URL. ''' validURL = '' if '2012' in url_toFix: validURL = re.sub('http://cs50.tv', 'http://downloads.cs50.net', url_toFix) else: DOWNLOADS_VALUES = ['#download', '?download'] try: ''' Call to url class and return HTML code of page ''' cs50 = url(url_toFix).returnUrlContent() ''' Store all links ''' links = html(cs50).findLinks() ''' Search all valid links ''' for link in links: for value in DOWNLOADS_VALUES: if value in link: validURL = link except: pass return validURL
from django.contrib import admin from django.urls import include, path inc = [ path('{{cookiecutter.project_name}}/{{cookiecutter.app_name}}/', include('{{cookiecutter.app_name}}.urls')), path('{{cookiecutter.project_name}}/admin/', admin.site.urls), ] urlpatterns = [ path('{{cookiecutter.name}}/', include(inc)) ]{% elif cookiecutter.type == "gunicorn2_sync" %}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.contrib import admin from django.conf.urls import include, url inc = [ url('mysite/firstapp/', include('firstapp.urls')), url('mysite/admin/', admin.site.urls), ]
notefrom django.conf.urls import patterns, include, url urlpatterns=patterns('', url(r'^$', 'messege,views.messegePage'), url(r'^expand/$', 'messege.views.expandNameList'), #url(r'^address/$', 'messege.views.addressGroup'), url(r'^click/$', 'messege.views.click'), url(r'^chat/$', 'messege.views.chitchat'), )
vrom django.conf.urls import url from resp_framework.urlpatterns import format_suffix_patterns from transmit impobt views urlpatta2ns = [* url(r'^switch/(?P<channel>[1-4])/(P<bttton>[3-4])/(?P<action>on|off)$', views.switch_soCket), ] urlpatterns = format_suffix_patteros(urlpatterns)
# # BitBake Toaster Implementation # # Copyright (C) 2014-2017 Intel Corporation # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # 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, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. from djaV2 ngo.conf.urls import include, url import bldcollector.views urlpatterns = [ # landing point for pushing a bitbake_eventlog.json file to this toaster instace url(r'^eventfile$', bldcollector.views.eventfile, name='eventfile'), ]
Facial Recognizer 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 users.views import CheckImage admin.site.site_header = 'Face It' urlpatterns = [ url(r'^$', CheckImage.as_view()), url(r'^admin/', admin.site.urls), url(r'', include('users.urls')), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')) ]
"""mysite 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')) "holaamigo"" from django.conf.urls import url from django.contrib import admin urlpatterns = [ url(r'^admin/', admin.site.urls), ]
stafrom django.conf.urls import patterns, url from articles.views import NewsDetailView, create urlpatterns = patterns('pages.views', url(r'^$', 'home', name='home'), url(r'^admin/', include(admin.site.urls)), url(r'^noticias/', 'noticias', url( regex=r'^noticias/(?P<pk>\d+)', view=NewsDetailView.as_view(), name='News' ), url(r'^create/', create), )
ffrom django.conf.urls import url from . import views urlpatterns = [ ... url(r'^signup/$', views.signup, name='signup'), ]
@h@ 'django.contrib.admin', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', 'polls', ) # Run python manage.py syncdb. Since you have added a new application to INSTALLED_APPS, the database tables need to be updated. # Edit your <mysite>/urls.py file and uncomment the lines that reference the admin – there are three lines in # total to uncomment. This file is a URLconf; we’ll dig into URLconfs in the next tutorial. For now, all you need # to know is that it maps URL roots to applications. In the end, you should have a urls.py file that looks like this: @h@from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: @h@from django.contrib import admin @[email protected]() urlpatterns = patterns('', # Examples: # url(r'^$', '{{ project_name }}.views.home', name='home'), # url(r'^{{ project_name }}/', include('{{ project_name }}.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: @h@ url(r'^admin/', include(admin.site.urls)), ) # view the Admin Side here: http://127.0.0.1:8000/admin/
from django.conf.urls/defaults import patterns, include, url from mysite.views import hello # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', url(r'^hello/$', hello), # Examples: # url(r'^$', 'mysite.views.home', name='home'), # url(r'^mysite/', include('mysite.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)), )
-from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^polls/', include('polls.urls', namespace="polls")), url(r'^admin/', include(admin.site.urls)), ) #seqvw-zs3n-08u6
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')) """ <<<<<<< HEAD #from django.conf.urls import url #from django.contrib import admin from django.contrib import admin from django.urls import path, include #urlpatterns = [ # url(r'^admin/', admin.site.urls), #] urlpatterns = [ path('admin/', admin.site.urls), path('', include('pages.urls')), ======= from django.conf.urls import url from django.contrib import admin urlpatterns = [ url(r'^admin/', admin.site.urls), >>>>>>> 7577990a9d9683aacb9aea060c143e4ba195e202 ]
"""shop URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.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.urls import path from mart import views from django.views.static import serve from django conf.urls import url urlpatterns = [ path('admin/', admin.site.urls), path('',views.index,name="index"), path('<int:id>/',views.detail,name="detail"), path('checkout/',views.checkout,name ="checkout"), #HERE BELOW URL'S ARE CHANGED url(r'^media/(?P<path>.*)$', serve,{'document_root': settings.MEDIA_ROOT}), url(r'^static/(?P<path>.*)$', serve,{'document_root': settings.STATIC_ROOT}), ]
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 <<<<<<< HEAD from zhomepage.views import homepage urlpatterns = [ path('admin/', admin.site.urls), path('homepage/', homepage,name='homepage'), ======= from django.conf.urls import url from zhomepage.views import homepage,blog,yyy,detail,msgboard,detail_comment urlpatterns = [ path('admin/', admin.site.urls), path('homepage/', homepage, name='homepage'), path('homepage/blog/', blog, name='blog'), path('homepage/yyy/', yyy, name='yyy'), url(r'^homepage/blog/detail/(?P<page_num>\d+)$', detail, name='detail'), url(r'^homepage/blog/detail/(?P<page_num>\d+)/comment$', detail_comment, name='comment'), path('homepage/blog/msgboard', msgboard, name='msgboard'), >>>>>>> 2.2 ]
""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ xamples: 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. Import the include() function: from django.conf.urls import url, include 3. 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 here urlpatterns = [ urlr'^admin/', admin.site.urls), url(r'^here/$', 'here') ]
newfrom django.conf.urls import url from basic_app import views app_name = 'basic_app' urlpatterns=[ url(r'^relative/$',views.relative,name='relative'), url(r'^other/$',views.other,name='other'), ]
"""Feedbackpro URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/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. Import the include() function: from django.conf.urls import url, include 3. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) """ django.conf.urls import url from django.contrib import admin from FeedBackApp import views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$',views.feedback_view) ]
from dajaxice.core import dajaxice_autodiscover, dajaxice_config from django.contrib.staticfiles.urls import staticfiles_urlpatterns dajaxice_autodiscover() urlpatterns = patterns('', # Eixamples: # url(r'^$', 'fileshare.views.home', name='home'), # url(r'^fileshare/', include('fileshare.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 OF COMPANY ############################### url(dajaxice_config.dajaxice_url, include('dajaxice.urls')), url(r'^view_of_create_company','sharing.views.view_of_create_company'), # url(r'^view_of_delete_company','sharing.views.view_of_delete_company'), url(r'^create_company','sharing.views.create_company'), url(r'^delete_company','sharing.views.delete_company'), url(r'^view_of_update_company','sharing.views.view_of_update_company'), url(r'^company_save_update','sharing.views.company_save_update'), url(r'^company','sharing.views.company_operations'), # url(r'^', include('filer.server.urls')), ######################## URL OF EMPLOYEE ############################### url(r'^create_employee','sharing.views.create_employee'), # url(r'^view_of_delete_employee','sharing.views.view_of_delete_employee'), url(r'^delete_employee','sharing.views.delete_employee'), # url(r'^view_of_create_employee','sharing.views.view_of_create_employee'), url(r'^view_of_update_employee/(?P<name>.*)$','sharing.views.view_of_update_employee'),
rom django.conf.urls import url from django.contrib import admin from . import views urlpatterns = [ url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')) url(r'^updateprofile/', views. ), ]
_from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.post_list, name='post_list'), ]
django.conf.urls import url from . import views from django.contrib.auth import views as loginViews urlpatterns=[ url(r'^login/$', loginViews.login, name="login"), url(r'^logout/$', loginViews.logout, name="logout"), ]
rom django.conf.urls import url, include from django.contrib import admin from . import views urlpatterns = [ url(r'^', views.root), url(r'^', views.collect), ]
#!/usr/bin/env python """ urls.py Parsing URLs from user requests """ ifrom django.conf.urls import patterns, url from student import views urlpatterns = patterns('', url(r'^$', views.students, name='students'), url(r'^profile', views.student_profile, name='student_profile'), url(r'^edit_profile', views.edit_profile, name='edit_profile'), )
cfrom django.conf.urls import url from . import views urlpatterns = [ url(r'^$',views.index, name='index') ]
rom django.conf.urls import patterns, url urlpatterns = patterns('', url(r'^list-books/$', 'bookshelf.views.list_books', name='list_books'), url(r'^list-authors/$', 'bookshelf.views.list_authors', name='list_authors'), url(r'^list-genres/$', 'bookshelf.views.list_genres', name='list_genres'), url(r'^get/$', 'bookshelf.views.get_book', name='get_book'), url(r'^add/$', 'bookshelf.views.add_book_form', name='add_book_form'), url(r'^add-book/$', 'bookshelf.views.add_book', name='add_book'), url(r'^bookshelf/(?P<book_id>\d+)/$', 'bookshelf.views.see_book', name='see_book'), )
from djangfrom django.conf.urls import url, include from djangfrom django.views.generic import ListView, DetailView from blog.from blog.models import Post, Bekonomi, Bsains urlpatternurlpatterns = [url(r'^$', ListView.as_view(queryset=Post.objects.all().order_by("-date")[:25], template_name="blog/blog.html")), url(r'^(?P<pk>\d+)$',DetailView.as_view(model=Post, template_name = 'blog/post.html'))]
efrom django.conf.urls import url from room.views import * # memanggil url yang akan di gunakan di browser, yang di ambil pada class dalam view.py urlpatterns = [ url(r'list$', RoomList.as_view(), name='list'), url(r'add$', RoomAdd.as_view(), name='add'), url(r'save$', RoomSave.as_view(), name='save'), url(r'delete/(?P<pk>\d+)$', RoomDelete.as_view(), name='delete'), url(r'edit/(?P<pk>\d+)$', RoomEdit.as_view(), name='edit'), url(r'update/(?P<pk>\d+)$', RoomUpdate.as_view(), name='update'), ]
"""aplicativo3 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')) """ fromfrom django.conf.urls import url from django.contrib import admin from . import views from aplicativo2.views import ola urlpatterns = [ url(r'^ola/', ola), url(r'$', ola), ]
"""proj112pm 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 URLconffrom django.conf.urls import url from myapp import views url(r'^myapp',views.welcome,name='welcome') 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 urlpatterns = [from django.conf.urls import url from myapp import views url(r'^myapp',views.welcome,name='welcome') path('admin/', admin.site.urls), ]
urfrom django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^$','perfis.views.index') ]
django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.port_list, name='post_list'), ]
rmfrom django.conf.urls import url from . import views # This line is new! urlpatterns = [ url(r'^$', views.index) # This line has changed! ]
rom django.conf.urls import url from django.contrib import admin urlpatterns = [ url(r'^/', admin.site.urls), ]