I am working with Django 1.8 and with its admin
app.
And when I try to set permissions for my "staff" users I can't see all my models. There are only some, and I don't understand because this should be done automatically, right?
I am registering my model in admin.py
admin.site.register(Promo, PromoAdmin)
This is my models.py
class Promo(models.Model):
id = models.BigIntegerField(primary_key=True)
code = models.CharField(max_length=255, blank=False)
enabled = models.BooleanField(blank=False)
amount = models.FloatField()
max_uses = models.IntegerField()
class Meta:
managed = False
db_table = 'promo'
def __unicode__(self):
return str(self.id)
Any ideas?
UPDATE:
$ ./manage.py syncdb --all
usage: manage.py syncdb [-h] [--version] [-v {0,1,2,3}] [--settings SETTINGS]
[--pythonpath PYTHONPATH] [--traceback] [--no-color]
[--noinput] [--no-initial-data] [--database DATABASE]
manage.py syncdb: error: unrecognized arguments: --all
UPDATE They are not even in the table django_contenttype. In general how a model is added to this table? I am not working with migrations, mi _meta.managed = False