Re: Django model help text into database comment field

2014-10-29 Thread Collin Anderson
Hi Phillipe, You'll likely need to run the SQL to update the comment by hand. You can get the data from your models like this: for field in MyModel._meta.fields: print field.attname, field.help_text Collin -- You received this message because you are subscribed to the Google Groups

Django model help text into database comment field

2014-10-27 Thread phillipe . cavalcante
Hello I would like to add help_text field value into the related database comment field. Is that possible? MODEL Table field = models.CharField(help_text=u'help text content', max_length=100, unique=False, blank=True, null=True) DATABASE Table field comment = help text content Cheers,

Re: data model help?

2011-03-07 Thread Tim
On Mar 5, 12:39 pm, Michael Radziej wrote: > Hi Tim! > > On Sat, 5 Mar 2011 06:05:51 -0800 (PST), Tim wrote: > > For me that looks a little complex. The 'sequence' doesn't really > > belong to the Chapter or the Book, but to their relationship. A > >

Re: data model help?

2011-03-05 Thread Michael Radziej
Hi Tim! On Sat, 5 Mar 2011 06:05:51 -0800 (PST), Tim wrote: > For me that looks a little complex. The 'sequence' doesn't really > belong to the Chapter or the Book, but to their relationship. A > Chapter may have one sequence number when part of Book A, and another > for

data model help?

2011-03-05 Thread Tim
Hi, I'm modeling book structures. Currently I have Chapter objects that belong (ForeignKey) to a Book and each Chapter has sequence number so the book can know how to order the chapters within itself. That was okay until I realized the chapters can be shared between books. For me that looks a

Re: model help.

2008-10-23 Thread Niall Mccormack
Thanks for that - and yes I am in a bit of a rush! I thought my initial question was maybe a little to convoluted as I just needed a lead to go on really... On 23 Oct 2008, at 16:13, Karen Tracey wrote: > On Thu, Oct 23, 2008 at 10:45 AM, Niall Mccormack <[EMAIL PROTECTED] > > wrote: > >

Re: model help.

2008-10-23 Thread Niall Mccormack
ok, I'm going to simplify my question. is there any way that I can create a ForeignKey or a ManytToMany that can accept multiple types of data Models? On 23 Oct 2008, at 11:34, Niall Mccormack wrote: > > Hi there, > > I'm learning Django at the moment and need some advice. > > I need to

Re: Model help

2008-03-08 Thread Sam Lai
16:19 -0800, brydon wrote: > > > I know this answer should exist somewhere in documentation or on the > > > net, hopefully someone can point me there. I'm looking for model help > > > and I think I can frame it best with an example. Say you're building a > > > d

Re: Model help

2008-03-08 Thread Malcolm Tredinnick
On Sat, 2008-03-08 at 16:59 -0800, brydon wrote: > That's helpful and I'll likely take that approach but I believe that > means I have two almost identical tables? If you have two things related via a many-to-many relation and an intermediate table, that's three tables serving different

Re: Model help

2008-03-08 Thread brydon
:19 -0800, brydon wrote: > > I know this answer should exist somewhere in documentation or on the > > net, hopefully someone can point me there. I'm looking for model help > > and I think I can frame it best with an example. Say you're building a > > delicious like model. You h

Re: Model help

2008-03-08 Thread Malcolm Tredinnick
On Sat, 2008-03-08 at 16:19 -0800, brydon wrote: > I know this answer should exist somewhere in documentation or on the > net, hopefully someone can point me there. I'm looking for model help > and I think I can frame it best with an example. Say you're building a > delicious lik

Model help

2008-03-08 Thread brydon
I know this answer should exist somewhere in documentation or on the net, hopefully someone can point me there. I'm looking for model help and I think I can frame it best with an example. Say you're building a delicious like model. You have users, user have links. Those links have common elements

Re: model help for a newbie

2007-10-29 Thread Hani
Thanks Malcolm, on a lot of different levels. 1st, your code for putting the ratings into a list was very cool. It provoked a light bulb moment in my brain as I worked my way through the code. Very cool. You're right about not being able to do the sum on the ratings, but I fixed that by

Re: model help for a newbie

2007-10-27 Thread Malcolm Tredinnick
On Sun, 2007-10-28 at 01:15 +, Hani wrote: > Hi, > A complete and utter newbie seeks help. > > I have a model Beer with another model called TastingNotes tied via > foreign key to the Beer table. > > > models.py > > class Beer(models.Model): > beer=models.CharField(max_length=50,

model help for a newbie

2007-10-27 Thread Hani
Hi, A complete and utter newbie seeks help. I have a model Beer with another model called TastingNotes tied via foreign key to the Beer table. models.py class Beer(models.Model): beer=models.CharField(max_length=50, core=True) def __unicode__(self): return

Re: Model help

2007-03-05 Thread Kai Kuehne
Hi Duncan, On 3/5/07, DuncanM <[EMAIL PROTECTED]> wrote: > [Class description] > > The squad selector also has a foriegnkey on fixture, but also has 16 > other fields that are all foreignkeys on player. > > [SquadSelector class] > > Now I have a few queries/questions. > 1.)As you can see from

Model help

2007-03-05 Thread DuncanM
I have some classes related to football (soccer), I have Player, Team, Fixture, Result, Squad, Squad Selector, Appearance and Scorer classes. They way I have modelled it is that A player belongs to a squad, and each team is picked from a squad (e.g. a squad may consist of 30 players but a team

Re: Newbie: Admin / Model help

2007-03-05 Thread DuncanM
Ooops I realise you can use a verbose name on a foreign key field you must just use verbose_name="xxx" e.g. Poll = models.ForeignKey(Poll, verbose_name="the related poll") On Mar 5, 9:16 am, "DuncanM" <[EMAIL PROTECTED]> wrote: > Thank you Kai, > I really appreciate the time you put in to help

Re: Newbie: Admin / Model help

2007-03-05 Thread DuncanM
Thank you Kai, I really appreciate the time you put in to help me with that, it had me puzzled because all this time I was looking for something wrong with my fixture or result classes when it fact it had nothing to do with them, it was due to my last class called SquadSelector as shown below:

Re: Newbie: Admin / Model help

2007-03-04 Thread Kai Kuehne
Hi Duncan, this works for me: from django.db import models class Fixture(models.Model): #team = models.ForeignKey(Team, "Team", core=True) #venue = models.CharField("Venue", maxlength=1, choices=Fixture_Choices, core=True) date = models.DateField("Date", core=True) opponent =

Re: Newbie: Admin / Model help

2007-03-04 Thread DuncanM
Any help please im desperatly stuck. TIA duncan On Mar 2, 5:13 pm, "DuncanM" <[EMAIL PROTECTED]> wrote: > On top of the above post, I've come accross an error when trying to > sync my db (with having simplified list_displays not those from > above). When ever I order my classes in the model

Re: Newbie: Admin / Model help

2007-03-02 Thread DuncanM
On top of the above post, I've come accross an error when trying to sync my db (with having simplified list_displays not those from above). When ever I order my classes in the model file like Fixture ... Result ... I run syncdb and get this: $ python2.4 manage.py syncdb Traceback (most recent

Newbie: Admin / Model help

2007-03-02 Thread DuncanM
Hi I'm having a problem with some of my modelling for an app I'm building. The 2 models of interest i'm using are class Fixture(models.Model): team = models.ForeignKey(Team, "Team", core=True, help_text="The Howden team involved in the fixture e.g. Under 8's or Senior 1st Team.") venue =