Karen thank you very much for your accurate reply.
> Changing the display in the
> change view is a little more involved -- that needs to change the form used
> by the admin to one where the field in question has a customized
> label_from_instance that returns what you are looking for.
>
This is
> It seems like Django-admin doesn't take in account the 'to_field'
> directive.
>
> (Django Version 1.1.0)
I found out that this problem was already reported in Ticket #8648
(http://code.djangoproject.com/ticket/8648) with the title 'Admin
ignores to_field on ForeignKey'.
The proposed fix, isn't
Lets consider a simple case with a ForeignKeyField:
class Model1(models.Model):
code1 = models.IntegerField()
code2 = models.CharField()
def __unicode__(self):
return unicode(self.code1)
class Model2(models.Model):
mycode = models.ForeignKey(Model1
This is what I thought too, and for this I used in all of my templates
the commands:
but the problem persisted.
Finally, the problem was fixed, after I found out that in my
development site, I had not set the site name/domain correctly from
the Admin Pages. This somehow was breaking the s
I want to use from django.contrib.auth.views the login and logout
functions.
Following the manual pages, in my views.py I use this procedure:
@login_required
def homepage(request):...
While it works fine in Firefox, and one who logouts is redirected to
the login page if one tries to access di
I have a model/table including a field declaration:
money=models.DecimalField(max_digits=12,
decimal_places=2,verbose_name=u'π/υ').
When I see this field in the Admin pages, this field is just a box,
without any formatting,
e.g. thousand separation marks, which is important for the visibility
of
I have a model/table including a field declaration:
money=models.DecimalField(max_digits=12,
decimal_places=2,verbose_name=u'π/υ').
When I see this field in the Admin pages, this field is just a box,
without any formatting,
e.g. thousand separation marks, which is important for the visibility
o
I have a model/table with a field declaration:
money=models.DecimalField(max_digits=12,
decimal_places=2,verbose_name=u'π/υ').
When I see this field in the Admin pages, this field is just a box,
without any formatting,
e.g. thousand separation marks, which is important for the visibility
of the
8 matches
Mail list logo