Hello,
Does anyone know how to set the content type when serving a page via
FlatPages?
Thanks,
- Shaun
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to djan
umm... but that's not exactly according to "D.R.Y." :) -- but thanks.
On Sep 13, 3:36 pm, "Matthias Kestenholz" <[EMAIL PROTECTED]> wrote:
> On Sat, Sep 13, 2008 at 9:33 PM, shaunc <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > Does anyon
Can anyone help me with the following point?
Does django keep internal state when psycopg throws a
OperationalError, and how do I clear it?
The situation is this: I have external processes writing into a django/
postgres database. To avoid using semaphors, etc, I'm trying to use a
row level lock
am, shaunc wrote:
> Can anyone help me with the following point?
>
> Does django keep internal state when psycopg throws a
> OperationalError, and how do I clear it?
>
> The situation is this: I have external processes writing into a django/
> postgres database. To avoid usin
I have a table of Rates:
class Rate( models.Model ):
edition = ForeignKey( Edition )
description = ForeignKey( Foo )
rate = IntegerField( )
...
[ other fields not relevant here ]
and a RateForm:
class RateForm( forms.ModelForm ):
class Meta:
fields = ( 'description',
I think I've solved this myself.
I needed two fields for description: one for the description pk (in
case it is pre-existing) and one for the text.
I changed the widget for the description via RateForm.Meta.widgets to
a HiddenInput widget, and added the text field
to the form separately.
In RateF
an "admin_order_field" attribute... even if
I replace the complex expression with a dummy select that merely
renames some existing field. Is there some other way to do this? Is
this a good candidate for enhancement (should I move over to
"developers" or open a ticket?)?
Thanks
In a many-to-one relationship (ie reverse of ForeignKey), an instance
has a related manager that (apparently) caches its relatees, at least
in some circumstances. Is it possible to clear this cache?
This would be useful in the following scenario:
class Foo( Model ):
pass
class Bar( Model ):
Hello,
I'm confused: why does BoundField.as_widget retrieve initial data with
self.name (without prefix):
>>>def as_widget(self, widget=None, attrs=None):
...
>>>if not self.form.is_bound:
>>>data = self.form.initial.get(self.name, self.field.initial)
But if there is dat
Can I use make-messages to create english translation files for a site
that is originally written in something other than english? I don't
see how the "source" language is specified.
Thanks,
- Shaun
--~--~-~--~~~---~--~~
You received this message because you are su
I've read in several places about the advisability of serving static
content via Apache (or whatever) rather than via django.
Is it possible to somehow share an authentication context with Apache
(via session coookie??)?
We have a bunch of things like PDF reports, etc that can only be
downloaded
Wonderful, James --
I had overlooked the existence of this. Small feature enhancement might
be to mention it in doc in other places where static content is being
talked about.
- Shaun
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Ivan Sagalaev wrote:
> carlwenrich wrote:
> > Thanks. I like the hidden input type idea.
>
> In practice it's harder.
>
> > About sessions, do they
> > still work if the user's browser doesn't accept cookies?
>
> They don't. But in current web cookies are pretty much a requirement for
> sane brow
There are two methods in the db api specific to files:
get_FOO_filename( ) and save_FOO_file( fn, rawcontents).
If we just want to treat the associated file as an anonymous "blob",
can we say:
mod.save_FOO_file( mod.get_FOO_filename(), rawcontents )
Or do we need to provide a filename on f
Hello,
I'm writing some scripts for a testing environment. I want to dump some
core stuff from the database, recreate the database, and reload the
stuff.
I can do all the steps individually, but deleting the database requires
closing the db connection. Can I get django to cleanup and close its
c
15 matches
Mail list logo