My project is named 'pages', and when I runserver I get this error. Anybody have any clue how to fix this error.
Page not found (404)
Request Method: GET Request URL: http://127.0.0.1:8000/ Using the
URLconf defined in pages_project.urls, Django tried these URL
patterns, in this order: admin/ The empty path didn't match any of
these. You're seeing this error because you have DEBUG = True in your
Django settings file. Change that to False, and Django will display a
standard 404 page.
My settings.py file looks like this:
"""
Django settings for pages_project project.
Generated by 'django-admin startproject' using Django 2.0.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '*u)%-zmf=2g-c*3z2-&=n=asty5v36n62^90_u*-#83!wb=)eq'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'pages', # new
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'pages_project.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'pages_project.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
And my urls.py in my 'pages' folder is
from django.urls import path
from . import views
urlpatterns = [
path(' ', views.HomePageView.as_view(), name='home'),
]
Any help would be greatly appreciated. Thanks.
The error is telling you that the main urls.py only includes the admin pattern. You also need to include the pages urls.
Also, you have a space in your path pattern. Remove it.
You have a space in your path; ' '. This would mean that the url is http://127.0.0.1:8000/%20. Delete the space.
path('', views.HomePageView.as_view(), name='home')
You project urls: Remove the space
pages/urls.py
urlpatterns = [
path(r'^$', views.HomePageView.as_view(), name='home'),
]
Add your app urls at your project urls so that way your project can see your app url
projectName/urls.py
from django.conf.urls import include, url
from django.contrib import admin
from django.conf import settings
from django.views.static import serve
urlpatterns = [
...
url(r'^', include('pages.urls')),
]
Related
I am trying to create django authentication but I am not able to redirect to a specific page.
Here is my urls.py file. I think the error may be in this file but I am not able to get it.
"""demo_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.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, include
from django.contrib.auth import views as auth_views
from blog.forms import LoginForm
urlpatterns = [
path('admin/', admin.site.urls),
path('blogs/', include('blog.urls', namespace='blogs')),
path('login/', auth_views.LoginView.as_view(template_name='blog/login.html', authentication_form=LoginForm), name='login'),
]
The problem is on clicking the login button the url comes as http://localhost:8000/login/blogs/get_blogs instead of http://localhost:8000/blogs/get_blogs/.
Here is the settings.py file.
"""
Django settings for demo_project project.
Generated by 'django-admin startproject' using Django 4.0.3.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-5c^1lok8qf$x0vo-ey3iuzksgh!#7$x&!0x*tb0!6-odgk8p(3'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'blog.apps.BlogConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'demo_project.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'demo_project.wsgi.application'
# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
# Password validation
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/4.0/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.0/howto/static-files/
STATIC_URL = 'static/'
LOGIN_REDIRECT_URL = 'blogs/get_blogs'
# Default primary key field type
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
As you can see that I have set LOGIN_REDIRECT_URL = 'blogs/get_blogs' but still this issue is coming.
[Here is the link to the git repository] (https://github.com/AnshulGupta22/demo-project)
I am new to django so some help will be appreciated.
You are working with a relative URL. But it is likely better to here work with the name of the path, so set the LOGIN_REDIRECT_URL setting [Django-doc] to:
# settings.py
LOGIN_REDIRECT_URL = 'blog:get_blogs'
I've been trying to create a blog with django using my phone and so far until yesterday it has been a success. I was creating my home page yesterday and when I run python manage.py runserver it returns a template not found error. What can be the issue?
This is my views.py
from django.shortcuts import render
# Create your views here.
def home(request):
returnrender(request,'newfile.html')
This is my urls.py
from django.urls import path
from . import views
urlpatterns = [
path('', views.home, name="homepage"),
]
This is my settings.py
"""
Django settings for myproject project.
Generated by 'django-admin startproject' using Django 3.2.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
import os
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-#o12m78t3=13)#m-o^-ejlp#g!-0gz64fiwx%+raw753+=g2)r'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS =
[
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'myapp',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'myproject.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
I made sure to avoid any spelling errors or indentation errors. What can be the problem?
First you should not post your secret key here.
Than you do have a a spelling error in def home(request):
returnrender(request,'newfile.html')
If thats correct on your local project:
What is the path to your templatefile ?
It should be: myapp/template/myapp/home.html
I've followed the Django 3 documentation to set my static file on my web .And i did load static in my template , but it still keeps tell me that the static tag is invalid . im super confused and dont know wheres the problem? Have anyone face this kind of problem ?
Error like this
TemplateSyntaxError at /
Invalid block tag on line 8: 'static'. Did you forget to register or load this tag?
Heres my directory structure
mblog/
|---maonsite/
|---mblog/
|---static/
|---css
|---js
|---images
|---templates
|---index.html
|---product.html
And heres the setting.py
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '^)azutlc_vkzxpw4ghw#b$+q6g)5&%lsamt)s0i*k*gdvw###b'
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'maonsite',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'mblog.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR,'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
STATIC_URL = '/static/'
STATICFILES_DIRS=[os.path.join(BASE_DIR, "static"),
'/var/www/static/',]
views.py
from django.shortcuts import render
from django.http import HttpResponse
from . models import Post
# Create your views here.
def homepage(request): #index.html
return render(request,'index.html')
def productpage(request):
return render(request,'product.html')
and urls.py
from django.contrib import admin
from django.urls import path
from maonsite.views import homepage,productpage
urlpatterns = [
path('admin/', admin.site.urls),
path('',homepage),
path('product/',productpage),
]
Im appreciated for anyone who give me any piece of advice or solution
thx
Django: 3.0.7 Python: 3.8.3
In your main urls.py, have you added static URLs?
# urls.py
from . import settings
urlpatterns = [
...
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
For this to work, your settings.py file should have these variables defined
# settings.py
...
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
Finally, in your templates, make sure you have this line
{% load static %}
I just set up my own Django server but I am having trouble with the admin page. When I try adding or deleting users or basically whenever I send POST request from Django admin page, I am getting the following error:
Raised by: django.contrib.admin.options.changelist_view
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
^admin/
^register/$ [name='register']
^$
^login/$ [name='login']
^static\/(?P<path>.*)$
The current path, auth/user/, didn't match any of these.
Normal pages work fine. I am only getting the errors on Admin page.I tried doing python manage.py migrate but there are no migrations to apply. I am guessing this has to do with urls.py or settings.py files. re_path('^admin/', admin.site.urls) url pattern is already there, I am not sure why it is still giving the error.
Path structure:
-root
-mysite
-urls.py
-settings.py
-wsgi.py
-views.py
-forms.py
-templates
-static
-passenger_wsgi.py
-manage.py
This is my urls.py file:
from django.urls import re_path
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
admin.autodiscover()
urlpatterns = [
re_path('^admin/', admin.site.urls),
re_path('^register/$', register_page, name='register'),
re_path('^$', home_page),
re_path('^login/$', login_page, name='login'),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
And this is settings.py
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = 'key'
DEBUG = True
ALLOWED_HOSTS = ['myip']
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'mysite',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'mysite.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'mysite.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
STATIC_URL = '/static/'
'''
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
'''
STATIC_ROOT = '/home/referpay/rp/static'
Shot in the dark here, but what happens if you try this?
from django.urls import path
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('admin/', admin.site.urls),
path('register/', register_page, name='register'),
path('', home_page),
path('login/', login_page, name='login'),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
I could not find models.py in your application. I noticed something strange, you are putting the views and forms code of an application in the settings folder. In django, after we started a project with django-admin.py startproject mysite, we added a new app with the command django-admin.py startapp app_name. Django will create a folder with the name of the application where you will write the models, forms and views of that application.
I suggest you follow the django tutorial: https://docs.djangoproject.com/en/2.1/intro/tutorial01/
It was because SCRIPT_NAME was being set to a relative path and not the root of the application. I had to make the following changes to passenger_wsgi.py:
import imp
import os
import sys
import mysite.wsgi
sys.path.insert(0, os.path.dirname(__file__))
SCRIPT_NAME = ''
class PassengerPathInfoFix(object):
"""
Sets PATH_INFO from REQUEST_URI since Passenger doesn't provide it.
"""
def __init__(self, app):
self.app = app
def __call__(self, environ, start_response):
from urllib.parse import unquote
environ['SCRIPT_NAME'] = SCRIPT_NAME
request_uri = unquote(environ['REQUEST_URI'])
script_name = unquote(environ.get('SCRIPT_NAME', ''))
offset = request_uri.startswith(script_name) and len(environ['SCRIPT_NAME']) or 0
environ['PATH_INFO'] = request_uri[offset:].split('?', 1)[0]
return self.app(environ, start_response)
application = mysite.wsgi.application
application = PassengerPathInfoFix(application)
I have build a realtime notification app using Django(1.8.5). I am using django server, Nodejs as push server, ishout.js[nodejs+redis +express.js API]. So I installed them by following the instructions.
Kindly suggest how this error can be fixed :
settings.py file
"""
#Django settings for realtimenotif project.
Generated by 'django-admin startproject' using Django 1.8.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'gvvs-0*-cohfbm#()*nyt&0u!77sc_8vnw%1afpkmhi&y-6&ds'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ADMINS = (
#'arunsingh','arunsingh.in#gmail.com'
)
MANAGERS = ADMINS
ALLOWED_HOSTS = ["*"]
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'drealtime',
'sendnotif',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'drealtime.middleware.iShoutCookieMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
)
ROOT_URLCONF = 'realtimenotif.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'debug':DEBUG,
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'realtimenotif.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
#The following settings are not used with sqlite3:
'USER':'',
'PASSWORD':'',
'HOST':'', # Empty for localhost through domain sockets,127.0.0.1
'PORT':'', # Set to empty string for default
}
}
# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/
STATIC_URL = '/static/'
urls.py file
"""realtimenotif URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/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. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import patterns, include, url
#from sendnotif.views import home, alert
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(['',
url(r'^$', 'sendnotif.views.home', name='home'),
#url(r'^$', home, name='home'),
url(r'^alert/$', 'sendnotif.views.alert', name='alert'),
#url(r'^alert/$', alert, name='alert'),
url(r'^accounts/login/$','django.contrib.auth.views.login',name='login'),
#uncomment the next line to enable the admin:
url(r'^admin/$', include(admin.site.urls)),
] )
Django server is starting, it says works and gives this message
"You're seeing this message because you have DEBUG = True in your
Django settings file and you haven't configured any URLs. Get to
work!"
What changes I have to make in my settings.py and views.py file, Kindly suggest pointers to workaround. I have gone through official django documentation and beginner tutorials, but to no rescue.
You can see the project source code at githubRepo
Django fails to find your urls.py file.
You need to point the root URLconf at the realtimenotif.urls module. Create a top level urls.py and use an include(), eg:
yoursite/urls.py:
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^/', include('realtimenotif.urls')),
url(r'^admin/', include(admin.site.urls)),
]
or alternatively move your urls.py from realtimenotif to the top level folder.