Dropdowns on Django Admin -


i new django , using allow users edit database tables through admin site. have 2 tables fields in common. want common fields appear dropdowns in 1 of tables. can't figure out how make multiple dropdowns. best gui tool use simple databases?

here code far:

class places(models.model):  name = models.charfield(max_length=300)  description = models.charfield(max_length=100)  def __unicode__(self):       return self.name # can add conditional here return 'description'?   class more_places(models.model):       name = models.foreignkey('places', null=true, blank=true, db_column = 'feature_name', related_name='featurename') # dropdown #1       description = models.foreignkey('places', null=true, blank=true, db_column = 'version', related_name='version') # want dropdown #2       more_data = models.charfield(max_length=10) 

i don't see errors in model. , working two dropdowns in django v1.3. don't understand need of specifying related_name


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -