Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Jan. 24, 2011 19:31:50

arlen n.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

remove items as they are assigned


Hi all,
i'm trying to do a simple thing, but it seems not so simple in django.

I have the following models

class Monitor(models.Model):
id ...
name ...
address = foreignkey(MonitorAddress)

class MonitorAddress(models.Model):
address = CharField()

what i want to do is as long as i assign a name to a monitor in the
admin add page, MonitorAddress show me only the non-assigned addresses
in the combobox

i've already tried with forms and inserting a raw sql query in
models.py and forms.py, but it looks like these files are loaded only
once

--
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
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 25, 2011 15:02:08

D.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

remove items as they are assigned


Have a look at:http://groups.google.com/group/django-users/browse_thread/thread/eaafb5c60108f3bd/50d871a1627453f5?fwc=1On Jan 24, 9:22 pm, arlen nascimento <arlen.nascime...@gmail.com>
wrote:
> Hi all,
> i'm trying to do a simple thing, but it seems not so simple in django.
>
> I have the following models
>
>  class Monitor(models.Model):
>   id ...
>   name ...
>   address = foreignkey(MonitorAddress)
>
> class MonitorAddress(models.Model):
>   address = CharField()
>
> what i want to do is as long as i assign a name to a monitor in the
> admin add page, MonitorAddress show me only the non-assigned addresses
> in the combobox
>
> i've already tried with forms and inserting a raw sql query in
> models.py and forms.py, but it looks like these files are loaded only
> once

--
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
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 12th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support