import error: no model named .....

27 views
Skip to first unread message

Ali Shaikh

unread,
May 17, 2012, 2:58:23 PM5/17/12
to Django users
Hey.......


I am practicing to implement simple examples in django...

started project with
1.django-admin.py startproject wikicamp
2.python manage.py startapp wiki
3.editing the setting
4.python manage.py syncdb
5.python mange.py runserver

till this stage its working fine........:)


But after editing urls.py and views.py ...........i run the server
again that time its showing this error

IMMPORTERROR at ...../..../

NO module named views.......:'(





help pls.............!!!

am getting

ImoprtError at /..../

Nick Legotte

unread,
May 17, 2012, 3:00:39 PM5/17/12
to django...@googlegroups.com

Copy and paste the stacktrace

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Halit Alptekin

unread,
May 17, 2012, 3:02:35 PM5/17/12
to django...@googlegroups.com
You should import models into views.py.

For Example;

from hdyazi.models import *
from hdmakale.models import *
from hdsayfalar.models import *

My models' names are hdyazi,mdmakale,hdsayfalar ...

--
www.halitalptekin.com | Halit Alptekin

Apokalyptica Painkiller

unread,
May 17, 2012, 3:01:19 PM5/17/12
to django...@googlegroups.com
Hello, can you show us your views.py and urls.py?

See you

2012/5/17 Ali Shaikh <shaik...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.




--
I live each day 
Like it's my last 
I live for rock and roll 
I never look back 

I'm a rocker 
Do as I feel as I say 
I'm a rocker
And no one can take that away 


Tanveer Ali Sha

unread,
May 17, 2012, 3:14:47 PM5/17/12
to django...@googlegroups.com
even am getting page not found error 

1.^notes/
the current URL,didnt match any of these 



for that wikicamp example which is available in showmedo.com..........

I donno why I getting these error ...........??:(
 

Andre Terra

unread,
May 17, 2012, 3:19:42 PM5/17/12
to django...@googlegroups.com
Everyone, please follow these guidelines before asking other questions:




Cheers,
AT

Tanveer Ali Sha

unread,
May 17, 2012, 3:23:01 PM5/17/12
to django...@googlegroups.com
Hi  Apokalyptica Painkiller ,

Here is my urls.py and views.py


URLS.PY

from django.conf.urls.defaults import*
from wikicamp.views import hello

urlpattern = patterns(' ',
('^hello/$,hello),
)

VIEWS.py

from django.http import HttpResponse

def hello(request):
 return HttpResponse("hello world")

Nick Legotte

unread,
May 17, 2012, 3:27:00 PM5/17/12
to django...@googlegroups.com
urls.py should look like this


from django.conf.urls.defaults import*
from wikicamp.views import hello

urlpattern = patterns(' ',
('^hello/$',hello),
)

Apokalyptica Painkiller

unread,
May 17, 2012, 3:41:40 PM5/17/12
to django...@googlegroups.com
Hello i'm not sure but did you edited your module.py?

I'm watching your urls.py and i found this: 

('^hello/$,hello),

I'm guessing that there is a syntax mistake, it should be " ('^hello/$', hello) why don't you try that.

See you 

2012/5/17 Tanveer Ali Sha <shaik...@gmail.com>

doniyor

unread,
May 18, 2012, 5:08:04 AM5/18/12
to django...@googlegroups.com
try this

urlpattern = patterns(' ',
url('^hello/$,hello),
)
Reply all
Reply to author
Forward
0 new messages