Thanks very much, that worked! Alok
On Tuesday, June 11, 2013 9:30:26 PM UTC-4, Rahul Gaur wrote: > > Hi, > On Jun 12, 2013 6:53 AM, <asa...@princeton.edu <javascript:>> wrote: > > > > Hi everyone! I'm currently a noob learning Django and Python for the > first time and I have almost no web-development experience so apologies if > this comes across as a stupid question. > > > > I'm trying to get "Hello World" to work and am receiving an import > error. I get the following traceback: > > > > Traceback: > > File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in > get_response > > 103. resolver_match = > resolver.resolve(request.path_info) > > File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in > resolve > > 319. for pattern in self.url_patterns: > > File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in > url_patterns > > 347. patterns = getattr(self.urlconf_module, "urlpatterns", > self.urlconf_module) > > File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in > urlconf_module > > 342. self._urlconf_module = > import_module(self.urlconf_name) > > File "C:\Python27\lib\site-packages\django\utils\importlib.py" in > import_module > > 35. __import__(name) > > File "Z:\PU\02 - Summer\kolapy\mysite\mysite\urls.py" in <module> > > 2. from mysite.views import hello > > > > Exception Type: ImportError at / > > Exception Value: No module named views > > > Try moving views.py in mysite directory and then give it a try. > Traceback suggest that your views should be in mysite folder. > > > > > My project is set up as follows: > > > > mysite/ > > manage.py > > views.py > > mysite/ > > __init__.py > > settings.py > > urls.py > > wsgi.py > > > > > > > > Here are the contents of manage.py: > > > > #!/usr/bin/env python > > import os > > import sys > > > > if __name__ == "__main__": > > os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") > > > > from django.core.management import execute_from_command_line > > > > execute_from_command_line(sys.argv) > > > > > > > > > > Can anyone point me to a solution? I think manage.py is supposed to add > the current directory to the system path so I'm not sure why it's not able > to import the project module. I appreciate whatever help you can offer! > > > > Thanks, > > Alok > > > > -- > > 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 <javascript:>. > > To post to this group, send email to django...@googlegroups.com<javascript:> > . > > Visit this group at http://groups.google.com/group/django-users?hl=en. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.