link to ForeignKey in Admin's change list page

2008-11-17 Thread Paolo Corti
Hi maybe this is trivial, but i can't find a way to get it (and from what i can see it seems not possible): my model: class Project(models.Model): name = models.CharField('name', max_length=255) #relationship projectowner = models.ForeignKey(Person) in admin

Re: link to ForeignKey in Admin's change list page

2008-11-18 Thread Paolo Corti
Daniel, thanks a lot, it works perfectly Paolo On Nov 17, 8:19 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Nov 17, 4:42 pm, Paolo Corti <[EMAIL PROTECTED]> wrote: > > > > > Hi > > maybe this is trivial, but i can't find a way to get it (and from

Unicode decode errors with Admin and Postgres

2008-09-01 Thread Paolo Corti
cess the object I just created from the admin interface: http://localhost:8000/admin/apptestutf/person/6/ I get this error: TemplateSyntaxError at /admin/apptestutf/person/6/ Caught an exception while rendering: 'ascii' codec can't encode character u'\xe8&#x

Unicode decode errors with Admin and Postgres

2008-09-01 Thread Paolo Corti
just created from the admin interface: http://localhost:8000/admin/apptestutf/person/6/ I get this error: TemplateSyntaxError at /admin/apptestutf/person/6/ Caught an exception while rendering: 'ascii' codec can't encode character u'\xe8&#x

Re: Unicode decode errors with Admin and Postgres

2008-09-09 Thread Paolo Corti
On 1 Set, 18:48, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-09-01 at 08:37 -0700, PaoloCortiwrote: > > Hi all > > > I am a beginner using Django from the trunk and Postgres 8.2 > > > I have this issue with utf8, you can replicate it this way (it is > > something similiar to thi

verbose_name_plural not working in the admin?

2008-09-09 Thread Paolo Corti
Hi here is a sample class: class TipoMisura(models.Model): nome = models.CharField('nome', max_length=255, null=True) class Meta: verbose_name = "Tipo di Misura" verbose_name_plural = "Tipo di Misure" In the admin interface, the link to the chang

How can i access UserProfile from User in the views?

2009-03-17 Thread Paolo Corti
Hi I know is easy to access to the UserProfile, like here: from django.contrib.auth.models import User u = User.objects.get(pk=1) # Get the first user in the system user_address = u.get_profile().home_address but is there a way to access to UserProfile in the view? supposing the UserProfile mode

Re: How can i access UserProfile from User in the views?

2009-03-17 Thread Paolo Corti
Hello Andy > > Do you mean in the template? yes, sorry... > > I don't use Django templating but have you tried: > > user.get_profile.home_address > if i use this in the template i get this error: Caught an exception while rendering: Cannot resolve keyword 'user' into field thanks anyway

Re: How can i access UserProfile from User in the views?

2009-03-18 Thread Paolo Corti
On Mar 17, 7:24 pm, Andy Mckay wrote: > If you use request context then you will get the user available: > > http://docs.djangoproject.com/en/dev/ref/templates/api/?from=olddocs#... I could correctly access context, in fact i had the error also from the shell. The problem i had ("Caught an exc

Update an object with a dictionary

2009-06-10 Thread Paolo Corti
Hi is it possible to update an object with a dictionary? I tried something like this: myobject.save(force_update=True, **my_dict) getting an error, though: TypeError at ... save() got an unexpected keyword argument 'myfieldname' I wouldn't like to iterate the dictionary, neither to delete and c

Re: Update an object with a dictionary

2009-06-10 Thread Paolo Corti
> > .save() is only for persisting the object to disk, not for modifying > objects. To update any Python object from a dictionary is as easy as: > > for k,v in d.items(): setattr(myobject, k, v) this is also what i came to. But curious to try the Daniel's approach, will let you know best regards

DatabaseError: ORA-03127: no new operations allowed until the active operation ends

2011-03-22 Thread Paolo Corti
the active operation end I am having the same behavior both with Django 1.2.5 and 1.3 RC any ideas? thanks -- Paolo Corti Geospatial software developer web: http://www.paolocorti.net twitter: @paolo_corti -- You received this message because you are subscribed to the Google Groups "Djang

Re: DatabaseError: ORA-03127: no new operations allowed until the active operation ends

2011-03-22 Thread Paolo Corti
On 22 Mar, 11:41, Paolo Corti wrote: > Hi > I had to migrate a GeoDjango project based on a Postgres/PostGIS > backend to a Oracle/Oracle Spatial backend. > > I could sync the database without problems and now I can successfully > read and create new data from the shell, but a