somewhere you are trying to do a 'import views' and python can't find nothing with this name,
try using from appname import views On Thu, Nov 14, 2013 at 12:25 PM, Swastik Acharya <[email protected]>wrote: > I m trying to read the html pages > but it shows the folowiing error:: > mportError at /admin/ > > No module named views > > Request Method:GET Request URL:http://127.0.0.1:8050/admin/ Django > Version:1.4.10Exception Type: ImportErrorException Value: > > > No module named views > > Exception > Location:/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py > in import_module, line 35 Python Executable:/usr/bin/python Python > Version:2.7.2Python Path: > > ['/home/swastik/Desktop/django1/vxlp', > '/usr/lib/python2.7', > '/usr/lib/python2.7/plat-linux2', > '/usr/lib/python2.7/lib-tk', > '/usr/lib/python2.7/lib-old', > '/usr/lib/python2.7/lib-dynload', > '/usr/local/lib/python2.7/dist-packages', > '/usr/lib/python2.7/dist-packages', > '/usr/lib/python2.7/dist-packages/PIL', > '/usr/lib/python2.7/dist-packages/gst-0.10', > '/usr/lib/python2.7/dist-packages/gtk-2.0', > '/usr/lib/pymodules/python2.7', > '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', > '/usr/lib/python2.7/dist-packages/ubuntuone-client', > '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', > '/usr/lib/python2.7/dist-packages/ubuntuone-couch', > '/usr/lib/python2.7/dist-packages/ubuntuone-installer', > '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol'] > > Server time: Thu, 14 Nov 2013 04:18:10 -0600 > Traceback Switch to copy-and-paste view <http://127.0.0.1:8050/admin/#> > > - /usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py > in get_response > 1. > > response = callback(request, *callback_args, > **callback_kwargs) > > ... > ▶ Local vars <http://127.0.0.1:8050/admin/#> > - /usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py > in wrapper > 1. > > return self.admin_view(view, cacheable)(*args, **kwargs) > > ... > ▶ Local vars <http://127.0.0.1:8050/admin/#> > - /usr/local/lib/python2.7/dist-packages/django/utils/decorators.py in > _wrapped_view > 1. > > response = view_func(request, *args, **kwargs) > > ... > ▶ Local vars <http://127.0.0.1:8050/admin/#> > - > /usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py > in _wrapped_view_func > 1. > > response = view_func(request, *args, **kwargs) > > ... > ▶ Local vars <http://127.0.0.1:8050/admin/#> > - /usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py > in inner > 1. > > current_app=self.name): > > ... > ▶ Local vars <http://127.0.0.1:8050/admin/#> > - /usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py > in reverse > 1. > > app_list = resolver.app_dict[ns] > > ... > ▶ Local vars <http://127.0.0.1:8050/admin/#> > - /usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py > in app_dict > 1. > > self._populate() > > ... > ▶ Local vars <http://127.0.0.1:8050/admin/#> > - /usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py > in _populate > 1. > > lookups.appendlist(pattern.callback, (bits, p_pattern, > pattern.default_args)) > > ... > ▶ Local vars <http://127.0.0.1:8050/admin/#> > - /usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py > in callback > 1. > > self._callback = get_callable(self._callback_str) > > ... > ▶ Local vars <http://127.0.0.1:8050/admin/#> > - /usr/local/lib/python2.7/dist-packages/django/utils/functional.py in > wrapper > 1. > > result = func(*args) > > ... > ▶ Local vars <http://127.0.0.1:8050/admin/#> > - /usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py > in get_callable > 1. > > lookup_view = getattr(import_module(mod_name), > func_name) > > ... > ▶ Local vars <http://127.0.0.1:8050/admin/#> > - /usr/local/lib/python2.7/dist-packages/django/utils/importlib.py in > import_module > 1. > > __import__(name) > > ... > ▶ Local vars <http://127.0.0.1:8050/admin/#> > > > how to solve this error?? > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > 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/1281eb8c-e338-4d8b-aabd-984fcb684f85%40googlegroups.com > . > 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 [email protected]. To post to this group, send email to [email protected]. 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/CAFWa6t%2BUfcYtPrMCcJEUyku7%2BD7REr5gJgaq6VfnZzyj%2BgPyew%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.

