DateTimeField Formatting (in admin)

2009-09-24 Thread Lyubomir Petrov
Is there a easy way to automatically change the default formatting of DateTimeField's when they are used to be printed on the console/ html... As i see in db/models/fields/__init__.py: def value_to_string(self, obj): val = self._get_val_from_obj(obj) if val is None:

ForeignKey/ManyToManyField translation via verbose_name does not work.

2009-06-07 Thread Lyubomir Petrov
Example: class Product(models.Model): categories = models.ManyToManyField (Category,verbose_name="xcategories", blank=True,null=True) Also tried with: class Category(models.Model): ... class Meta: verbose_name = _('xcategory') verbose_name_plural

Session and models.

2009-04-28 Thread Lyubomir Petrov
Trying to store a (non saved - temporary) model (with relations) into django.contrib.session (backend - db). Seems that the relations are cleared and returned empty. Any better ways for doing this ? Best regards, Lyubomir Petrov --~--~-~--~~~---~--~~ You received

Design patterns for create/update view

2009-03-23 Thread Lyubomir Petrov
Just wondering are there any docs/examples of design pattern with django for creating a "create/update" view. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Model Inheritance with external apps

2008-12-16 Thread Lyubomir Petrov
I'm just starting a project that is using django-profile. There are some fields like "country" that i want to remove. As in django-profiles I use my own class that extends the base class (BaseProfile), so i can add some common information fields. What is the best way that i can remove those field

Re: Multiple sites on shared host

2008-03-31 Thread Lyubomir Petrov
Maybe somekind of offtopic, but trying to run django on cPanel shared account, got a lot of problems with finalizing crash with error on splitting an empty request ('host.name','') Used the same method posted above, any ideas from where is the problem? Also additionally the htaccess or direct