Best practices sending out http requests from within django code

2008-04-17 Thread Dan-Cristian Bogos
Folks, I was wondering what is the best way to send out http requests from within django. Shall I use an external library (like urllib) or use some django internals? Eg: I want to POST some info on some other django site. Ta, DanB --~--~-~--~~~---~--~~ You receive

New Forms - Mixing database and non database fields

2008-02-15 Thread Dan-Cristian Bogos
Hello, I need to mix fields in my forms: in the same form use perhaps fields from same or different models and/or normal form.fields which do not really relate to a database model. What is the recommended way of doing this? Ta, DanB --~--~-~--~~~---~--~~ You rece

Accessing request.user inside a model methods

2007-11-16 Thread Dan-Cristian Bogos
Hello, Can anyone tell me if it is possible to access logged user instance inside a model method, like save() is? I need to rewrite save() method, so I should have some automatic triggers on model.save(), and use information inside user.groups.all(). Ta, DanB --~--~-~--~~--

Q. Limiting Instance Listing for Foreign Keys in DjangoAdmin - RowLevelPermissions

2007-11-12 Thread Dan-Cristian Bogos
Folks, I have installed per-object-permissions branch and hit a case when I need to limit listing of ForeignKeys Instances inside DjangoAdmin. Example: Model Settings: class RelatedField(models.Model): RelatedName = models.CharField('Name', maxlength=64) class Meta: row_level_

Recommended way for data duplication within forms

2007-09-04 Thread Dan-Cristian Bogos
Hi All, got one situation when I need to keep two different tables with usernames and passwords, one with unencrypted and the other with django auth tables (therefore ecrypted recommended). What is the preferred way of doing data duplication when from the same form it is necessary to insert data