Here is a way that I set up a settings model.
class YourSettings(models.Model):
ID_CHOICES = ((1,'Settings is a single record'),)
id = models.IntegerField(primary_key=True, choices=ID_CHOICES,
default=1)
... then the other fields for your settings.
On May 4, 12:11 am, Toninho Nunes
No, this table will have only a single record, for any user and will
be the same record at all. The user can change, delete and save, but
can not add two records.
On 4 maio, 07:22, vikalp sahni wrote:
> sorry, didn't get you. << I need just only to limit to one record >>
>
sorry, didn't get you. << I need just only to limit to one record >>
is it something like you want one user to add only one record to certain
table from admin??
On Wed, May 4, 2011 at 10:41 AM, Toninho Nunes wrote:
> Hi,
>
> I have a table named Config, I need just
Hi,
I have a table named Config, I need just only to limit to one record,
are there a method or property to do this? any tip ou advice how to
proceed? I use the admin.ModelAdmin.
details:
Django Version 1.3
Ubuntu 10.10 - 64bits
PostGresql 8.4
Thanks,
Toninho Nunes
--
You received this
4 matches
Mail list logo