Hi Anton,

You may need to add the Meta class in too:

mycompany/models.py:
from django.db import models
class Subnet(models.Model):
    field = models.CharField(maxlength=255)
    ...

    class Admin:
        pass

    class Meta:
        app_label = 'administration'

And then in your mycompany/.../administration/models.py:
from mycompany.models import *
# Add some comment about app_label.

Good luck, John.

PS. There's not much in the way of documentation for app_label.


On 8/8/06, ak <[EMAIL PROTECTED]> wrote:
>
> Malcolm, my models are imported into application,models and do have
> Admin inner class. Take a look:
> 1. Model:
> $ cat subnet.py
> # -*- coding: windows-1251 -*-
>
> from django.db import models
>
> class Subnet(models.Model):
>     address = models.IPAddressField()
>     mask = models.IPAddressField()
>
>     class Meta:
>         db_table = 'subnets'
>
>
>     def __str__(self):
>         return self.address + "/" + self.mask
>
>
>     class Admin:
>         pass
>
> 2. application.models:
> $ cat models.py
> from django.db import models
>
> # Create your models here.
> from mycompany.models import Subnet
>
>
> >
>


-- 
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to