On 6/28/09 10:20 PM, Annie wrote:
> I'm trying to this to work: users can download their files from their
> account page from a url like this:
> http://example.com/account/download/a1234565789asedga-2/
> for which django processes the authentication and then passes along
> the info to nginx to
On Mar 16, 2009, at 3:46 PM, Dana wrote:
> I am wondering what the simplest way to send an attachment with
> django-
> contact-form (http://code.google.com/p/django-contact-form/) is.
[...]
> Im interested in just a simple example of sending a file along with
> the other email information. I
On Feb 23, 2009, at 5:20 PM, Graham Dumpleton wrote:
> The approach for mod_python documented in that link, and equivalent
> for mod_wsgi, are only good for HTTP Basic authentication, it is no
> good if you want the page to be authenticated using HTML form/cookie
> based authentication as Django
If it doesn't require authorization (seems unlikely here), would a
simple redirect to the tar file work?
If it does, look into X-Sendfile if you're using Apache (you need
mod_xsendfile) or lighty, or X-Accel-Redirect under nginx. You do only
what you need to in the Django view and hand off
Try 770 with the directory's group set to the effective group of the
Apache process. If you need to get even finer, look into mod_wsgi's
daemon mode, or FastCGI, under either of which your Django app could
run as its own user. Then you could ratchet the directory permissions
down to 700
http://code.djangoproject.com/wiki/CookBookNewFormsFieldOrdering
On May 21, 2008, at 8:15 AM, omat wrote:
[...]
> My form class is like that:
>
> class NoteForm(forms.ModelForm):
>is_location = forms.BooleanField(required=False)
>
>class Meta:
>model = Note
>
> I wish this
On May 19, 2008, at 4:18 AM, Julien wrote:
> I installed mod_xsendfile and I tried your code, but the file that's
> downloaded from the view is empty.
> This might be because I've tested it using the development server on
> port 8080. So I guess Apache is out of the loop :/
Yes, this approach
You can do this with Apache. You need to add mod_xsendfile
(http://tn123.ath.cx/mod_xsendfile/
) to your Apache config, then control access to the files with a
Django view. A quick search of this group turns up references to
mod_xsendfile, but no example view, so here's what it might look
Malcolm has a good how-to for this:
http://www.pointy-stick.com/blog/2008/01/06/django-tip-complex-forms/
On May 17, 2008, at 12:16 PM, Kenneth McDonald wrote:
> I'm designing an order system wherein each order will be an object.
> However, most customers will typically want to order more than
The handling of the POST request is typical. I don't know what your
model class
looks like, but the could look something like this:
form = UploadForm(request.POST, request.FILES)
if form.is_valid():
instance = ModelClassWithFileField()
instance.uploaded_by = request.user
On Apr 21, 2008, at 10:44 PM, blis102 wrote:
> p.s. FCKeditor's connector feature, which allows you to browse your
> server to insert images, files, and flash, is highly useful, although
> I have not gotten to get it to work with django yet. There is a google
> code project called fckconnector
11 matches
Mail list logo