well, this is the traceback,
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_manager(settings)
File "/var/lib/python-support/python2.5/django/core/management/
__init__.py", l ine 340, in execute_manager
utility.execute()
File "/var/lib/python-support/python2.5/django/core/management/
__init__.py", l ine 295, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/var/lib/python-support/python2.5/django/core/management/
base.py", line 192, in run_from_argv
self.execute(*args, **options.__dict__)
File "/var/lib/python-support/python2.5/django/core/management/
base.py", line 218, in execute
self.validate()
File "/var/lib/python-support/python2.5/django/core/management/
base.py", line 246, in validate
num_errors = get_validation_errors(s, app)
File "/var/lib/python-support/python2.5/django/core/management/
validation.py", line 28, in
get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/var/lib/python-support/python2.5/django/db/models/
loading.py", line 128 , in get_app_errors
self._populate()
File "/var/lib/python-support/python2.5/django/db/models/
loading.py", line 57, in _populate
self.load_app(app_name, True)
File "/var/lib/python-support/python2.5/django/db/models/
loading.py", line 72, in load_app
mod = __import__(app_name, {}, {}, ['models'])
File "/home/antonios/orchid_demo_dev/../orchid_demo_dev/appname/
models.py", li ne 21, in <module>
class Species_d(models.Model):
File "/home/antonios/orchid_demo_dev/../orchid_demo_dev/appname/
models.py", li ne 31, in Species_d
uLayer = models.ForeignKey(LayersOfUsers)
NameError: name 'LayersOfUsers' is not defined
**
and the model.py imports,
from django.db import models
from django.contrib.auth.models import User
**
Kind regards,
On Mar 30, 7:16 pm, Briel <[email protected]> wrote:
> Hi.
> You really dont give much information, when this
> happens traceback ect, but a wild guess would
> be to check your imports.
>
> ~Jakob
>
> On Mar 30, 7:04 pm, Adonis <[email protected]> wrote:
>
> > Hello,
> > You will love this one,
>
> > models.py
> > *
> > class LayersOfUsers(models.Model):
> > name = models.CharField(max_length=50)
> > desc = models.TextField(null=True)
> > geouser = models.ForeignKey(User)
>
> > def __unicode__(self):
> > return self.name
>
> > class Species_d(models.Model):
> > speciesName = models.CharField(max_length=200, null=True)
> > speciesUser = models.ForeignKey(User)
> > lon = models.FloatField(4)
> > lat = models.FloatField(4)
> > uLayer = models.ForeignKey(LayersOfUsers)
>
> > def __unicode__(self):
> > return self.speciesName
> > *
>
> > i am getting a name error on this occasion:
> > * NameError: name 'LayersOfUsers' is not defined *
> > Anyone care to suggest sth? I will also add a hint, because the
> > initially created project is now running under mod python, this
> > happens to be a newly created project but with copied-paisted code
> > from the previous one, so that i can continue developing.
> > Kind regards,
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---