Re: Tutorial confusion: flat project layout with django 1.3.1

2011-10-16 Thread Kirill Spitsin
also says: ... You are reading tutorial for development version of Django, and startproject default layout was recently changed [1]. Tutorial for 1.3 is here: https://docs.djangoproject.com/en/1.3/intro/tutorial01/ [1] https://code.djangoproject.com/changeset/16964 -- Kirill Spitsin -- You received th

Re: Where does SessionMiddleware load the session object from the SessionStore backend?

2011-05-12 Thread Kirill Spitsin
ngo loads session from store lazily, after first access to session, in `SessionStore.load()` method. For example: https://code.djangoproject.com/browser/django/trunk/django/contrib/sessions/backends/db.py#L16 -- Kirill Spitsin -- You received this message because you are subscribed to the Googl

Re: Where does SessionMiddleware load the session object from the SessionStore backend?

2011-05-12 Thread Kirill Spitsin
o/contrib/sessions/backends/base.py#L46 SessionBase._session is a property, with getter SessionBase._get_session(): http://code.djangoproject.com/browser/django/trunk/django/contrib/sessions/backends/base.py#L168 and in _get_session() SessionBase.load() is called. -- Kirill Spitsin -- You rece

Re: Built-in login form via inclusion tag

2011-05-19 Thread Kirill Spitsin
r.inclusion_tag("you_template.html") def login_tag(): form = AuthenticationForm() return {"form": form,} -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se

Re: Django model manager "live" object issues

2011-05-19 Thread Kirill Spitsin
t; Finally, why is none of this being cached? Not quite so, QuerySet has a cache [1]. .. [1] http://docs.djangoproject.com/en/1.3/topics/db/queries/#caching-and-querysets -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: admin ordering for NULL fields

2011-05-27 Thread Kirill Spitsin
want. Any tips, hints? http://www.mail-archive.com/django-users@googlegroups.com/msg64668.html -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.co

Re: setlang using AJAX

2011-05-30 Thread Kirill Spitsin
On Mon, May 30, 2011 at 08:03:46AM -0700, Luca Casagrande wrote: > Thank you very much, for your help and your code. > The problem is that the POST request is missing the csrf_token and so > I have got a 403 Error. https://docs.djangoproject.com/en/1.3/ref/contrib/csrf/#ajax -- Kiril

Re: Can I perform an "alter table" to remove a "not null" constraint?

2011-05-31 Thread Kirill Spitsin
y dbshell, and ALTER TABLE yourself, for example, for PostgreSQL:: ALTER TABLE ALTER COLUMN DROP NOT NULL; -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegr

Re: Django DATETIME_FORMAT Localization

2011-05-31 Thread Kirill Spitsin
tils.formats.date_format` function. -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsu

Re: save out a test database?

2011-06-01 Thread Kirill Spitsin
ers import serialize >>> queryset1 = Model1.objects.filter(...) >>> queryset2 = Model2.objects.filter(...) >>> fixture = serialize('json', list(queryset1) + list(queryset2)) >>> f = open('mydate.json', 'w') >>> f.write(fixture) >

Re: spawning threads within test cases in django test framework

2011-06-01 Thread Kirill Spitsin
blem before? (And, > ideally, came up with a really neat solution...) Try to use TransactionTestCase instead of TestCase (and don't use in-memory SQLite datebase). -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Confusion about DJANGO_SETTINGS_MODULE

2011-06-02 Thread Kirill Spitsin
syntax"? Would it be ok if I just provide the value as a > file name? Perhaps, "new_setting.py"? "new_setting" And i would recommend you read this part of python tutorial: http://docs.python.org/tutorial/modules.html -- Kirill Spitsin -- You received this

Re: How do I access a field's verbose_name?

2011-06-20 Thread Kirill Spitsin
On Mon, Jun 20, 2011 at 08:54:14AM -0700, Jeff Blaine wrote: > I'd like to make use of a field's verbose_name in some code instead of > duplicating that sort of info. Can someone show me how? >>> SomeModel._meta.get_field(field_name).verbose_name -- Kirill Spits

Re: Need help intercepting SQL

2011-07-11 Thread Kirill Spitsin
https://code.djangoproject.com/browser/django/branches/releases/1.2.X/django/db/backends/__init__.py#L280 -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegr

Re: Database doubt

2011-07-26 Thread Kirill Spitsin
] http://south.aeracode.org/ -- Kirill Spitsin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@goog

Re: ALL CAPS input and Sentence case

2011-07-26 Thread Kirill Spitsin
sentence upper > case, rest lowercase up to the period). > > I was hoping something like this exists as a convenience function/ > module, but if not i guess i'll have to write it myself. >>> 'ALL CAPS. aNd MixED.'.title() 'All Caps. And Mixed.' -- Kiri

Re: ALL CAPS input and Sentence case

2011-07-26 Thread Kirill Spitsin
On Tue, Jul 26, 2011 at 07:19:46PM +0300, Kirill Spitsin wrote: > On Tue, Jul 26, 2011 at 08:48:24AM -0700, christian.posta wrote: > > For user input, I would like to format what they enter into 'sentence > > case' > > Example, if they input ALL CAPS for a descriptio