Django + Plugins howto?

2010-09-02 Thread onorua
Hello, I'm creating the system, which will rely on plugins. For instance, I have main application with model: class User(models.Model): ContractNum = models.PositiveIntegerField(unique=True, blank=True, null=True ) LastName = models.CharField(max_length=50) FirstName = models.CharField

Re: Need subset on Admin interface

2010-06-10 Thread onorua
course don't have to use > JQuery, but it is included by default in the admin and is quite > popular. > > Dan Harris > dih0...@gmail.com > > On Jun 8, 3:17 pm, onorua wrote: > > > > > Hello, thank you for your reply! > > That's really what I

Re: Need subset on Admin interface

2010-06-08 Thread onorua
, then you can probaby populate the port list by overriding > the formfield_for_foreign_key method in the AdminModel > (see:http://docs.djangoproject.com/en/1.2/ref/contrib/admin/#modeladmin-me...) > > Hope this helps! > > Dan Harris > dih0...@gmail.com > > On Jun

Re: Need subset on Admin interface

2010-06-08 Thread onorua
Thank you for the help. For me it's looks like you can limit choices according to already defined values, which are already stored in DB or in model in general. I need something in between. When I load page, I have Switch and Port in the same time. And when I choose Switch, it should affect Port v

Need subset on Admin interface

2010-06-08 Thread onorua
I have class User(models.Model): Switch = models.ForeignKey(Switch, related_name='SwitchUsers') Port = models.ForeignKey(Port) class Switch(models.Model): Name = models.CharField(max_length=50) class Port(models.Model): PortNum = models.PositiveIntegerField() Switch = mod

ManyToMany + through model disappear from Admin interface

2010-05-28 Thread onorua
Hello, I have this simple code, which dives me crazy already :( class ActiveInformer(models.Model): informer = models.ForeignKey('Informer', related_name='act_informers') user = models.ForeignKey(User, related_name='informers') class Informer(models.Model): informer_types = (('P', 'Po

Re: Inline for model causes problem during save

2010-04-08 Thread onorua
he same time? > Can't reproduce this behaviour. Which version of Django are you using? > > Nuno > > 2010/4/7 onorua : > > > > > Hello colleagues, > > > I have the models.py: > > class User(models.Model): > > š šLastName = models.CharField(max

Re: Inline for model causes problem during save

2010-04-08 Thread onorua
Nobody know how to fix this? On 7 апр, 23:16, onorua wrote: > Hello colleagues, > > I have the models.py: > class User(models.Model): >     LastName = models.CharField(max_length=50, verbose_name = > "æÁÍÉÌÉÑ") >     FirstName = models.CharField(max

Inline for model causes problem during save

2010-04-07 Thread onorua
Hello colleagues, I have the models.py: class User(models.Model): LastName = models.CharField(max_length=50, verbose_name = "Фамилия") FirstName = models.CharField(max_length=50, verbose_name = "Имя") MidleName = models.CharField(max_length=50, verbose_name = "Отчество") class SoldSer

Django Admin interface and filter by value

2010-01-22 Thread onorua
I have two models: class User(models.Model): LoginName = models.CharField('login', max_length=50) Email = models.EmailField('e-mail', blank=True) FirstName = models.CharField(max_length=50) LastName = models.CharField(max_length=50) IpAddress = models.IPAddressField(unique=Tru

Retrieve models from database in Django format

2008-05-28 Thread onorua
Actually, I'm newbe in Django world, but I need to create some web application with it. I already have a database with created tables and so forth and I need to define data models for django. Is there any way to do it without monkey-typing? I need something opposite to "python manage.py sqlall ***