Reflect changes in admin page Django

I have a model and originally it had these attributes

First Name
Last Name
Email

I altered the model to include an additional attribue : Address , now it looks like this

First Name
Last Name
Email
Address

I am using MySQL database and the changes are reflected in the table in the database , however the changes are not reflected in Django admin as the tables does not have a new column called Address.

I know it has something to do with overriding the admin template in Django but i cant seems to be able to do it , can someone guide me

Thanks

Answers


In your admin.py file in your app directory, there will be a subclass of ModelAdmin that is registered for this model. Make sure the address field is listed in either the fields or fieldsets property of this class, and make sure it is not listed in the exclude list on this class.

REF: https://docs.djangoproject.com/en/dev/ref/contrib/admin/


Need Your Help

How can I programatically receive faxes? Preferable in java

java fax

I need to be able to receive a fax in a java application. I was wondering what are some ways of doing this. Efax? Use a fax to email provider?

How to implement 'state-driven' programs in a functional way?

functional-programming racket immutability

I am planning to write an electric circuit simulator in the Racket language.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.