Hello,

I'm not expert but have seen this behavior when I have a bad import.
I would start by trying  ./manage.py shell and copy past your imports
from models and then views or other imports.  It's almost always been
a bad import when I've seen this and ./manage.py syncd will fail
silently and ./manage.py validate won't find any errors.  Hope this
helps let us know what you find please.

Mark

On Nov 15, 4:12 pm, Joshua Kramer <joskr...@gmail.com> wrote:
> Howdy Everyone!
>
> After having installed a fresh version of Pinax 0.7.1, I have an
> interesting problem with the behavior of Django when I try to install
> custom applications.
>
> In my main project directory, I've created an 'apps' directory, and
> created some standard django skeleton apps.  When I tried to run
> 'syncdb', I noticed the tables were not created for my models.
>
> After some amount of tracing, I found out that Django is not
> registering my apps, with my models.  With skeleton models the apps
> register fine.  When I say 'register', I mean this: I detect if an app
> is registered or not by doing this in manage.py:
>
> from django.db import models
> myApps = models.get_apps()
>
> I then look through the myApps list to see if my apps are present.  I
> note that all of the Pinax apps are always present.
>
> Here is an example.  This model causes the app to not register:
>
> -------
> from django.conf import settings
>
> from django.contrib.gis.db import models
> from django.contrib.localflavor.us.models import USStateField
>
> class Zipcode(models.Model):
>    code = models.CharField(max_length=10)
>    poly = models.PolygonField()
>    objects = models.GeoManager()
>
> class Address(models.Model):
>    addrKey = models.CharField(max_length=32)
>    num = models.IntegerField()
>    street = models.CharField(max_length=128)
>    city = models.CharField(max_length=64)
>    state = USStateField()
>    zipcode = models.ForeignKey(Zipcode)
>    objects = models.GeoManager()
> -----
>
> This code allows the app to register:
>
> ----
> from django.db import models
> ----
>
> Has anyone seen this before?
>
> Thanks,
> -Josh

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=.


Reply via email to