I have tired with options: blank=True, null=True, but I have not got
what I wanted!

Maybe the question was not enough clear.
In Admin interface you got a choices list with one element this : "- -
- - -". What I want is that I could skip this element with
an empty string "      " for example.

cheers,
Nader

On Feb 8, 7:53 pm, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> Sorry, brain explosion.
> It should be:
> contactID = models.ForeignKey(Contactinfo, db_column="contactID",
> blank=True, null=True)
> --
> DR
>
> On Feb 8, 2:33 pm,Nader<[EMAIL PROTECTED]> wrote:
>
> > Thank for your reaction! Do you mean that I have to do the next
> > statement:
>
> > contactID = models.ForeignKey(Contactinfo, db_column="contactID",
> > required=True)
>
> > I have done  it but I get an error:
>
> > __init__() got an unexpected keyword argument 'required'
> >   ....
> > cheers,
> >Nader
> > On Feb 8, 3:21 pm, Daniel Roseman <[EMAIL PROTECTED]>
> > wrote:
>
> > > On Feb 8, 11:08 am,Nader<[EMAIL PROTECTED]> wrote:
>
> > > > Hallo,
>
> > > > I have a model in which have use of ForeignKey to relate them.
>
> > > > class Dataset(models.Model):
> > > >   ....
> > > >   contactID = models.ForeignKey(Contactinfo, db_column="contactID")
> > > >   ....
> > > >   class Admin:
> > > >         list_display = ('datasetName', 'datasetVersion',
>
> > > > I use the  "Admin" class to administrate them also. We get some
> > > > selection fields to choose one of the related elements. One of the
> > > > choice elements is only this : " - - - - ".  It is produced
> > > > atomatically and I don't want to have this element in selection
> > > > fileds. Which option in "ForeignKey" do I have to use to skip " - - -
> > > > -"?
>
> > > > Regards,
> > > >Nader
>
> > > Add "required=True" to the definition of contactID.
> > > --
> > > DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to