read the django tutorial first. There is good django tutorial on the official site and also there is "django girls" tutorial on the internet. Both of them is good. Django doesn't see your urlconf. See at error, django find only ^admin/ regex. Your regex is not finded, so you have to edit you urls.py file. There is so mess inside it. Write it like this:
urls.py file
from django.conf.urls import url, include
from django.contrib import admin
from . import views
urlpatterns=[
url('r^admin/', admin.site.urls),
url('r^hello/', views.hello),
]
The dot sign '.' means the current directory. You are importing views.py file from current directory, and then call hello view from it, like this views.hello.
I think, it's also possible to write "from .views import hello", and use this view just by name 'hello', without writing "view." before it, but I don't this way, because using views.hello is more logical and clear.
20.08.2016, 17:36, "Anahita Hedayati-Fard" <a.hedayat...@gmail.com>:
Hello--
I'm a beginner in Django.
I'm trying to write my first URlconf but it doesn't work and it shows me 404 error just like this:
And this my code on urls.py:
And this is my code on views.py :
And I ran the python manage.py runserve too.
What is the problem here?
*Sorry for my English.
--
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/967673b8-07f4-416e-ad61-ad489c9826d2%40googlegroups.com.
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/340541471880459%40web13o.yandex.ru.
For more options, visit https://groups.google.com/d/optout.