Re: On django multi tenancy

2014-04-30 Thread Riccardo Magliocchetti

Hi Eduardo,

[adding Stephen McDonald to CC]

Il 29/04/2014 21:43, Eduardo Rivas ha scritto:

Mezzanine, a Django based CMS, has true multi tenancy. I've used it and
works great. However, it's clear it's not something that should be in
Django's core, for the reasons other have stated. I'm just bringing it
up in case OP is still looking for something like this for his projects;
not trying to restart the debate.

http://mezzanine.jupo.org/docs/multi-tenancy.html
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/utils/sites.py#L12


Thanks for the info, was not aware of that. The functionality looks the 
same as the patch below [1] attached to #15089 except they save the 
site_id for the request in an external cache. It looks like if the patch 
goes in they could leverage get_current_site(request) with empty 
settings.SITE_ID just fine.


Let me say again the what i'm pushing to have in django is to have 
django.contrib.sites return a Site based on the request instead of the 
one hardcoded in settings.SITE_ID.


thanks,
riccardo

[1] 
https://code.djangoproject.com/attachment/ticket/15089/0001-Make-settings.SITE_ID-optional-for-django.contrib.si.patch



--
You received this message because you are subscribed to the Google Groups "Django 
developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/5360A829.9000609%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Support byte range requests in django.views.static.serve

2014-04-30 Thread prathamesh juvatkar


I am building a music player application with Django + nginx for which I 
need a backend which supports byte range requests.

Django is authenticating the media file correctly but django dev server 
does not support range requests (206 partial response). Nginx directly 
serves byte range requests after using this 
configuration,
 
I verified that the response header has content range. However I am unable 
to forward the request from django to nginx, to serve the content.

I tried using 
X-Accel-Redirect
 in 
a django view but still the response header doesn't have content range the 
way it would have been if the file had been directly served by nginx.

   - Django dev server - Authentication done but no byte range support 
   (response 200)
   - Nginx - No authentication, byte range request support (response 206)
   - Django view + X-Accel-Redirect + nginx - Authentication done but no 
   byte range support (response 200)

So I am trying to find a way to authenticate using Django and provide 
support for byte range requests with nginx or another static file server.

On Monday, April 14, 2014 9:00:37 AM UTC+5:30, md...@pdx.edu wrote:
>
> Is the Django community interested in supporting HTTP range requests in 
> django.views.static.serve
> ?
>
> The primary benefit I see is that it makes files served up for  and 
>  "seek-able" with the django server. This generally isn't a problem 
> for small files (except in 
> Chrome),
>  
> but becomes an issue for larger ones.
>
> Werkzeug has a function that parses the range 
> header,
>  
> which I used to support range requests in a Django application. I estimate 
> that robust support for HTTP range requests would cost <300 lines of code, 
> plus tests.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/dc0e3e53-b065-4201-841d-59ce28255c72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Support byte range requests in django.views.static.serve

2014-04-30 Thread phpdude
can you show the code example for your way #3?

looks like you done this wrong.

i build in past same thing with php (for nginx is not difference in backend 
when it return only header).



-- 
phpdude

From: juvatkar prathamesh prathamesh.juvat...@gmail.com
Reply: django-developers@googlegroups.com django-developers@googlegroups.com
Date: 1 мая 2014 г. at 1:46:46
To: django-developers@googlegroups.com django-developers@googlegroups.com
Subject:  Re: Support byte range requests in django.views.static.serve  

I am building a music player application with Django + nginx for which I need a 
backend which supports byte range requests.

Django is authenticating the media file correctly but django dev server does 
not support range requests (206 partial response). Nginx directly serves byte 
range requests after using this configuration, I verified that the response 
header has content range. However I am unable to forward the request from 
django to nginx, to serve the content.

I tried using X-Accel-Redirect in a django view but still the response header 
doesn't have content range the way it would have been if the file had been 
directly served by nginx.

Django dev server - Authentication done but no byte range support (response 200)
Nginx - No authentication, byte range request support (response 206)
Django view + X-Accel-Redirect + nginx - Authentication done but no byte range 
support (response 200)
So I am trying to find a way to authenticate using Django and provide support 
for byte range requests with nginx or another static file server.


On Monday, April 14, 2014 9:00:37 AM UTC+5:30, md...@pdx.edu wrote:
Is the Django community interested in supporting HTTP range requests in 
django.views.static.serve?

The primary benefit I see is that it makes files served up for  and 
 "seek-able" with the django server. This generally isn't a problem for 
small files (except in Chrome), but becomes an issue for larger ones.

Werkzeug has a function that parses the range header, which I used to support 
range requests in a Django application. I estimate that robust support for HTTP 
range requests would cost <300 lines of code, plus tests.
--
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/dc0e3e53-b065-4201-841d-59ce28255c72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/etPan.5361461d.2463b9ea.1212%40MacBook-Pro-dude.local.
For more options, visit https://groups.google.com/d/optout.


error in "makemessages" command on latest django version (1.8dev)

2014-04-30 Thread Fabio Caritas Barrionuevo da Luz
Hello sorry if this is not the correct place for these questions
I was testing the latest version of Django[1] directly from Github and am 
having this problem.

In this link you can see all the steps I did to get this error

https://asciinema.org/a/9213

I try:

python manage.py makemessages

Result in this: 

*optparse.OptionConflictError: option -e/--extension: conflicting option 
string(s): -e*

That would be a bug or am I doing something wrong



[1] 
https://github.com/django/django/tree/8f6dff372b174e772920de6d82bd085f1a74eaf2

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/97fc2fcc-4ac7-46dd-aef2-9ab42f5608b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: error in "makemessages" command on latest django version (1.8dev)

2014-04-30 Thread Baptiste Mispelon

Hi,

No need for apologies: your message is completely appropriate for this 
mailing list.


I can reproduce the issue you're describing and it does look like a bug.
It seems to have been introduced by this commit: 
https://github.com/django/django/commit/0707b824fe77e08ca8b75fcc3738ada694f2a3a6.


Would you mind opening a new ticket for this on 
https://code.djangoproject.com/newticket?


Thanks!

On 05/01/2014 04:35 AM, Fabio Caritas Barrionuevo da Luz wrote:

Hello sorry if this is not the correct place for these questions
I was testing the latest version of Django[1] directly from Github and 
am having this problem.


In this link you can see all the steps I did to get this error

https://asciinema.org/a/9213

I try:

python manage.py makemessages

Result in this:

*optparse.OptionConflictError: option -e/--extension: conflicting 
option string(s): -e*


That would be a bug or am I doing something wrong



[1] 
https://github.com/django/django/tree/8f6dff372b174e772920de6d82bd085f1a74eaf2 


--
You received this message because you are subscribed to the Google 
Groups "Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-developers+unsubscr...@googlegroups.com 
.
To post to this group, send email to 
django-developers@googlegroups.com 
.

Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/97fc2fcc-4ac7-46dd-aef2-9ab42f5608b0%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django 
developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/5361CE75.2080707%40gmail.com.
For more options, visit https://groups.google.com/d/optout.