Re: Fixing makemessages for Javascript

2011-04-19 Thread Jonathan Slenders
tead of the ugly {% trans %} within quotes have no more disadvantages. And while everything is processed, it's rather easy log all the strings which are to be translated on the way. Cheers, Jonathan On 19 avr, 15:50, Łukasz Rekucki wrote: > On 19 April 2011 15:35, Jonathan Slenders

Re: Suggestion for improvement to template block/extends tags

2011-04-29 Thread Jonathan Slenders
Hey, this pattern are nested decorators in templates. Most people here are probably against having nested template tags with the same name. I think it does only make sense when there's somehow a distinction between a "placeholder" and "content". Because otherwise, templates don't know which block

Re: Suggestion for improvement to template block/extends tags

2011-05-04 Thread Jonathan Slenders
ommonly used in languages like XAML.net. It is more readable and compact than the only current alternative: including a template and using {% extends %} inside the include. cheers, Jonathan -- You received this message because you are subscribed to the Google Groups "Django developers"

Re: Django urls in JavaScript

2011-05-04 Thread Jonathan Slenders
ations. And further, I think that the urls and names of views are not meant to be exposed to the client. I don't want a visitor to be able to reverse engineer my website, and read all the possible URL patterns. Jonathan -- You received this message because you are subscribed to the Google Gro

Bug in DateTimeInput: localization formatting decided during start-up?

2011-05-09 Thread Jonathan Slenders
round this issue is welcome :) Cheers, Jonathan I propose that Field.__init__ should have localize=None, and if no localize parameter has been given, set self.localize according to USE_L10N in the settings. -- You received this message because you are subscribed to the Google Groups &q

Re: Bug in DateTimeInput: localization formatting decided during start-up?

2011-05-16 Thread Jonathan Slenders
Ticket created. http://code.djangoproject.com/ticket/16038 -- 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-develo

Re: RFC: Templatetag API for form rendering

2011-05-23 Thread Jonathan Slenders
1. Like Carl said, I always prefer template tags which alter the context to create a scope. (I hate {% url ... as varname %}) {% form "table" %} {% renderform my_form %} {% endform %} 2. Also totally agreed with Russell that we need consistency about when template tag parameters need to be q

Template inheritance and duplicated content.

2011-05-24 Thread Jonathan Slenders
art using this flaw as a kind of macro-feature, to intentionally duplicate content. Jonathan -- 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 unsubscrib

Re: Template inheritance and duplicated content.

2011-05-24 Thread Jonathan Slenders
Even more confusing, but extremely great to abuse! base.html {% block a %}{% endblock %} {% block b %}{% endblock %} {% block c %}{% endblock %} {% block d %}{% endblock %} {% block e %}{% endblock %} index.html {% block a %} {% block b %} {% block c %} {% blo

Re: jQuery.tmpl() and Django

2011-05-26 Thread Jonathan Slenders
% verbatim "===" %} ... {% "===" %} Cheers, Jonathan On 27 mai, 07:04, Sean O'Connor wrote: > I think it would be a bit much for us to ask the jQuery crew to change their > template language to avoid conflict with ours. Aside from the amount of > backwards incompatible wor

Re: jQuery.tmpl() and Django

2011-05-27 Thread Jonathan Slenders
RT,BLOCK_TAG_END,...} On 27 mai, 09:07, Michael Blume wrote: > Would it be possible to customize the markup Django uses for template > compilation, either at the project level, at compile-time, or embedded in > the template itself? > > -Mike > > On Thu, May 26, 2011 at

{% trans %} and safestring.

2011-05-30 Thread Jonathan Slenders
This is something I have been questioning myself for a while now. Is the current behaviour of {% trans %} like it should? We have safe_string, which marks a string as safe for being rendered in HTML. {% trans %} blocks appear to be always considered safe. So {% trans "test" %} will render strong

Re: Vote on {% include %} behaviour.

2011-06-03 Thread Jonathan Slenders
clude behaviour when using variable template names. Maybe anyone else? Cheers, Jonathan -- 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 unsubscrib

Re: get_object_or_404 hook

2011-06-09 Thread Jonathan Slenders
Indeed, this is nothing that has to be in the Django core. You can do something like this: http://dpaste.com/hold/552209/ Although, I do not think that's the best solution. By catching all DoesNotExist errors, the Django middleware will not receive the exception anymore and exception logging fram

Re: Django Error Display Page

2011-06-09 Thread Jonathan Slenders
On 9 juin, 10:51, Tom Evans wrote: > I disagree entirely. The stack trace is the first thing I look at, and > whilst we need to make it easy for people to learn django, we > shouldn't be hiding essential information from people - even if it is > just hidden in a separate 'tab'. Me too. Why is

WSGIRequest._stream.read() blocking

2011-06-14 Thread Jonathan Slenders
Django, but I'm not sure where exactly. By the way, it would also be great if anybody knows how to use pdb statements, while running uwsgi on the console. Thanks! Jonathan -- You received this message because you are subscribed to the Google Groups "Django developers" group. T

Re: WSGIRequest._stream.read() blocking

2011-06-14 Thread Jonathan Slenders
if I replace: > if type(socket._fileobject) is type and > isinstance(self.environ['wsgi.input'], socket._fileobject): by: > if True in django.core.handlers.wsgi.py Then, everything works perfect, so it has to be in this check. -- You received this message because you are subscribed to the Go

Re: WSGIRequest._stream.read() blocking

2011-06-14 Thread Jonathan Slenders
Thanks Roberto, We had UWSGI 0.9.6.8 installed first. Now I did an upgrade to 0.9.8 and now everything works perfect. Thanks a lot for the quick response. On 14 juin, 15:00, Roberto De Ioris wrote: > Il giorno 14/giu/2011, alle ore 14.54, Jonathan Slenders ha scri

Re: Reversing translated urls in templates

2011-07-05 Thread Jonathan Slenders
I'm also +1 on {% language lang_code %}... {% endlanguage %} We are using exactly this template tag for maybe about half a year already. Not for i18n urls, but for formatting numbers. The decimal separator in Dutch is a comma, but sometimes we want to be sure to have a dot a some part of the templ

Re: Consistent exception handling in templates.

2011-07-08 Thread Jonathan Slenders
Something related I was wondering about... Errors in templates should be silenced -- I agree with that -- but only when they are caused by an error in the template. Variable.resolve can fail silent because that's caused by the template author, who is referring to non-existing variables. However,

Re: minify static files (css and js)

2011-08-08 Thread Jonathan Slenders
This one is a more powerful compressor, but does not easily work out of the box on every website: https://github.com/citylive/django-template-preprocessor I personally think there are too many ways of minifying content. Minifying is about making assumptions about what information in the files you

Re: RFC: staticfiles "static" template tag and CachedStaticFilesStorage

2011-08-11 Thread Jonathan Slenders
from staticfiles.utils import staticfile_open filepointer = staticfile_open('my-relative-path...') Thanks, Jonathan On 8 août, 12:17, Jannis Leidel wrote: > Hi all, > > I believe I'm getting close to a fix for #15252 which would add > a bunch of new features to the staticfiles c

Re: Advice on #13260 - '%' in args to urlresolvers.reverse()

2011-08-23 Thread Jonathan Slenders
se('my_page') We should also make a decision about whether the regex in the urlpatterns are written quoted or unquoted. I would say, keep these unquoted for readability. >> url(r'^some-%-url/$', ...) If we have the following patterns: >> url(r'^(?Psome-%-url)/$&#x

Re: RFC: "universal" view decorators

2011-09-16 Thread Jonathan Slenders
I agree with Donald's reasoning. Decorators belong to functional programming, not to OO programming. Though, I still like to keep using functions for my own views and there are decorators appropriate. But if you go class based, you better use inheritance. However, instead of mix-ins, I'd rather pr

Re: Deploying Feature in manage.py

2011-10-24 Thread Jonathan Slenders
ource code on github and I'll post a link in django-users -- hopefully somewhere within the following two weeks. By the way, any input of what you think a deployment tool should have, or what you think that other tools lack is welcome. (send me in PM) Cheers, Jonathan -- You received

Re: common variable (Deploying Feature in manage.py)

2011-10-25 Thread Jonathan Slenders
production or not. The only reason for such a variable to exists, may be to decide between several other settings to include. Correct me if you think differently. Cheers, Jonathan -- You received this message because you are subscribed to the Google Groups "Django developers" group. T

Newish developer contributing to project?

2008-06-14 Thread Jonathan Lukens
Let me preface this by saying, at the risk of sounding schmaltzy, that Django has made me a happier person. So, if possible, I would like to give back a little. I have no formal training in programming. About five years ago, I started futzing around with PHP every couple of months, then putting t

Re: Newish developer contributing to project?

2008-06-14 Thread Jonathan Lukens
Thanks Russ and Kenneth, I will follow your suggestions and hopefully somethign positive will come of it. Jonathan On Jun 14, 9:48 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Sat, Jun 14, 2008 at 9:29 PM, Jonathan Lukens > > <[EMAIL PROTECTED]> wrot

Re: Call for testing: streaming uploads (#2070)

2008-07-01 Thread Jonathan Hseu
) have file objects that UploadedFile can return, so why not put it in the API? Thanks, Jonathan Hseu On Jun 26, 2:14 pm, "Jacob Kaplan-Moss" <[EMAIL PROTECTED]> wrote: > Hi folks -- > > As far as I'm concerned, #2070, adding large streaming uploads, is > done. I'd li

Ticket #7593, or UploadedFile as a file-like object.

2008-07-22 Thread Jonathan Hseu
#x27;t work on some filesystems, e.g. any windows filesystem) or we need to save it to the hard drive again in a separate location. Thanks, Jonathan Hseu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djan

DjangoCon meetup Friday Sept 5

2008-08-20 Thread Jonathan Nelson
nd some place else. If anyone else can think of a better place to post this information, let me know. Comments and thoughts are always welcome. Jonathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: DjangoCon meetup Friday Sept 5

2008-08-21 Thread Jonathan Nelson
TWID guys? I'd be happy to combine groups. I just don't know who that is. Jonathan On Aug 20, 9:39 pm, "Eric Holscher" <[EMAIL PROTECTED]> wrote: > I think the TWID guys are doing something as well. Might want to combine > groups. > > Eric > > On We

Re: DjangoCon meetup Friday Sept 5

2008-08-25 Thread Jonathan Nelson
with www for me, so try: > > http://thisweekindjango.com/ > > On Thu, Aug 21, 2008 at 9:01 PM, Mike Scott <[EMAIL PROTECTED]> wrote: > > > On Thu, Aug 21, 2008 at 7:54 PM, Jonathan Nelson <[EMAIL PROTECTED]>wrote: > > >> TWID guys?  I'd be happy to combine

Re: Status Post of Django-newcomments

2008-08-25 Thread Jonathan Nelson
ank the following people: > * Jacob for writing some wonderful code that I could use > * Jannis Leidel (my mentor) for trusting me and giving me a free hand > in choosing the approach and constantly reminding of my goal. > * Eric Florenzano for the threaded-comments inspiration. >  * Jon

Re: DjangoCon meetup Friday Sept 5

2008-09-04 Thread Jonathan Nelson
I haven't heard anything either. So, if people are still interested in getting together, there's more information here: http://django.meetup.com/3/ Let me know if you have any questions. Otherwise, we'll see you this weekend. Jonathan On Aug 28, 1:12 pm, "John-Sco

Keep template tags grammar (for simple_tag, assignment_tag and inclusion_tag. Extend with block_tag). Ticket 20434 and 20435.

2013-05-20 Thread Jonathan Slenders
What do you think would be good as a format, maybe the following? if elif* else? endif for empty? endfor ... ... Further, the following line does not say anything about the template tag parameters. @register.block_tag('if elif* else? endif') Should we add some syntax to tell which t

Re: Keep template tags grammar (for simple_tag, assignment_tag and inclusion_tag. Extend with block_tag). Ticket 20434 and 20435.

2013-05-24 Thread Jonathan Slenders
de, etc... part of the public API? They don't appear anywhere in the documentation. It is because if I implement the new template tag definitions, I'l like to refactor all the built-in template tags to use the new style. (As using more of Django -- inside Django.) And this can probably break

Re: Not calling things twice in templates

2013-06-03 Thread Jonathan Slenders
Hi all. In the past, I once proposed a decorate template tag, but it was disapproved back then. This would be another solution, to make the template language a lot more powerful. 1. First you define a decorator, for the behaviour you'd like to have. The "data" parameter indicates the receiving

Re: Not calling things twice in templates

2013-06-03 Thread Jonathan Slenders
By the way, this could also be implemented using just files. The way {% include %} works for macros. If that's preferred. That becomes: {% decorate "my_special_for.html" data %} {{ i.value }} {% enddecorate %} Le lundi 3 juin 2013 13:38:29 UTC+2, Jonathan Slenders a écr

Re: Not calling things twice in templates

2013-06-03 Thread Jonathan Slenders
We don't even have to change the for-syntax: {% for bee in my_bonnet.bees %} {% loop %} {{ bee }} {% endloop %} {% empty %} No bees! {% endfor %} Le mardi 4 juin 2013 00:03:12 UTC+2, Shai Berger a écrit : > > > {% for my_bonnet.bees %} > >

Re: Keep template tags grammar (for simple_tag, assignment_tag and inclusion_tag. Extend with block_tag). Ticket 20434 and 20435.

2013-06-05 Thread Jonathan Slenders
If someone has some spare time. Take a look at this ticket: https://code.djangoproject.com/ticket/20434 The implementation is finished and consists of 4 patches. See the ticket for more information. Thanks! -- You received this message because you are subscribed to the Google Groups "Django de

Re: Limitation for Named Urls for reverse url resolve.

2013-07-12 Thread Jonathan Baker
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. > V

Re: Hybrid Property request

2013-07-17 Thread Jonathan Slenders
This is really nice. Both have their use cases, but I'm prefering the second when possible, because it's much more flexible and preserves database consistency. With the same efford you can make the following work: ProductEntry.objects.filter(lambda p: p.onpurchase_price * p.quantity == 5000.0)

Re: Hybrid Property request

2013-07-17 Thread Jonathan Slenders
Oh, and denormalisation is not necessarily faster. If you're able to express the value of the column as an SQL expression, it's possible to put an index on such an expression. Le mercredi 17 juillet 2013 13:18:16 UTC+2, Jonathan Slenders a écrit : > > This is really nice. Bot

Re: Support POST of application/json content type

2013-09-04 Thread Jonathan Slenders
Would that mean that the object returned by request.DATA/POST/whatever could be a different type, depending on what the user posted? I don't want to see code like: if isinstance(request.DATA, YamlObject): ... elif isinstance(request.DATA, dict): ... although, I'm not sure how any view could han

Re: Add strutctured settings module to django 1.7?

2013-10-02 Thread Jonathan Slenders
There's nothing that prevents anyone to track the configuration of the environment in a VCS. The guideline that it shouldn't be in the repository of the application source code is not against that. Deployment systems should be able to set-up the environment automatically, (by generating a setti

An argument against mark_safe.

2013-10-16 Thread Jonathan Slenders
Currently, on python-ideas there is a discussion going on about taint tracking in Python. It's tracking data that come from untrusted sources and preventing it from being used in sensitive places. This video [1] from last year explains the problems very well. In noticed that we can do better

Possible idea for removing global state in Django.

2013-10-16 Thread Jonathan Slenders
on projects and that unit testing becomes easier: you don't have a global state. What do you think? I don't see real backward-compatibility issues that we can't solve. Do I forget something? Cheers, Jonathan [1] https://www.youtube.com/watch?v=0FD510Oz2e4 [2] https://github.

Re: Possible idea for removing global state in Django.

2013-10-16 Thread Jonathan Slenders
Le jeudi 17 octobre 2013 01:26:20 UTC+2, Russell Keith-Magee a écrit > What's wrong with thread local storage? Well, try this though experiment. > > Everywhere that you see the word "thread local", replace it with "global > variable". Now re-read your argument. > > It doesn't matter how you

Re: Possible idea for removing global state in Django.

2013-10-21 Thread Jonathan Slenders
equivalent to regular >> variables in >> > tests because they are single threaded (with a handful of exceptions). >> But >> > allowing testing in isolation is a major goal of "removing global >> state". >> >> If I understand correctl

Re: Add a generic "getter" filter to the built-in library

2013-11-04 Thread Jonathan Slenders
gs, but not against filters.) B.t.w. if anyone has template engine related patches ready, I'm always willing to review it. Cheers, Jonathan Le lundi 4 novembre 2013 01:24:45 UTC+1, Russell Keith-Magee a écrit : > > > On Sun, Nov 3, 2013 at 9:57 PM, Emanuele Bertoldi > >

Re: Add a generic "getter" filter to the built-in library

2013-11-04 Thread Jonathan Slenders
Le lundi 4 novembre 2013 14:13:44 UTC+1, Emanuele Bertoldi a écrit : > What about the *add* filter? ;) > I forgot about that one. However, there's probably a reason. It's hard to fix the templating engine and implement a "+" operator. Because people would expect that whitespace around the "+"

Re: Self-referenced template recursion handling

2013-12-08 Thread Jonathan Slenders
Do we ever intend to implement something like collect_templates in the future? Similar to collect_static? If so, implementing this would break collect_templates or the similarity that we currently have in how app directories are processed. This is actually the monkey-patching way of writing templ

Re: [GSoC] Switching to Jinja2 proposal

2014-02-10 Thread Jonathan Slenders
For any refactoring of the template engine, going to jinja2, etc... it would very much help to look at this ticket first: https://code.djangoproject.com/ticket/20434 It's a backwards compatible patch, which allows template tags to be written in a much more declarative way, without exposing any

Re: Issue with save/save_model/clean from admin (django 1.6.3dev)

2014-02-25 Thread Jonathan Pentecost
I _think_ your problem might lie in the confusion between "blank" and "null"; taken from https://docs.djangoproject.com/en/dev/ref/models/fields/#blank; null is purely database-related, whereas blank

Re: The unsettings project

2014-02-25 Thread Jonathan Slenders
Not sure whether this has already been covered. Maybe it is. I'd like to specify the settings as a class instead of a module. Mostly because I don't like the "from settings_local import *" pattern to extend some base settings with machine specific settings. By having the possibility to define i

Solving the select+1 problem.

2014-06-11 Thread Jonathan Slenders
facebook/Haxl/tree/master/example/sql I don't know enough Haskel to understand this code, but it could contain some very nice ideas that apply to our ORM as well. Cheers, Jonathan -- You received this message because you are subscribed to the Google Groups "Django developers" group.

Re: Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-03 Thread Jonathan Slenders
It's not similar. This implements the "decorator" pattern. Something that I've been proposing years ago. Le mercredi 3 septembre 2014 18:24:17 UTC+2, Ian a écrit : > > On Wed, Sep 3, 2014 at 10:10 AM, Sam Willis > wrote: > > Although I have implemented this with the 'use' word, there may be a

Re: Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-03 Thread Jonathan Slenders
From 2011: https://github.com/vikingco/django-template-tags/blob/master/src/django_template_tags/templatetags/decorate.py My proposal was refused back then, but I'll be very happy if something similar would make it. :) Le mercredi 3 septembre 2014 18:42:44 UTC+2, Jonathan Slenders a

Re: Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-05 Thread Jonathan Slenders
There I think you are going one step too far. I think people should not be able to override blocks inside an included template in a "use"-block. That's one level too deep. It's confusing and you have other solutions for that. In the template that you "use", you could put a {% block %} around the

Re: new to contributing to open source

2019-12-14 Thread Jonathan Jackson
Hi all I a just beginning to learn Django today and I would like to get involved with the community. Let me know how I can help out. I will join the IRC so to. On Friday, November 29, 2019 at 7:41:13 AM UTC-5, Shruti Satish wrote: > > please point me to new and relatively easy bug fixes and also

Can I help?

2021-11-28 Thread Allen Jonathan
Dear Django Contributors, Hello! My name is Allen Jonathan. I'd love to contribute to the Django framework. I have a decent knowledge of python and a little of Django too. I'm a fast learner and can learn on the go. Please guide me on how to get started (even if its documentation

Threads and requests with Channels 2.0

2018-03-20 Thread Jonathan Stray
d how this is possible in one Python process given the Global Interpreter Lock. Basically I am trying to reason about race conditions and scaling, and I don't have enough understanding to do it. Apologies if this is document elsewhere, but I've so far not been able to find it. - Jo

get_next_by_FOO from a custom manager

2007-06-13 Thread Jonathan Stockdill
I have a custom manager and if I have a list of objects and call a get_next_by_FOO method on one of the objects, it retrieves the next object from the default manager, not the next object in the custom manager. Is it possible to use a different manager than the default manager with the ge

Re: ANN: Django sprint, December 1st

2007-11-07 Thread Jonathan Buchanan
Kenneth Gonsalves wrote: > > On 08-Nov-07, at 6:47 AM, Kenneth Gonsalves wrote: > >>> Django bells, Django bells, >>> Django all the way; >>> Oh what fun it is to code >>> In a well-designed dynamic language! >> In an open source way! > &

Re: contrib.auth and User model

2007-11-08 Thread Jonathan Buchanan
ot; Returns the ForumProfile for the given user, creating it first if necessary and caching it the first time it is looked up. """ if not hasattr(user, '_forum_profile_cache'): profile, created = self.get_or_create(user=us

Re: contrib.auth and User model

2007-11-08 Thread Jonathan Buchanan
On Nov 8, 2007 7:41 AM, Alexander Solovyov <[EMAIL PROTECTED]> wrote: > > On Nov 8, 2007 2:21 PM, Jonathan Buchanan <[EMAIL PROTECTED]> wrote: > > On this particular point, from the perspective of the reusable > > applications themselves, you don't need to wor

<    1   2