Hi Vikram,

Am also a few days new into Django but if you are using Python 3, then I
suggest you try without the regular expressions. Update your URLs to the
below and try loading your sites.

polls/urls.py

from django.conf.urls import url
from . import views
urlpatterns = [
    url('', views.index, name='index'),]


mysite/urls.py

from django.contrib import adminfrom django.conf.urls import include, url
urlpatterns = [
    url('', include('polls.urls')),
    url('admin', admin.site.urls),]

Regards
Emma

On 22 April 2018 at 22:10, <[email protected]> wrote:

>  I have made few changes take a look at it and try this one. I hope this
> will work.
>
> On Sunday, April 22, 2018 at 10:53:58 PM UTC+5:30, Avitab Ayan Sarmah
> wrote:
>>
>> polls/views.py
>>
>> from django.http import HttpResponse
>>
>> def index(request):
>>     return HttpResponse("Hello, world. You're at the polls index.")
>>
>>
>> polls/urls.py
>>
>> from django.conf.urls import url
>> from . import views
>> urlpatterns = [
>>     url(r'^$', views.index, name='index'),]
>>
>>
>> mysite/urls.py
>>
>> from django.contrib import adminfrom django.conf.urls import include, url
>> urlpatterns = [
>>     url(r'', include('polls.urls')),
>>     url(r'^admin/', admin.site.urls),]
>>
>> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/fcc6b586-8ab1-4886-9e59-ba4a3d75c3aa%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/fcc6b586-8ab1-4886-9e59-ba4a3d75c3aa%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 [email protected].
To post to this group, send email to [email protected].
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/CAJO1krDRsHM-3LzS-Mb%3DmsQtMuoFwjKpFC4rCRyTGEtAa9cnKg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to