drwxr-xr-x 4 root root 4096 May  5 20:12 .
drwxr-xr-x 3 root root 4096 May  5 19:09 ..
-rw-r--r-- 1 root root  255 May  5 19:09 manage.py
drwxr-xr-x 2 root root 4096 May  5 22:51 provisioning
drwxr-xr-x 3 root root 4096 May  5 22:22 vmware

my project ursl is as follows

from django.conf.urls import patterns, include, url

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'provisioning.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(admin.site.urls)),
    url(r'^customers/', include(vmware.urls)),    <----I'm assuming its 
myapp.urls my app is called vmware
)


under the vmware/urls.py I have 


from django.conf.urls import patterns, include, url
from django.view.generic import ListView
from vmware.models import Customer

urlpatterns = patterns('',
                      url(r'^customers/', ListView.as_view(
                                
queryset=Customer.objects.all().order_by"-id")[:100],
                                template_name="VMS.html")),
)

but when i run the server i get the following error

Environment:


Request Method: GET
Request URL: http://23.239.206.142:8001/admin/

Django Version: 1.6.4
Python Version: 2.7.3
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'vmware')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')


Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" 
in get_response
  101.                 resolver_match = resolver.resolve(request.path_info)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" 
in resolve
  337.             for pattern in self.url_patterns:
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" 
in url_patterns
  365.         patterns = getattr(self.urlconf_module, "urlpatterns", 
self.urlconf_module)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" 
in urlconf_module
  360.             self._urlconf_module = import_module(self.urlconf_name)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py" in 
import_module
  40.         __import__(name)
File "/root/djangoprojects/provisioning/provisioning/urls.py" in <module>
  12.     url(r'^customers/', include(vmware.urls)),

Exception Type: NameError at /admin/
Exception Value: name 'vmware' is not defined


but under installed apps vmware is defined

and Customer is my model name


-- 
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/10ae25b8-0930-41fc-b84e-55e56075aaa2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to