On 8/29/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> my_print = Print(paper_type=1)
> print my_print.paper_type
>
> will print out 1. Is there a recommended pattern for printing out
> "Letter"?
Generally this is the pattern we've used in our own code:
"""
class Print(meta.Model):
pape
Is there a recommended approach to displaying the choice text rather
than integer?
for instance:
my_print = Print(paper_type=1)
print my_print.paper_type
will print out 1. Is there a recommended pattern for printing out
"Letter"?
I have been doing methods using a dict that I use to create the
On 8/26/05, Maniac <[EMAIL PROTECTED]> wrote:
> What should I consider when choosing between them? I suppose choices
> tuple is easier to work with when making views since Django
> automatically generates for it (or am I wrong here?). On the
> other hand lookup table is more flexible since I can
Hi!
I'm creating a model 'Print' with a field 'paper_type' that would
contain a value from a paper types list. As I understand I can make it
two different ways:
1. Create a PaperType table and refer to it from Print with a foreign key:
class PaperType:
name=meta.CharField(maxlength=20)
4 matches
Mail list logo