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
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
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
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
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
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
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
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
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
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)
>
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
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
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
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
] 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
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
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
17 matches
Mail list logo