Show related inlines in the admin on form of model with GenericForeignKey

2009-07-21 Thread ramu...@gmail.com
I have simple models with generic relations from this example at the Django Project: class Image(models.Model): image = models.ImageField(upload_to="images") content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() content_object = generic.GenericFor

How to make email field unique in model User from contrib.auth in Django

2009-07-21 Thread ramu...@gmail.com
I need to patch the standard User model of contrib.auth by ensuring the email field entry is unique: User._meta.fields[4].unique = True Where is best place in code to do that? I want to avoid using the number fields[4]. It's better to user fields ['email'], but fields is not dictionary, only li

Re: need a multiselect list box for a static list of options

2009-04-08 Thread ramu...@gmail.com
Adam, did you solve you problem? I try to solve the same problem here http://stackoverflow.com/questions/723639/forms-selectmultiple-from-models-commaseparatedintegerfield On Apr 7, 5:47 pm, Adam Fraser wrote: > Yup:>>> django.get_version() > > u'0.97-pre-SVN-unknown' > > On Apr 6, 1:45 pm, Al

Re: add 'link' to admin interface of model

2009-04-10 Thread ramu...@gmail.com
If I understand correctly the same problem solve by this code: def colored_name(self): return '%s %s' % (self.color_code, self.first_name, self.last_name) colored_name.allow_tags = True manual http://docs.djangoproject.com/en/dev/ref/contrib/admin/#list-display On Apr 9, 8:31 pm, Psiho

django + memcached: problem with limit of 1 mb

2010-02-18 Thread ramu...@gmail.com
Does anyone know about any solutions for keeping data bigger, than 1 mb in memcached ? This is no big deal to cut big data to 1mb pieces before setting and merge this pieces after getting from memcached. And this algorithm can work transparently for users. -- You received this message because yo

Re: django + memcached: problem with limit of 1 mb

2010-02-18 Thread ramu...@gmail.com
This can works on the base of this snippet http://www.djangosnippets.org/snippets/488/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send emai

Re: No module named _md5

2010-12-25 Thread ramu...@gmail.com
I found answer here http://www.mail-archive.com/django-users@googlegroups.com/msg101199.html This is due to having a virtualenv created in a previous version of Ubuntu. Recreate the virtualenv under Lucid, and you should be fine. On Dec 14, 9:41 am, NavaTux wrote: > I am running my django blog