On 25/04/2015 3:13 AM, JMKoushyar wrote:
> Ho guys, I'm new to django framework. According to Instructions in the
>
djangoproject.com I did all the things and everything was pretty good
> but when I tried to open my django project in browser by "python
> manage.py runserver", I got some errors. The page error is : A server
> error occurred. Please contact the administrator.
It would be helpful to see the code which generates the error. But
anyway, I think it is identified in your stack trace here ...
class_name = dotted_path.rsplit('.', 1)
ImportError: polls doesn't look like a module path
... where you import polls, are you using a backslash anywhere? The
framework is expecting a dot instead of a slash or (in your case) backslash.
For example, you might be using "from myproject\polls import something"
and that should instead be "from myproject.polls import something"
What makes this work is the existence of a (probably empty) file called
__init__.py in each directory on either side of the path separator
(unix/linux/mac slash or windows backslash) so you might also check you
have those __init__.py files in place.
hth
Mike
> --
> 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
django-users...@googlegroups.com
> <mailto:
django-users...@googlegroups.com>.
> To post to this group, send email to
django...@googlegroups.com
> <mailto:
django...@googlegroups.com>.
> Visit this group at
http://groups.google.com/group/django-users.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/django-users/d14d2fde-f022-4234-b4f7-9decc0748a1f%40googlegroups.com
> <
https://groups.google.com/d/msgid/django-users/d14d2fde-f022-4234-b4f7-9decc0748a1f%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit
https://groups.google.com/d/optout.