Re: Fixing makemessages for Javascript

2011-04-24 Thread Aron Griffis
On Thursday, April 14, 2011 12:30:56 PM UTC-4, Jannis Leidel wrote:
>
> On 14.04.2011, at 17:27, Jacob Kaplan-Moss wrote:
>
> > I think I agree with Ned here: I can't see the downside to fixing it
> > on the release branch. "It violates our policy" doesn't count IMO:
> > it's *our* policy, and we get to break it if there's a good reason.
> > Making translation in JavaScript work is a good reason as I see it.
>
> FTR I agree we have an issue here, I just disagree with the proposed fix. 
> If you think we can adopt Babel in the release branch, let's do it.
>
I haven't posted here before, or made any contribution to Django thus far, 
so I recognize in advance that my opinion isn't worth much. However I'm a 
Django user who would benefit from a solution to the Javascript messages 
problem, so I'd like to register my voice. :-)

I'm in favor of Ned's patch for 1.3.x then switching to Babel in 1.4.  As I 
see it, there are two points in favor of Ned's patch: readiness and risk. 
Regarding readiness, Ned's patch is drop-in and the Babel work hasn't been 
done yet. Regarding risk, Ned's patch fixes known-terrible-brokenness in 
Javascript message parsing without introducing much risk, whereas switching 
to Babel carries some (perhaps minor) risk of regressing existing 1.3 
installations so it deserves soaking in the development tree for a while.  
It's interesting to me that Ned pointed out some JS syntax that Babel 
misparses but Ned's jslex gets right, suggesting that Babel may still need 
work too.

Thanks,
Aron

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Re: Review request

2011-04-24 Thread Alex Gaynor
On Sun, Apr 24, 2011 at 6:15 PM, Mathieu Agopian
wrote:

> My turn!
>
> I have reviewed #15885, #15886 (then closed as duplicate), #15887,
> #15891, and #15889.
>
> The latter, #15889 is my first code+patch+doc contribution, and i'd
> like it to be reviewed please.
>
> Thanks!
>
> Mathieu
>
> On Apr 22, 2:13 pm, Jacob Kaplan-Moss  wrote:
> > On Fri, Apr 22, 2011 at 3:26 AM, Aymeric Augustin
> >
> >  wrote:
> > > I have retroactively added 5 tickets for Alex's review, plus 5 tickets
> that
> > > I'd like to trade against a review of #15255, especially the second
> comment.
> >
> > Done!
> >
> > BTW, I'm pretty sure Alex was joking about you needing to do five
> > more, so double thanks. I really appreciate it - let's keep it up!
> >
> > Jacob
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To post to this group, send email to django-developers@googlegroups.com.
> To unsubscribe from this group, send email to
> django-developers+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-developers?hl=en.
>
>
Reviewed.

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Re: Review request: 15064, DJANGO_SETTINGS_MODULE environment variable ignored in runserver.

2011-04-24 Thread Shawn Milochik
Thanks for the info and feedback on the patches today. I'll stop
spamming the list.

Shawn

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Re: Review request: 15064, DJANGO_SETTINGS_MODULE environment variable ignored in runserver.

2011-04-24 Thread Jacob Kaplan-Moss
Hi Shawn --

FYI, we get updates to tickets sent over email (see the django-updates
group) so you don't need to ping here when you've updated something --
we'll see it either way :)

Jacob

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



5-1 offer

2011-04-24 Thread Mathieu AGOPIAN
I'm pretty sure my precedent message got lost :/

I've reviewed the tickets #15833, #15885, #15886, #15887, #15891 and #15889.

The latter (#15889) is my very first contribution of a patch+tests+docs, and 
i'd like it to be reviewed please!

Thanks

Mathieu































-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Re: Review request

2011-04-24 Thread Mathieu Agopian
My turn!

I have reviewed #15885, #15886 (then closed as duplicate), #15887,
#15891, and #15889.

The latter, #15889 is my first code+patch+doc contribution, and i'd
like it to be reviewed please.

Thanks!

Mathieu

On Apr 22, 2:13 pm, Jacob Kaplan-Moss  wrote:
> On Fri, Apr 22, 2011 at 3:26 AM, Aymeric Augustin
>
>  wrote:
> > I have retroactively added 5 tickets for Alex's review, plus 5 tickets that
> > I'd like to trade against a review of #15255, especially the second comment.
>
> Done!
>
> BTW, I'm pretty sure Alex was joking about you needing to do five
> more, so double thanks. I really appreciate it - let's keep it up!
>
> Jacob

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Review request: 15064, DJANGO_SETTINGS_MODULE environment variable ignored in runserver.

2011-04-24 Thread Shawn Milochik
Patch with tests attached to ticket.

http://code.djangoproject.com/ticket/15064

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Updated patch for 15661 (LogEntry objects have no unicode method)

2011-04-24 Thread Shawn Milochik
http://code.djangoproject.com/ticket/15661

Cleaned up at Jacob's suggestion.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Small doc patch for review.

2011-04-24 Thread Shawn Milochik
http://code.djangoproject.com/ticket/15595

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Re: WSGI and multi thread

2011-04-24 Thread Alex Gaynor
On Fri, Apr 22, 2011 at 2:58 AM, Marco Cellarosi
wrote:

> Hi,
> I've tried to switch my site from mod_python to mod_wsgi.
> I would understand how open more process per user.
>
> I mean, I have an application whit Ajax call that remains in loop and every
> 2 milliseconds check a file. In practical, a simple while loop.
> If in 30 seconds it doesn't found anything, it release the process and a
> new one loop started by another Ajax call from the client.
>
> So, my question is: if in that 30 sec. i make 2 or more page refresh, more
> than one process will be created but seems that wsgi not allow it.
> Infact, at the second refresh, the login session is deleted and the login
> page appear (i have @login_required decorator on my main function).
>
> I would know if the problem could be this and if there is an option ti able
> this.
>
> Thanks in advance and sorry for the english..
> Marco
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To post to this group, send email to django-developers@googlegroups.com.
> To unsubscribe from this group, send email to
> django-developers+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-developers?hl=en.
>
>
Hi Marco,

This mailing list is for discussion about the development of Django itself,
not development with Django.  As such this message is off topic, and better
belongs on the django-users mailing list.

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



WSGI and multi thread

2011-04-24 Thread Marco Cellarosi

Hi,
I've tried to switch my site from mod_python to mod_wsgi.
I would understand how open more process per user.

I mean, I have an application whit Ajax call that remains in loop and 
every 2 milliseconds check a file. In practical, a simple while loop.
If in 30 seconds it doesn't found anything, it release the process and a 
new one loop started by another Ajax call from the client.


So, my question is: if in that 30 sec. i make 2 or more page refresh, 
more than one process will be created but seems that wsgi not allow it.
Infact, at the second refresh, the login session is deleted and the 
login page appear (i have @login_required decorator on my main function).


I would know if the problem could be this and if there is an option ti 
able this.


Thanks in advance and sorry for the english..
Marco

--
You received this message because you are subscribed to the Google Groups "Django 
developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Two small tickets, please review.

2011-04-24 Thread Shawn Milochik
I've submitted two (very) small patches. They're my first submissions,
so let the constructive criticism flow freely. I'd like to contribute
to Django more than I have (mostly django-users help), so any advice
that'll help me ease into the role is welcome. I've read the
contribution docs, but it's always possible I've made a mistake.

http://code.djangoproject.com/ticket/15661

http://code.djangoproject.com/ticket/15876

Thanks,
Shawn

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



"Contributing" docs

2011-04-24 Thread Aymeric Augustin
On 22 avr. 2011, at 21:31, Gabriel Hurley wrote:

> I noticed the "TODO" on the bottom of that page you linked... if you actually 
> want to write something up for the docs about reviewing tickets (based on the 
> discussion that's happened on the list the last few days) I'd suggest adding 
> it to the /docs/howto/contribute section. Feel free to ping me if you get a 
> patch written and I'll work with you on getting it in.


Hi Gabriel,

Indeed, when I read Jacob's "how to review unreviewed tickets", I thought it 
was better than everything I had seen in the official docs.

The "contributing" docs are currently split between the following files:
(1) faq/contributing.txt
- reachable through Home > FAQ (link in the side block) > 
Contributing
- first question points to internals/contributing.txt, other 
questions are variants of "why aren't you doing anything for my ticket?"
(2) internals/contributing.txt
- reachable through Home > Community: How to get involved
- "many new contributors find this guide confusing or 
intimidating at first"
(3) howto/contribute.txt
- reachable through a link at the beginning of 
internals/contributing.txt

I think that the best entry point is (3). We should add a link to this document 
in the index page, just before the link to (2). Furthermore, I would like to 
improve it as follows:

- The "Advice for new contributors" section mixes answers to "what can 
I do?" and to "how should I do it?". As a consequence, the answer to "what can 
I do" is not obvious for newcomers. We should give a very simple list ordered 
by increasing difficulty: report issues, review new tickets, write patches, 
review patches. (By the way, the first paragraph of (2) could be clarified in 
similar ways.)

- The doc should be updated to reflect the latest changes in Trac's 
configuration, especially the "Type" and "Easy pickings" fields.

- For each task, there should be a link to the appropriate section of 
(2). In the long term, we could try to make the structure of (2) and (3) 
similar. That would help to keep these docs synchronized and to avoid duplicate 
information.

- The small FAQ at the end should be merged in (1).

This will result in a fairly large change so I'd like to hear your thoughts 
before working on this section of the documentation.

Best regards,

-- 
Aymeric Augustin.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Re: "unique_together" only validated in modelform.is_valid() if ALL of the referenced fields (Ticket #13091)

2011-04-24 Thread Mikhail Korobov
Hi Carl, 

The issue is not only with unique_together indeed. Please correct me if I'm 
wrong, but it seems there is no way currently to use model validation with 
fields dependent on each other when one of these fields is not POSTed 
directly by user. Example:

# models.py
class Ticket(models.Model):
created_by = models.ForeignKey(User, related_name='created_tickets')
responsible = models.ForeignKey(User, related_name='todo')

def clean():
# we don't want to allow tickets where created_by == responsible for 
some reason
from django.core.exceptions import ValidationError
if self.created_by == self.responsible:   
raise ValidationError('Responsible is incorrect.') 

# views.py
class TicketForm(forms.ModelForm):
class Meta:
model = Ticket
exclude = ['created_by']

@login_required
def add_ticket(request):
form = TicketForm(request.POST or None)
if form.is_valid():
ticket = form.save(commit=False)
ticket.created_by = request.user

# todo: handle ticket.full_clean()

ticket.save()
return redirect('ticket_list')
return TemplateResponse(request, 'tickets/add.html', {'form': form})

Model.clean method is always called on form validation (unlike field 
validators that are excluded if field is excluded from form). And we can't 
write validator for 'responsible' field or for 'created_by' field (so that 
it will be excluded from validation on form.is_valid) because this validator 
won't have an access to other model fields. So the only option here seems to 
move validation from model level to form level.

Please consider this use case while rethinking model validation. The 
proposed context manager seems to be a very good idea and I hope it will fix 
this issue as well.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Re: uWSGI documentation

2011-04-24 Thread Roberto De Ioris

> Thanks a lot Roberto and Mikhail for your feedback.
>
> This update includes the changes you requested, as well as more links
> to uWSGI wiki: http://piratepad.net/DISxvZLCdG
>
> Is there any other action to take ?
>
>

Seems very good to me, the only thing that i would really change is --home
to --chdir
as --home is used for virtualenv. In my experience using --chdir with django
causes less headache to users.

Probaly you could add the same example written with a ini file too, only
to show users that they not need to write such huge command lines :)

Another (maybe important) note to add is that uWSGI does not run on Windows

-- 
Roberto De Ioris
http://unbit.it

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



Re: uWSGI documentation

2011-04-24 Thread is_null
Thanks a lot Roberto and Mikhail for your feedback.

This update includes the changes you requested, as well as more links
to uWSGI wiki: http://piratepad.net/DISxvZLCdG

Is there any other action to take ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.