Django auth context processor: not to query for user for each request

2011-09-24 Thread Alexey Moskvin
Hi, I enabled django auth middleware, so now I have a user variable in my request context. In this case for each page request user object is queried from the database. Is it possible to set up this middleware to use a cached user object (for example, put by me in session)? User objects are not

Re: help plz to install Django

2011-06-11 Thread Alexey Moskvin
https://docs.djangoproject.com/en/1.3/intro/install/ On 11 июн, 15:01, ihsan mokhlisse wrote: > hi all . i'm so exited to be a member in this wonderful group . i > wanna start learn Django but the problem is . that i need who can > guide me to accomplish the task

Re: Updating static files: Still in browser cache

2011-06-09 Thread Alexey Moskvin
Tomas, try this: https://github.com/jaddison/django-cachebuster On 9 июн, 11:09, Thomas Guettler wrote: > Hi, > > My static files (JS/CSS) are cached in the browser. But if there is a bug > in a file, an update won't help people which have already cached the old file. > > You

Re: New to Django, need some help with tutorial

2011-06-07 Thread Alexey Moskvin
Hi, check that directory with python binary is added to your system PATH environment variable. On 7 июн, 09:59, Dori Rutkevitz wrote: > Hi all, > > I am new to programming in general and recently decided to pick up Django. > Im reading bits of a book on Python, and im

Re: Dynamic verbose_name_plural to display number of models in admin panes

2011-06-05 Thread Alexey Moskvin
Tim, thanks for your help! Also, I've found another solution for this problem: http://stackoverflow.com/questions/6241906/display-number-of-instances-for-each-model-in-djangos-admin-index On 5 июн, 16:50, Tim Shaffer wrote: > You could probably do it using a signal. Every time

Dynamic verbose_name_plural to display number of models in admin panes

2011-06-05 Thread Alexey Moskvin
Hi, I need to display number of objects at main django site admin page. For example, in list of models I need to display Elephants (6) instead of Elephants I added this code to my model: class Elephant(models.Model): class Meta: verbose_name_plural = 'Elephant ' + '(' +

Re: How to avoid passing of the same parameters in many views

2010-12-19 Thread Alexey Moskvin
Thanks, Piotr. It was a solution with custom tag but implementation with database requests from template looked not too elegant for me. I'll look into custom context processors. On Dec 19, 1:25 pm, Piotr Kilczuk wrote: > Hi, > > I have a block, included into several pages (for

How to avoid passing of the same parameters in many views

2010-12-19 Thread Alexey Moskvin
Hi, I have a block, included into several pages (for example, in all sections of my website you can see top rated articles in the right column). I can include a template, that prints this list into base template and avoid any copy-paste here. But I need to provide it with context variable, that

Strange error: Error was: 'module' object has no attribute 'validators'

2009-10-24 Thread Alexey Moskvin
Hi! I'm using dango 0.97 pre (yep, my site still was not upgraded to be compatible with trunk). I use apache + fastcgi for it. And I have a strange problem: sometimes (I can't guess the order) some of the views throw such error: Tried audio_index in module mysite.audio.views. Error was: 'module'

How to disable autoescape in django feeds?

2009-10-20 Thread Alexey Moskvin
Hi! I use django feed framework to organize rss feeds for my website. I need to put some hyperlinks to feed items, but al of them are autoescaped ( "<" is replaced with "" and so on). Is it possible to keep tags in my feed (as I understand, I can't use {% autoescape off %} tag in feed templates)?

Re: django vps hosts

2009-09-24 Thread Alexey Moskvin
You can try Dreamhost Private Server. Also they have added root access for PS not long ago. On 24 сен, 05:54, "neri...@gmail.com" wrote: > I think I'm ready to finally switch to a django vps host due to > problems with django on DreamHost. Can anyone recommend a good vps >

Re: Port large webapp from PHP to Django: tips, experiences, links needed

2009-01-05 Thread Alexey Moskvin
Hello! Perhaps, there is no answers to your questions because of some of them are already discussed here and in other django-related places (like cache perfomance e t.c.), some of them are closed to holywar :) (like to use or not to use of the ORM), and some of them like "How about Django in that

Django + non-parseable headers

2008-12-19 Thread Alexey Moskvin
Is it possible to send responce with non-parseable header from django app? afaik, my hoster support it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Django + Apache (FastCGI): how to spread 404 error

2008-11-29 Thread Alexey Moskvin
Hi, I am using Django + Apache (via FastCGI). I've made my own 404 page (404.html in templates dir) and turned debug mode off. When I'm requesting for non-existed page I see my custom error page, but in Apache's log there is something like this: "GET /authors/333.html HTTP/1.1" 200 368 "-" (the

Failed to send email via send_mail function

2008-11-14 Thread Alexey Moskvin
Hi, I am trying to send mail from my website. Here is my settings py: EMAIL_HOST = 'mail.mydomain.ru' EMAIL_HOST_USER = '[EMAIL PROTECTED]'' EMAIL_HOST_PASSWORD = 'pass' EMAIL_PORT = 587 (credentials are correct, them work from PHP-script), telnet to smtp server works fine. But when I launch my

Dev & Production difference: escaping html in admin

2008-11-01 Thread Alexey Moskvin
Hi, I have developer (win) & production (debian) installations of Django 0.97. There is one difference in admin app. I have a photogallery, and Picture model has this method: def show_thumb(self) : return '%s' % (self.get_image_url(), self.get_image_thumb_url(), self.image) also

Re: Problem with compiling django.po file

2008-03-03 Thread Alexey Moskvin
Thanks for quick reply, Malcolm. Now anything is ok. On 3 мар, 21:12, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-03-03 at 10:04 -0800, Alexey Moskvin wrote: > > Hi! I am trying to compile django.po file for Russian language from > > HEAD django revis

Problem with compiling django.po file

2008-03-03 Thread Alexey Moskvin
Hi! I am trying to compile django.po file for Russian language from HEAD django revision using bin/compile-messages.py, but there is such error: processing file django.po in locale\locale\ru\LC_MESSAGES locale\locale\ru\LC_MESSAGES\django.po:1649: a format specification for argu ment 'counter'

Re: hosting web

2008-02-10 Thread Alexey Moskvin
Ramadas, I want to run my django website (it is not highload, about 1000 visitors per day) on Dreamhost. I have no problems with running up Django there, but now I moved all development to local machine (according to high latency when working with DH using ssh). But I want to move my app there,

Re: Custom template tag

2008-01-13 Thread Alexey Moskvin
The correct directory for your tags is "templatetags", not "templatetag" On 13 янв, 19:47, Alessandro <[EMAIL PROTECTED]> wrote: > I'm trying to create a custom template tag. I've added a feedimport > app in my project, added it on my installed apps, and inside it I've > created a templatetag

Re: Submit Django book to slashdot book review?

2007-12-28 Thread Alexey Moskvin
As a first step, let's vote for it on Digg: http://digg.com/search?s=django+book=Search=all=both=all=score :) On 27 дек, 21:39, walterbyrd <[EMAIL PROTECTED]> wrote: > A lot of people read slashdot, and slashdot has never done any sort of > story on Django. There have been two stories about

Re: Very Easy Question

2007-12-20 Thread Alexey Moskvin
Looks strange, I have never used "install.py" for WinXP, see this tutorial: http://thinkhole.org/wp/django-on-windows/. On 19 дек, 23:55, Trev <[EMAIL PROTECTED]> wrote: > Hi, This should take 2 seconds for an experience Django user. > I'm trying to install Django on windows XP. I've installed

Re: WebAlchemy accelerates Django in 100 times

2007-11-18 Thread Alexey Moskvin
Thanks for your article! I am using Dreamhost too :), thinks, it will be useful. On Nov 18, 10:34 pm, Dima Dogadaylo <[EMAIL PROTECTED]> wrote: > With WebAlchemy only pages involved in form processing are served > directly by Django, the rest of the pages most of the time are served > directly