Yes it could be how you have set up your directories. You could try
from django.conf.urls import include, url
from django.contrib import admin
from myproject.polls import views
urlpatterns = [
url(r'^polls/', include('polls.urls')),
url(r'^admin/', admin.site.urls),
]
On Mon, Feb 1, 2
Is it possible that that the way the sys and user paths are set up can
cause this problem. When I used the command prompt of python from the
python directory I received the error, however, when I changed the
directory to c:\djangoprojects\mysite\polls and then imported views it
worked fine.
What is your app name? are you sure the name is polls??. The solution i
mention works.
On Mon, Feb 1, 2016 at 9:32 AM, jfragos via Django users <
django-users@googlegroups.com> wrote:
> I tried your solution and had the same results
>
> from django.conf.urls import include, url
> from django.cont
I tried your solution and had the same results
from django.conf.urls import include, url
from django.contrib import admin
from polls import views
urlpatterns = [
url(r'^polls/', include('polls.urls')),
url(r'^admin/', admin.site.urls),
]
RESULTS
Traceback (most recent call last):
File
The problem is how you import your views form your urls.py
you have to import also your poll views from mysite urls.py
you should try this:
mysite--->mysite--->urls.py
from django.conf.urls import patterns, include, url
from django.contrib import admin
from poll import views
urlpatterns = patt
That is something I have tried. When I do it that way and run the program
there is no error. However, when I attempt to start the server from the
command prompt I am presented with the following meesages which ends with
'Import error: No module named views'
c:\djangoprojects\mysite>python mana
please try:
from polls import views
or
import views
On Sun, Jan 31, 2016 at 6:59 PM, jfragos via Django users <
django-users@googlegroups.com> wrote:
> Thank you for the response. Since there are 2 of them I have posted
> both. I have highlighted in yellow the places where they reside. I have
Thank you for the response. Since there are 2 of them I have posted both.
I have highlighted in yellow the places where they reside. I have also
attached the outer directory structure showing c:\djangoprojects and also a
shot of the mysite structure. I set this up as per the tutorial
instru
can you post your urls.py
On Sun, Jan 31, 2016 at 5:04 PM, jfragos via Django users <
django-users@googlegroups.com> wrote:
> Hi,
> I am very new to Python and Django but not to programming. I have
> been programming for 30 years. That said I am trying to work my way thru
> the Django tutorial pa
Hi,
I am very new to Python and Django but not to programming. I have
been programming for 30 years. That said I am trying to work my way thru
the Django tutorial part 1 and I am confronted with the following error I
can't get past:
Traceback (most recent call last):
File "urls.py", line 3, in
10 matches
Mail list logo