Hi, I am still pretty new here and a bit confused.
I have the next models:

Place is an abstract class

class Place(models.Model):

    place = models.CharField(_('place'), max_length=128)
    currency = models.CharField(_('currency'), max_length=128)
    #... 
    #... and many other generic data about a place
    class Meta:
        abstract = True
        verbose_name = "place"
        verbose_name_plural = "places"
        ordering = ('place','currency',)
    def __unicode__(self):
        return self.place

A Country is a Place

class Country(Place):

    country = models.CharField(_('country'), max_length = 100)
    continent = models.CharField(_('continent'), max_length = 100, blank
= True, null=True)
    president = models.CharField(_('president'), max_length = 100, blank
= True, null=True)

    class Meta:
        abstract = False
        ordering = ('country',)
        verbose_name = "country"
        verbose_name_plural = "countries"

    def __unicode__(self):
        return self.country
   

And in the Admin.py I would like to edit the currency field too

from vitramar.lugares.models import Place, City
from django.contrib import admin

class CountryAdmin(admin.ModelAdmin):
    fieldsets = [
        (None,               {'fields': ['city']}),
        ('General info', {'fields': ['continent', 'president',
'currency'], 'classes': ['collapse']}),
    ]

admin.site.register(Country, CountryAdmin)

But i get the error: 
ImproperlyConfigured at /admin/
'CountryAdmin.fieldsets[1][1]['fields']' refers to field 'currency' that is 
missing from the form.

I have already tried with place.currency, place_currency,
place._currency with no luck.


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

Reply via email to