1 2 3 4 5 | from django.db import models
from django.contrib.auth.models import User
some_field = models.CharField(max_length=32)
some_field.contribute_to_class(User, 'some_field')
|
More like this
- table with n items per row using custom modulo tag by elgreengeeto 4 years, 5 months ago
- Ensure ugettext is available absolutely everywhere by ElfSternberg 3 years, 10 months ago
- Adding buttons to submit line in a Admin page by marinho 5 years ago
- Print Exceptions to the Console by ericflo 3 years, 10 months ago
- Dynamically change admin widgets at runtime by davisd 3 years, 1 month ago
Comments
How to Sync this modified model with my database ?
#
sberlotto:
manage.py sqlall and manage.py syncdb creates new column properly.
What is your problem? If your column doesn't exist aleready, write an ALTER TABLE command.
I don't understand the negative score, since this snippet is working well.
#
I'm trying this out. So far so good...
#
Hi, while this worked fine for adding a new field, I would like to go forward and know how to make this new field appear in the admin section.
If somebody give me an approach I'll be thankful! =)
#