Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix urls.py bug caused by changes in Django #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions part2/helloworld/helloworld/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
SECRET_KEY = 'h#!izko_ejn@&0g@a#yu$tpuh-a=v$vvcfq5p*y#@2rzfcojn7'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = False

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = []
ALLOWED_HOSTS = [u'gyt-mac.local'] # replace the content by your host name


# Application definition
Expand Down
11 changes: 6 additions & 5 deletions part2/helloworld/helloworld/urls.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
from django.conf.urls import patterns, include, url
from django.conf.urls import include, url
from django.contrib import admin
from helloworld import views

urlpatterns = patterns(
'',
urlpatterns = [
# Examples:
# url(r'^$', 'helloworld.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),

url(r'^admin/', include(admin.site.urls)),

(r'^hello', 'helloworld.views.index'),
url(r'^hello', views.index, name='index'),

]

)