Re: Cache and i18n

2009-05-21 Thread Dmitriy Sodrianov
On 20 май, 23:13, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Wed, May 20, 2009 at 12:01 PM, Dmitriy Sodrianov <sodr...@gmail.com>wrote: > > > > > > > Hi, there! > > > I've configured bilingual site. At this site some forms are present. >

Cache and i18n

2009-05-20 Thread Dmitriy Sodrianov
Hi, there! I've configured bilingual site. At this site some forms are present. All the forms field 'verbose_name' attribute are marked with ugettext utility. The problem is that when language is changed labels for form's fields does not change. All the localization files are provided and

Custom handler404 for an app

2009-04-28 Thread Dmitriy Sodrianov
Hi there! Is there a way of customizing handler404 for a different apps of the project? That is - I have one app for a client part and one more for a admin part and certainly they should have different designs at all. --~--~-~--~~~---~--~~ You received this

Re: Allowing html tags for filter.

2008-04-11 Thread Dmitriy Sodrianov
Sure, here it is. It's quite simple. @register.filter def show_actions(obj): ret = ''' execute edit''' % (obj.id, obj.id) return ret Kenneth Gonsalves: > On 11-Apr-08, at 10:05 PM, Dmitriy Sodrianov wrote: > > > I have a custom filter that outputs some html code.

Allowing html tags for filter.

2008-04-11 Thread Dmitriy Sodrianov
Hi to all! I have a custom filter that outputs some html code. The problem is that it converts all "greater than" and "less than" symbols to appropriate and symbols. How is it possible to say to filter not to do this? Thanks. --~--~-~--~~~---~--~~ You received

Re: Tree from the model.

2008-04-11 Thread Dmitriy Sodrianov
Is it possible to use only Django's built-in functions? On 11 апр, 04:21, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Try to use this very good applicationhttp://code.google.com/p/django-mptt/. > > On Apr 10, 11:15 pm, Dmitriy Sodrianov <[EMAIL PROTECTED]> wrote: > >

Tree from the model.

2008-04-10 Thread Dmitriy Sodrianov
Hi to all. I have a model that can be described briefly as follows: class Task(models.Model): title = models.CharField(max_length = 250) subtasks = models.ManyToManyField('Task', null=True, blank=True) How can I build a tree of task and subtask with level greater than two?

Re: Parent/Child problem

2008-04-04 Thread Dmitriy Sodrianov
d it > makes it so the relationship is assumed to go both ways. > > On Apr 4, 2:22 am, Dmitriy Sodrianov <[EMAIL PROTECTED]> wrote: > > > Hi to all! > > > I have a model > > > class Task(models.Model): > > title = models.CharField(max_le

Parent/Child problem

2008-04-04 Thread Dmitriy Sodrianov
Hi to all! I have a model class Task(models.Model): title = models.CharField(max_length = 250) subtasks = models.ManyToManyField('Task', null=True, blank=True) The problem is that when I add subtask to task, task is also added to subtask, look at the following code to see what I mean.

Re: Manipulating request.FILES

2008-04-02 Thread Dmitriy Sodrianov
further ref, you may want to > read:http://gulopine.gamemusic.org/2007/nov/07/customizing-filenames-witho... > > hope this helps. > > regards, > Joseph > > On Mar 31, 9:22 pm, Dmitriy Sodrianov <[EMAIL PROTECTED]> wrote: > > > Hi to all! > >

Manipulating request.FILES

2008-03-31 Thread Dmitriy Sodrianov
Hi to all! I'm stuck with the problem of manipulating request.FILES. I need to do the following thing - there is a form with the FileField in it, After the submit file that is send with the form must be renamed and stored in particular way, let's say md5 of client ID. I have no idea of how to

Relating model to itself.

2007-10-16 Thread Dmitriy Sodrianov
Hi to all! Can anyone help me, why none of the following code works: class Task(models.Model): parent = models.ForeignKey(Task) class Task(models.Model): parent = models.ForeignKey(self) As it can be seen from the code above, i want some tasks to have parent, and

Synchronising Database.

2007-07-18 Thread Dmitriy Sodrianov
Hi to all! Imagine a situation when a Django model is installed into the database with well-known command manage.py syncdb and then it is altered, let's say a new field is added to model. After typing manage.py syncdb again the table is not synchronised with the model despite the name of the

Re: MEDIA_URL MEDIA_ROOT problem.

2007-07-18 Thread Dmitriy Sodrianov
Thanks to all for help. With your suggestions and links I've found out how to serve static files with Django. Now everything works just fine! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

MEDIA_URL MEDIA_ROOT problem.

2007-07-17 Thread Dmitriy Sodrianov
Hello everyone! Let me ask for help with the following problem: I want to attach css file to my template and I'm doing it in this steps. 1) First edited setting.py file, MEDIA_URL and MEDIA_ROOT variables in this way: MEDIA_ROOT = '/home/sodrian/versatility/static/' MEDIA_URL =