to be honest I haven't used Django in a while so take what I'm saying as
wrong - but shouldn't the url be
url(r'hello/$', views.hello, name='hello'),
Not sure you need "^" although I doubt it hurts.
Johnf
On 07/05/2017 02:23 PM, ahickm...@tamu.edu wrote:
So I literally just started django, I know 0 about backend dev, but im
going through the djangobook tutorial (also, please excuse me if I use
the wrong syntax). He shows us how to get content to show up on our
temporary domain (a simple Hello World).
The hello world setup looks like so, with the file named views.py,
located in the same directory as urls.py
from django.httpimport HttpResponse
def hello(request): return HttpResponse("Hello world")
And the urls.py file looks like this
from django.conf.urlsimport url
from django.contribimport admin
from mysite.viewsimport hello
urlpatterns= [ url(r'^admin/', admin.site.urls),
url(r'^hello/$', hello),
]
I feel like somethings wrong with the path, or something like that?
I'm kinda of clueless at this point though, I've been working on it
for a while. I don't even know how to go about de-bugging, since this
is vastly different from coding a simple "get all the odd numbers from
a list" problem.
Thanks
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to django-users+unsubscr...@googlegroups.com
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/7c751df1-c209-455c-bf83-f5fa2ddf3d8b%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/7c751df1-c209-455c-bf83-f5fa2ddf3d8b%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/1e166301-5b58-670e-b204-c003205adef9%40jfcomputer.com.
For more options, visit https://groups.google.com/d/optout.