Re: Proposal to format Django using black

2019-04-27 Thread Max Arnold
Once the DEP is ready, maybe it would make sense to discuss the 
above-mentioned concerns with Ɓukasz Langa? Black is quite opinionated, but 
Django is a well-known project in the Python ecosystem, and its weight 
could lead to some adjustments (or at least future stability guarantees) in 
black?

On Saturday, April 27, 2019 at 2:07:00 PM UTC+7, Aymeric Augustin wrote:
>
> I'm writing a DEP.
>
> -- 
> Aymeric.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/3b89bdd3-765f-410e-94fc-c322158773c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Replacing the contrib.sites Site model with a setting?

2016-01-29 Thread Max Arnold
What if this list of sites needs to be changed dynamically without app restart 
(multitenancy)?

On Fri, Jan 29, 2016 at 12:45:02PM -0800, Tim Graham wrote:
> In another thread about adding a "scheme" field to the Site model [1], I 
> floated the idea of moving the data stored by the Site model into a setting:
> 
> I've sometimes thought that the Site model violates the principle that you 
> shouldn't put configuration in your database. I guess there's some 
> usefulness to having a ForeignKey to the site, but... would it be feasible 
> to offer a SITES setting that could be used instead? e.g.
> 
> SITES = {
> 1: {'scheme': 'http', 'domain': example.com, 'name': 'My Site'},
> ...
> }

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/20160130070141.GA2770%40otg.dm.
For more options, visit https://groups.google.com/d/optout.


Re: Per-country URLs

2014-07-08 Thread Max Arnold
On Tue, Jul 08, 2014 at 04:42:14PM +0200, Aymeric Augustin wrote:
> Hello,
> 
> Since Django 1.4, it's possible to localize URL patterns with
> i18n_patterns. I have a slightly different use case. I need URLs in the
> form /// in order to implement country-specific behavior
> (eg. taxes, local regulations, etc.).

I had quite similar need some time ago: 
https://code.djangoproject.com/ticket/20125

My approach was to add full locale in the form LL-CC (language-country) to each 
url
and set per-request locale based on this prefix (probably with some mapping). I 
did
some prototyping with locale selector (see ticket attachment).

-- 
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/20140708162212.GA58654%40otg.
For more options, visit https://groups.google.com/d/optout.


Re: Odp: Re: Odp: Re: Storing language in session/cookie

2011-06-27 Thread Max Arnold
Another approach is to store language in the url (useful for mobile handsets 
where disabled or unsupported cookies is still an issue).  Django app which 
uses this method: https://bitbucket.org/carljm/django-localeurl

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-developers/-/KD9VoA6u6sEJ.
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.