G Z, That is a somewhat odd project structure. Also, the ls you posted: directory structure provisioning is the project vmware is the app. 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 6 11:15 provisioning drwxr-xr-x 3 root root 4096 May 6 11:15 vmware
Does not match the path you posted: /djangoprojects/provisioning/vmware/modesl.py In particular there is not __init__.py in that root folder, so imports cannot traverse through it. Take a look at https://github.com/twoscoops/django-twoscoops-project for a project layout. If you use that the project_name would be provisioning and you would put the vmware app in <https://github.com/twoscoops/django-twoscoops-project/commits/develop/project_name/project_name> django-twoscoops-project<https://github.com/twoscoops/django-twoscoops-project>/ project_name<https://github.com/twoscoops/django-twoscoops-project/tree/develop/project_name>/ *project_name* / Have you done the tutorial on django yet? I think you will find the answer to most of the questions you have posted if you walk through and do the tutorial: https://docs.djangoproject.com/en/1.6/intro/tutorial01/ Kirby On Tuesday, May 6, 2014 12:38:22 PM UTC-5, G Z wrote: > > I'm running 1.6.4 >> >> Project Structure > Project name: provisioning > App Name: vmware > > > >> /djangoprojects/provisioning/provisioning/urls.py >> <code> >> >> from django.conf.urls import patterns, include, url >> >> from django.contrib import admin >> admin.autodiscover() >> from . import vmware >> >> 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)), >> ) >> </code> >> >> /djangoprojects/provisioning/vmware/urls.py >> >> <code> >> 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_$ >> queryset=Customer.obje$ >> template_name="VMS.htm$ >> ) >> </code> >> > > /djangoprojects/provisioning/provisioning/settings.py > <code> > >> >> INSTALLED_APPS = ( >> 'django.contrib.admin', >> 'django.contrib.auth', >> 'django.contrib.contenttypes', >> 'django.contrib.sessions', >> 'django.contrib.messages', >> 'django.contrib.staticfiles', >> 'vmware', >> ) >> >> </code> >> >> Directory Structure >> >> directory structure provisioning is the project vmware is the app. >> 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 6 11:15 provisioning >> drwxr-xr-x 3 root root 4096 May 6 11:15 vmware >> >> >> /djangoprojects/provisioning/vmware/modesl.py >> >> <code> > >> from django.db import models >> >> # Create your models here. >> >> class Customer(models.Model): >> NAME = models.CharField(max_length=200) >> WEBSITE = models.CharField(max_length=200) >> PHONE = models.CharField(max_length=200) >> EMAIL = models.CharField(max_length=200) >> ADDRESS = models.CharField(max_length=200) >> VMIDS = models.CharField(max_length=200) >> >> def __unicode__(self): >> return self.NAME >> # return self.NAME >> >> class Vms(models.Model): >> VMID = models.CharField(max_length=200) >> VMNAME = models.CharField(max_length=200) >> VMSTATUS = models.CharField(max_length=200) >> CUSTOMERID = models.ForeignKey(Customer) >> >> class Vmspecs(models.Model): >> CPUS = models.CharField(max_length=200) >> CORES = models.CharField(max_length=200) >> MEMORY = models.CharField(max_length=200) >> HDSPACE = models.CharField(max_length=200) >> OS = models.CharField(max_length=200) >> UPTIME = models.CharField(max_length=200) >> VMID = models.ForeignKey(Vms) >> >> # choice_text = models.CharField(max_length=200) >> </code> >> > > need anything else. > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/80b09896-2598-485c-805e-efa40b35dd81%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.