On Tue, Feb 12, 2013 at 10:52 AM, carlos <crocha09...@gmail.com> wrote:

> Hi I have an app called myapp within my models eg
>
> class Foo(models):
>     fields1 = models(blabla)
>     fields2 = models(blabla)
>
>     class Meta:
>         verbose_name = "Foo model"
>         app_label = 'candy'
>         db_table = 'myapp_foo'
>
> class Bar(models):
>    fields1 = models(blabla)
>     fields2 = models(blabla)
>
>     class Meta:
>         verbose_name = "Bar model"
>         app_label = 'chocolate'
>         db_table = 'myapp_bar'
>
> now I separate them for the admin i use app_label that this show
> separately and it works but as super user when i create group
> but do not see it does not appear
>

It's not entirely clear to me what you're doing, or what you're trying to
achieve. However, it appears you're using app_label to provide a custom app
for each of your models. That isn't what app_label is intended for. The
label you use in app_label must already exist as an app that has been added
to your INSTALLED_APPS list.

app_label is intended for use when you break a large models.py file into
smaller submodules; app_label provides a way to point to the name of the
module that contains the base models module.

It *isn't* a mechanism for describing the apps you want to appear in admin.
If you want a new app to appear in admin, you need to define a separate app
-- that means a separate directory, with a separate models.py file, listed
in your INSTALLED_APPS.

Yours,
Russ Magee %-)

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to