Re: Should I use generic foreign key, and how?

2014-08-17 Thread Vladimir Chukharev
On Saturday, August 16, 2014 10:46:33 PM UTC+3, Aaron Law wrote: > > > Hi all, > > I have php web programming background, and new to Django. I am helping my > brother to build an online system to manage inventory, and I've got a > database design & coding problem recently. Needing help! > > Tha

Re: static files in Django 1.7 ; Anything was change?

2014-09-15 Thread Vladimir Chukharev
Yes, there are some changes, see release notes. In particular, you probably need to run 'django-admin collectstatic'. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an ema

Change help_text of a field in a derived model

2014-06-03 Thread Vladimir Chukharev
Hi, I a have a question about changing help_text in a model derived from another model. In my case, all of the models use the same form, generated from model. Few classes share the same TextField. But the meaning of the field is different in different models. The following is a simplified versi

Re: Change help_text of a field in a derived model

2014-06-03 Thread Vladimir Chukharev
Hm... I fought with indentations in Opera in vain. Everything is lost, though at the time of sending it it looked fine. Try again, with FF. #models.py: from django.utils.html import format_html import django.db.models.options as options options.DEFAULT_NAMES = options.DEFAULT_NAMES + ('help_text

Re: PostgreSQL, queries, speed

2014-06-19 Thread Vladimir Chukharev
On Tuesday, June 17, 2014 3:42:56 AM UTC+3, Lachlan Musicman wrote: > > The db is hosted on the same server, it's not underpowered, and it is > less poorly tuned so much as untuned. > > Untuned is the same as poorly tuned when it comes to PostgreSQL. Or worse. Pg has defaults from last millenniu

Re: Change help_text of a field in a derived model

2014-06-19 Thread Vladimir Chukharev
Answering my own question. No, there is no ready way to change help_text in model. The proposed solution is almost correct, just the get_form_class() function should be defined both in CreateViiew- and UpdateView-derived classes and be like the following. def get_form_class(self):