Saturday, November 13, 2010

Automatically assume "models." prefix in models.py

Forgive a django newbie...

Maybe I'm the laziest person in the world, but sometimes I get tired
of typing "models.WhatEver" for every single model I have to write. Is
there anyway a shortcut could be added that would 'assume' the
'models.' prefix when I am defining a model?

e.g. instead of:

class SomeModel(models.Model):
something = models.SomeField(someoption=something)
# some other things

Could a shortcut be added so that I can write:

class SomeModel(models.Model):
something = SomeField(someoption=something)
# some other things

I realized that not everything I will write will have the "models."
prefix, but I think _most_ of what I write in models.py will have it.

So... I'm a being too lazy, or perhaps just stupid?

Thanks,
-james

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate