RLM
unread,May 13, 2019, 3:15:35 AM5/13/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Hi Everyone.
I have been away from Django for the past 18 months and am refreshing to
use it for a complex samples storage project.
Python 3.7, Django 2.2 the LTS fails with too many errors.
Unfortunately I have had this particular error every time I try Django
over the past 18 months which is why I had to resort to HuGo for a
particular web site build.
I feel there is something I have forgotten to do and will appreciate
help understanding why it occurs.
I have researched but no advice helps.
I have seen pages on PYTHONPATH and the like but problem is not solved
and it seems to have been an issue for at least a year.
The project is called Storage, it's app is called samples.
The problem I have is the ModuleNotFoundError: No module named 'samples'.
Where samples is the only app.
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'samples',
root urls/py is:
urlpatterns = [
path('admin/', admin.site.urls),
path('samples/', include('samples.urls')),
]
samples/urls.py is:
from django.urls import path
from . import views
urlpatterns = [
path('',views.index, name='index'),
]
There are no models.
samples/views.py is:
from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return HttpResponse("Hello from the RMH App")
Thanks for any help
Cheers
Roger