Feature request: wigets attribute for ModelFormMixin class

2021-02-17 Thread Jonas Kiefer
# Feature request: wigets attribute for ModelFormMixin class ### Status quo The `ModelFormMixin` class currently implements the `fields` attribute by it self and pass it to the `modelform_factory`: ```python class ModelFormMixin(FormMixin, SingleObjectMixin): """Provide a way to show and h

#29752 Adding a ALLOWED_HOSTS_IGNORABLE_URLS setting

2018-09-14 Thread Jonas H
lth checks made by AWS ECS/Fargate – google "django allowed_hosts aws" and find 16,000 results with tips how to work around the problem. I'd like to discuss the addition on this list as per Tim's triage. Jonas -- You received this message because you are subscribed to the Goo

Re: Runtime error

2017-11-09 Thread Jonas H
Not sure if this is what's meant by the first post, but I got very confused the other day by the ./runtests.py script: If you run ./runtests.py ../tests/foo, it crashes with all sorts of "X doesn't declare explicit app label" exceptions. If you run ./runtests.py foo, it works. Not sure why I e

#28788: Add support for Model.clean_

2017-11-09 Thread Jonas Haag
logic, particularly if subclasses are involved. Backwards compatibility is an issue with my suggestion that is yet to be solved. We don’t want surprising calls to clean_XXX methods that were defined before this feature was introduced. I’m curious to hear what everyone else thinks! Jonas -- You re

Automatically redirecting to language URL

2017-10-26 Thread Jonas Haag
/e37b72f2270cb4038a808fbdbac6a1b9 <https://gist.github.com/jonashaag/e37b72f2270cb4038a808fbdbac6a1b9> Question 1: Is there a smarter way to find the correct URL? Question 2: Do think this could be useful in Django proper? It could easily live in a third-party module as well. Jonas -- You receive

Re: Templates: __html__ method support

2017-09-26 Thread Jonas Haag
> Am 26.09.2017 um 22:50 schrieb Aymeric Augustin > : > > Hello, > > This could be a regression because > https://github.com/django/django/commit/3483682749577b4b5a8141a766489d5b460e30e9 > > > looks like it i

Re: Templates: __html__ method support

2017-09-26 Thread Jonas Haag
> Aymeric Augustin: > >> On 26 Sep 2017, at 22:56, Jonas Haag > <mailto:jo...@lophus.org>> wrote: >> >> Without having had a look at any of the links you’ve posted, this does NOT >> work in Jinja2 the way I suggested: >> >>

Re: Templates: __html__ method support

2017-09-26 Thread Jonas Haag
> Aymeric Augustin: > This could be a regression Without having had a look at any of the links you’ve posted, this does NOT work in Jinja2 the way I suggested: >>> jinja2.Template('{{foo}}').render({'foo': Money('1', '$')}) '$ 1' So whatever the changes for better __html__ interoperability wer

Re: Templates: __html__ method support

2017-09-26 Thread Jonas Haag
> Collin Anderson: > I think this is a good idea. Django has used __html__ internally for the last > 4 years so it's not something new [0]. I'm surprised this doesn't work > out-of-the box. I too expected this to work already, and I was surprised to find it doesn’t. Hence this thread. (It also

Templates: __html__ method support

2017-09-26 Thread Jonas H
45cc336f669919047bf46b75/django/template/base.py#L977). My suggestion is to change the behaviour of that function so that it works as follows: - Given I write {{ foo }} - Does foo have a __html__ method? If yes, return `foo.__html__()` - Otherwise, return `conditional_escape(str(foo))` Do think

Re: Admin changelist turns QueryDict into dict

2016-12-01 Thread Jonas von Poser
Thanks, I will! Jonas Am Mittwoch, 30. November 2016 22:31:19 UTC+1 schrieb Adam Johnson: > > I suspect it was simply to make it easier to work with. > > I'd suggest you create a ticket at > https://code.djangoproject.com/newticket and then try making the change > and

Admin changelist turns QueryDict into dict

2016-11-30 Thread Jonas von Poser
#diff-ea7d8c684e252f3dad6aa458df7d3070R109>" in 2005. Does anyone know why this was done? Shouldn't we rather keep self.params as a QueryDict? Thanks! Jonas -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Dj

Re: Possible bug transaction rollback or SQLite backend

2015-12-09 Thread Jonas H.
> On 03 Dec 2015, at 17:04, Carl Meyer wrote: > >> I use Python 3.5, SQLite 3.9.2 and I can reproduce the crash on Django >>> =1.8.4,<1.9. > > This might be useful information to add to > https://code.djangoproject.com/ticket/24080, if it's not already present > there. > > Does the version ran

Re: Possible bug transaction rollback or SQLite backend

2015-12-03 Thread Jonas H
Tim, thanks for the pointer. I'm not sure if my issue is related. I've found a minimal example for another (same?) issue: https://code.djangoproject.com/ticket/25860 -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itsel

Possible bug transaction rollback or SQLite backend

2015-12-03 Thread Jonas H
`needs_rollback=True` whenever `_cursor()` fails in L206, so I figured maybe there might be an outstanding rollback for some reason? I use Python 3.5, SQLite 3.9.2 and I can reproduce the crash on Django >=1.8.4,<1.9. Jonas -- You received this message because you are subsc

Django 1.9 AppRegistryNotReady

2015-09-28 Thread Jonas H
sglass/django_polymorphic. So maybe this should be fixed, if possible, for Django 1.9; or deliberately not fixed to force people adhere the "don't import models in __init__" policy. Jonas -- You received this message because you are subscribed to the Google Groups "

Re: Django 1.6RC1 exclude behavior change

2013-11-07 Thread jonas gastal
LGTM On Thu, Nov 7, 2013 at 8:40 AM, Elyézer Rezende wrote: > +1 > > This gives an overview that what behaviours users could find when dealing > with some use cases of the ORM. > > > > On Wed, Nov 6, 2013 at 6:14 PM, Anssi Kääriäinen > wrote: >> >> >> >> On Tuesday, November 5, 2013 1:02:41 PM U

Re: Django 1.6RC1 exclude behavior change

2013-11-05 Thread jonas gastal
I wouldn't ask for a bug that has long existed to be considered a release blocker. However a behavior change with no documentation is not a nice thing to do to your users, it seems to me Elyézer makes a good suggestion, informing users of the known bug in the release notes seems quite reasonable.

Django is not using fallback translations

2013-09-23 Thread Jonas VP
in language: default_translation = _fetch(language.split('-')[0]) or _fetch(settings.LANGUAGE_CODE) else: default_translation = _fetch(settings.LANGUAGE_CODE) I might be misunderstanding the Django translation logic so I wanted to raise this issue here before filing a tick

#19316 broke the external API of django.views.generic.View by changing where self.request is set

2013-08-19 Thread Jonas Maurus
alled from the outside without setting up the instances .request, .args and .kwargs attributes. I hope somebody here can take a look and tell me if I'm way off course or whether this is a legitimate bug :). Thanks and best regards, Jonas -- You received this message because you are subscri

Re: view permission for contrib.admin

2013-01-15 Thread Jonas Obrist
aving this option by default would be beneficial to lots of users. just my two cents... Jonas -- 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-develop

Re: Django Admin Revamp - Any updates?

2012-12-14 Thread Jonas Geiregat
> > > > > Idan - you mentioned you'd like to get thoughts on what we hope to achieve > > in a new admin - basically, what is the purpose of Django's contrib.admin - > > is that right? If I'm not mistaken the new admin interface couldn't be builded because none of the django core developers had

Re: ORM refactoring, part 2

2012-09-26 Thread Jonas Obrist
This thread caught my interest (because of potential implications for django-hvad). While the proposed changes break django-hvad, I've already written a simple patch for django-hvad, so this is a non-issue. (The problem was the cleanup of Query.where. master and 1.4 had lots of calls to start_s

Improve tutorial to use class based views

2012-09-13 Thread jonas
django ? Are there any plans to improve the docs to use class based views ? Regards, Jonas. -- 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

Re: Django-nonrel patches

2012-06-26 Thread Jonas H.
On 06/26/2012 11:07 PM, Adam "Cezar" Jenkins wrote: Last I heard Jonas wanted to do a new release of mongodb-engine. He might have meant to say he was not maintaining the project anymore, but he's not the only one with commit access. The main thing is that I've lost int

Re: gsoc proposal, dynamic list form field

2012-03-25 Thread Jonas H.
tl;dr: http://gsoc-demo.herokuapp.com/addrecipe (the "Ingredients" forms) -- 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

Re: Revisiting multiline tags

2012-02-24 Thread Jonas H.
On 02/24/2012 10:01 AM, Stephan Jaensch wrote: This thread contains 6 people expressing support for this change, and 2 against (a BDFL, a core developer) -- and you can add me to the -0 list. There are over 6000 subscribers to django-developers. I put it to you that the vast majority of people

Re: Issue in sending email

2012-02-02 Thread Jonas H.
Please post questions about using Django on django-users, not here. The topic of this list is the development of Django itself. -- 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@googlegro

Re: Django-nonrel patches

2012-01-08 Thread Jonas H.
On Sun 08 Jan 2012 05:39:02 PM CET, Emil Stenström wrote: On Thursday, December 8, 2011 10:31:39 PM UTC+1, jo...@lophus.org wrote: 1.) I didn't write the code, I'm just submitting the patches in their current state Jonas: Do you have information on who wrote the code that you su

Re: #16630: Support for HTML5 input types

2011-12-28 Thread Jonas H.
On 12/28/2011 05:15 AM, poswald wrote: I have a concern regarding this.. A few times I have tried to integrate django-floppyforms which takes a similar approach to what the html5 widgets offer (input types are specified by default) and it often causes pain. The reason is that while browsers say t

#16630: Support for HTML5 input types

2011-12-27 Thread Jonas H.
This patch has been around for while now. I just updated the patch so it applies cleanly against rev 17281. So, can we get this patch into trunk or is something missing? Jonas -- http://jonas.lophus.org | http://django-mongodb.org Want to become a Django MongoDB Engine/Django-nonrel core

Re: Django-nonrel patches

2011-12-08 Thread Jonas H.
On 12/08/2011 11:39 PM, Jacob Kaplan-Moss wrote: On Thu, Dec 8, 2011 at 3:31 PM, Jonas H. wrote: 2.) I don't like wasting my time, so I won't write extensive documentation before the patch gets accepted I'm sorry, but that's just not how we do things around here. Do

Re: Django-nonrel patches

2011-12-08 Thread Jonas H.
to write tests and docs once the patch is accepted. To make things clear, I don't refuse to do *informal* documentation (like in this thread or on the ticket tracker) because that doesn't take so much time and brain power :-) So if you need help understanding the patches, shoot! J

Django-nonrel patches

2011-12-03 Thread Jonas H.
14881 (not exactly a new, has been around for a while) Happy reviewing! :-) Jonas [1] http://groups.google.com/group/django-developers/browse_thread/thread/2c52d074b5a0f614/8610a64348e6f216? -- http://jonas.lophus.org | http://django-mongodb.org Want to become a Django MongoDB Engine/Django-n

Re: Python 3 and you

2011-11-07 Thread Jonas H.
On 11/07/2011 12:00 PM, richard.prosser wrote: I may be willing to support this. I have 18 month's of Python experience (mostly 2.4) and I have been out of work for a long time due to illness, so a project like this may look good on my CV! I have never been involved in an OS project before, thou

Re: [NoSQL] Sub-object queries / refactoring JOIN syntax into model fields

2011-10-20 Thread Jonas H.
bump On 09/28/2011 12:52 AM, Jonas H. wrote: Hallöchen, some non-relational databases (e.g. MongoDB) have support for arbitrarily nested objects. To make queries that "reach" into these sub-objects, the Django-nonrel developers find it appealing to use JOIN syntax. For instance,

Re: ORM refactoring

2011-10-10 Thread Jonas H.
On 10/10/2011 04:59 PM, Anssi Kääriäinen wrote: In the perfect world you could have a SQLA backend, or qs.as_sqla() method. That would be neat, yes. QuerySet chaining could be hard to implement, though (or does SQLA have support for something like that?). But in my opinion this is another argumen

Re:

2011-10-04 Thread Jonas H.
On 10/04/2011 05:51 PM, Ted Gruenloh wrote: The django online documentation mentions that the SQL equivalent for __icontains is something like: SELECT ... WHERE headline ILIKE '%Lennon%'; However, for postgresql - one of the dbs that actually supports ILIKE - I noticed __icontains was ac

Re: [NoSQL] Sub-object queries / refactoring JOIN syntax into model fields

2011-09-28 Thread Jonas H.
On 09/28/2011 11:47 AM, Florian Apolloner wrote: On Wednesday, September 28, 2011 12:52:51 AM UTC+2, jo...@lophus.org wrote: What's the core team's opinion on this topic -- is there any chance to Secondly, how could this be implemented? Did you search the mailing list about this topic at a

[NoSQL] Sub-object queries / refactoring JOIN syntax into model fields

2011-09-27 Thread Jonas H.
ink two meanings for one syntax cause too much confusion) Secondly, how could this be implemented? I thought about refactoring JOIN syntax handling into the model fields (as little logic as required; refactoring the actual hardcore JOIN generation code seems like an impossible task for anyon

Re: new feature idea: even and odd forloop iteration variables

2011-09-19 Thread Jonas H.
On 09/19/2011 12:58 PM, skazhy wrote: Hi all! I've been working with Django for a while now, but today I decided to make a first contribution to Django that would make templates less ugly by adding these two values to loop_dict (in django/template/ defaulttags.py): loop_dict['even'] = (i %2 ==

Re: RFC: "universal" view decorators

2011-09-16 Thread Jonas H.
On 09/15/2011 11:27 PM, Donald Stufft wrote: tl;dr; Using Mixins to add in functionality to a CBV makes way more sense then using a decorator which is essentially going to be doing the same thing as a mixing would, it just makes finding what is going on harder, makes customizing the decorator har

Re: Fixture loading using bulk_create

2011-09-12 Thread Jonas H.
speeds up fixture loading *a lot*: http://www.chartgo.com/get.do?id=bdfe6af778 (chunksize=0 does not use `bulk_create` but `save`, and the speedups seen for chunksize=1 is because `bulk_create` is used, thus avoiding `save` overhead) Jonas -- You received this message because you are subscribed to

Re: Proposal for a new templatetag definition syntax

2011-09-12 Thread Jonas H.
On 09/12/2011 11:49 AM, Cal Leeming [Simplicity Media Ltd] wrote: I may have misunderstood this thread slightly but, should templatetags follow the same structure as *args, **kwargs?? i.e. *args {% create_title "hello world" 800 800 %} **kwargs {% create_title title="helloworld" width=800 heig

Re: Proposal for a new templatetag definition syntax

2011-09-12 Thread Jonas H.
On 09/12/2011 10:47 AM, lucky wrote: Hello, Alex, I agree with Wim Feijen. The ability to implement a arbitrary syntax for tag parameters is too abstract problem and this causes an increase in the complexity of the solution. Tag delelopers are forced to define a grammar and deal with lexing and

Fixture loading using bulk_create

2011-09-10 Thread Jonas H.
seems like it's not documented anywhere that signals are sent during fixture loading but I think that for backwards compatibility reasons this behaviour should not be changed. Any ideas on these issues? Jonas -- You received this message because you are subscribed to the Google Groups

Re: Suppressed template errors in admin

2011-08-24 Thread Jonas H.
On 08/24/2011 05:44 PM, Ole Laursen wrote: Hi! I have a project where setting TEMPLATE_STRING_IF_INVALID has been invaluable in finding problems (for various reasons). The caveat mentioned in the docs don't kick in here because no templates are inherited from elsewhere. Except the admin which un

Re: Consistent exception handling in templates.

2011-07-08 Thread Jonas H.
hon and implies that /hasattr "executes" properties/. So there's no way to figure out whether an attribute exists without executing the code of properties. Jonas -- Django + MongoDB: http://django-mongodb.org -- You received this message because you are subscribed to the Goo

Re: Form Rendering API Proposal

2011-06-23 Thread Jonas H.
On 06/23/2011 02:11 PM, Harro wrote: - Will the as_* methods on forms be deprecated? They seem to be a nice shorter version then the new way to do it. I'd rather provide a shorter version of {% form %} for built-in layouts: {% form foobar 'table' %} as shorthand for {% form foobar 'forms/layou

Re: Reshaping the "Contributing to Django" documentation

2011-05-20 Thread Jonas H.
"[...] try and duplicate it. If you can duplicate it [...]" I'd stick with "reproduce" here because "duplicate" may be confused with "duplicate tickets". -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email

Re: Test optimizations (2-5x as fast)

2011-05-17 Thread Jonas H.
On 05/17/2011 04:48 PM, Jeremy Dunck wrote: 1) Use file modification timestamps for all model and test related files. Advantages: simple, works. Disadvantages: Triggers cache invalidation for changes not related to models or tests I think this is a pretty big win, even though it's not theoretic

Re: Test optimizations (2-5x as fast)

2011-05-17 Thread Jonas H.
right before the SQL is sent to the database) Advantages: No false-positives, simple Disadvantages: Does not eliminate the need for SQL generation and fixture parsing + model creation, so this might not be the "highest of highs" ;-) Jonas -- You received this message because you are sub

Re: Test optimizations (2-5x as fast)

2011-05-14 Thread Jonas H.
On 05/14/2011 04:26 PM, Jonas H. wrote: I believe there's no generalized way of creating databases in Django now, so that would have to be added. s/creating/copying/ -- You received this message because you are subscribed to the Google Groups "Django developers" group. To pos

Re: Test optimizations (2-5x as fast)

2011-05-14 Thread Jonas H.
uired at all to run tests -- which encourages test driven development :-) I believe there's no generalized way of creating databases in Django now, so that would have to be added. I'd love to hack on that :-) Jonas -- You received this message because you are subscribed to the Google

Re: Field lookup types and backwards incompatibility

2011-05-11 Thread Jonas H.
On 05/11/2011 03:17 AM, Chris Beaven wrote: 3. Change lookups to be uppercase (start the process of deprecating the current lowercase ones) uagh, .filter(foo_CONTAINS=bar)? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this

Re: NoSQL support

2011-04-28 Thread Jonas H.
hose changes could fit into ~10 concrete Trac tickets. (That doesn't mean discussions won't consume a lot of time for everybody who's involved -- I just wanted give people an idea about kind and quantity of the code changes.) Jonas -- You received this message because you are sub

Re: [5-for-1] Review request

2011-04-25 Thread Jonas H.
On 04/25/2011 05:33 PM, Jacob Kaplan-Moss wrote: On Mon, Apr 25, 2011 at 10:28 AM, Jonas H. wrote: I'd like you to look into http://code.djangoproject.com/ticket/15696. Done. Unfortunately, the result's probably not what you wanted. If you'd like to re-use your review wuffie I

[5-for-1] Review request

2011-04-25 Thread Jonas H.
roject.com/ticket/15696. Thanks! Jonas -- 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

Re: Right way to do formfield-less fields?

2011-04-19 Thread Jonas H.
On 04/10/2011 03:14 PM, Jonas H. wrote: Hello! What's the preferred way to do a custom model field that has no corresponding formfield? Intuitively, I'd say raise a NotImplementedError, but that would make the whole model unusable in the admin even if that field is excluded from being

Re: Right way to do formfield-less fields?

2011-04-10 Thread Jonas H.
On 04/10/2011 03:51 PM, Karen Tracey wrote: Please ask questions about using Django on django-users. This list is for discussing the development of Django itself. Karen, thanks for the hint, but I'm perfectly aware of that. Actually, this *is* a question about developing Django. -- You recei

Right way to do formfield-less fields?

2011-04-10 Thread Jonas H.
atch that makes the `ModelAdmin.exclude` attribute validation not call into `Field.formfield`? Cheers, Jonas -- 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.

Re: A word about CSRF Protection and AJAX

2011-02-23 Thread Jonas Obrist
have a lot of problems now Django (correctly) checks for the CSRF header in AJAX request. to make this backwards incompatibility easier for developers to adopt, always sending the cookie would be the right thing to do, in my opinion. Jonas -- You received this message because you are

Re: A word about CSRF Protection and AJAX

2011-02-23 Thread Jonas Obrist
I beg to differ luke. Most of our AJAX POSTs we do are actually not a 'form'. Because we usually submit forms with 'normal' POST requests. What would be so terrible in just setting the cookie always? Jonas -- You received this message because you are subscribed to the Go

Re: Adding new buttons like delete and change in the admin changelist_view

2011-02-19 Thread Jonas Obrist
It is indeed a wonderful and powerful thing, and luckily a thing that's already possible! Just edit the changelist_view template. For an example please have a look at https://github.com/joshourisman/django-tablib/blob/master/django_tablib/templates/tablib/change_list.html Jonas --

Re: Forms Parent ,Sibling reference

2011-01-10 Thread Jonas H.
On 01/10/2011 06:39 PM, Daniel Corbe wrote: Hi, How to get reference of one field form from another field form when both are in same form? wrong list, head over to django-users -- Jonas -- You received this message because you are subscribed to the Google Groups "Django devel

Re: Proposal for inclusion of two additional default template tags.

2011-01-07 Thread Jonas H.
On 01/07/2011 05:11 PM, Jonathan S wrote: ** And a {% decorate %} template tag: http://paste.pocoo.org/show/316593/ +1 {% macro %} avoids the usage of external template files. I think it's not worth the overhead of using an external file, when someone has to repeat small parts of code in a te

Re: Backends for i18n in a contrib app - #14974

2010-12-31 Thread Jonas Obrist
trivial with mod_wsgi for example, since you just need to 'touch' the wsgi files). To be perfectly honest I do not see any point in storing my strings that hardly ever change in the database, it would be terribly slow and try to solve a problem that is already solve, in my opinion ver

Re: Backends for i18n in a contrib app - #14974

2010-12-30 Thread Jonas Obrist
ese kind of things easier. I have a couple of ideas and I'm sure others do too, but nothing mature has come up yet as far as I know. Jonas -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to dja

Re: Need help w/ sql.where.WhereNode tree

2010-12-13 Thread Jonas H.
On 12/03/2010 03:06 PM, Jonas H. wrote: On 12/03/2010 10:04 AM, Waldemar Kornewald wrote: You probably don't want to use those aliases. Instead, you should use a separate alias namespace for embedded object filters. Otherwise you'll have to deal with the complex JOIN code in t

Purpose of constant_time_compare?

2010-12-08 Thread Jonas H.
Hello out there, what is the point of `django.utils.crypto.constant_time_compare`? I understand it takes O(n) time no matter what input it is feeded with, but of what avail is it? Can the time spent in *one single string comparison* really make such a huge difference? Confused, Jonas

Re: Need help w/ sql.where.WhereNode tree

2010-12-03 Thread Jonas H.
On 12/03/2010 10:04 AM, Waldemar Kornewald wrote: You probably don't want to use those aliases. Instead, you should use a separate alias namespace for embedded object filters. Otherwise you'll have to deal with the complex JOIN code in the backend unnecessary. Aliases for embedded objects could j

Re: DatabaseError swallowed?

2010-12-02 Thread Jonas H.
is the central point to backend invocation I'm strongly for special-handling this case. Jonas -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com

Re: Need help w/ sql.where.WhereNode tree

2010-12-02 Thread Jonas H.
so on. So this is where I'm asking the Django devs to give me an advice (or, even better, a copy-and-paste-ready solution :-) on how to correctly decide which alias to use. (I already figured out how to make the alias be different for each 'add_filter' call, but obviously that'

Re: DatabaseError swallowed?

2010-12-02 Thread Jonas H.
take it only AttributeError and TypeError should be ignored while calling __len__ in list() -- if that's the case, the bug is definitely still present. Anyway, I propose to call len() on those iterators, if possible, before calling list() because otherwise all bugs in backends will be s

Need help w/ sql.where.WhereNode tree

2010-11-30 Thread Jonas H.
o one JOIN with two SELECTs or two JOINS with one SELECT each? Thanks! Jonas -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, s

Re: Non-SQL database cache backend

2010-11-01 Thread Jonas H.
e argument to the test method? Of course not, I just didn't think of that. Lastly, rather than handling this as two patches, I'm happy for this to be submitted as a single patch under a "refactoring for the benefit of non-db cache backends" moniker. Here you go: http://code

Re: Non-SQL database cache backend

2010-11-01 Thread Jonas H.
s that check for not calling the model's 'default' callback more than once don't pass ('expensive_calculation' is called five times), and I don't know why. Could you try to give any pointers how to fix this or where I should start debugging this issue? I'm look

Non-SQL database cache backend

2010-10-29 Thread Jonas H.
about that? I'm sure a very thin abstraction layer would suffice. Or, if possible (I'm not /that/ deep into the Django ORM, so I can't tell), some small part of the ORM's query abstraction could be used so the database backend would not require a certain type of databas

Re: Add Mod(%) Operator to If Tag

2010-02-10 Thread Jonas Obrist
olved by the |divisibleby filter? Alex I'm not sure if this was discussed before, but what about allowing to easily register custom comparison operators? I'm thinking of a similar API we currently have for registering template tags/filters for if-tag operators. Jonas -- You

Re: HTML 5

2010-01-30 Thread Jonas Obrist
Suno Ano wrote: Sure, let me rephrase, any plans on template tags or filters to for example make use of the feature? Or any other HTML 5 goodness [0] for that matter? [0] http://diveintohtml5.org/detect.html I'd like to see using the new input types (eg for email form fields). Since thi

Re: HTML 5

2010-01-30 Thread Jonas Obrist
Suno Ano wrote: I've looked at the users and devel mailing list but didn't find any information on HTML 5. I found http://github.com/rhec/django-html5 though. Can anybody tell me if there are any plans with regards to HTML 5 in Django and if so, what are they? Things like the feature [0] would

IndexError on debug page

2009-12-10 Thread Jonas Obrist
age saying something like "The code in the source file has changed but your webserver still uses old code". Jonas -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@goog

Custom 404's

2009-12-09 Thread Jonas Obrist
side the tutorial. For example in the Request/Response documentation in the HttpResponseNotFound section. I'm sure you'll be able to find an ideal place for this. - Jonas -- You received this message because you are subscribed to the Google Groups "Django developers" group.

Re: Design decision on FileField removing abandoned files?

2009-11-23 Thread Jonas Pfeil
ember, and then have it ignored until a > 1.3-ish release. +1 to that ;) Although as Russell pointed out here [1] we are in feature development phase and as long as this really get's looked at in the bug fixing phase I won't say anything ;) This was classified as "Small/just bugs&

Re: 1.2 Feature Suggestion

2009-10-23 Thread Jonas Obrist
Oh... Well than consider this a 1.X suggestion. I've tried Rosetta however it just doesn't seem to work Also I don't really like to use 3rd Party apps for what I'd consider core functionality. I mean django boasts with having excellent i18n capabilities, but when it comes to actually trans

1.2 Feature Suggestion

2009-10-23 Thread Jonas Obrist
How about making i18n strings translatable from the django admin site? I like how the whole i18n thingy is built from a template perspective, however getting the stuff actually translated (all those django-admin.py commands ...) is a pain and confusing. So why not integrate this into the ama

Re: Suggestion: Better way to extend user table

2009-08-20 Thread Jonas Obrist
Rob Hudson wrote: > Take a look at ticket 3011: > http://code.djangoproject.com/ticket/3011 > > Thanks a lot! That's pretty much exactly what I want. In my opinion this should become a real feature and not just a patch. --~--~-~--~~~---~--~~ You received this

Re: Suggestion: Better way to extend user table

2009-08-18 Thread Jonas Obrist
James Bennett wrote: > On Mon, Aug 17, 2009 at 11:35 AM, James Bennett wrote: > >>def __getattr(self, name): >>if hasattr(self.user, name): >>return getattr(self.user, name) >>else: >>return getattr(self.profile, name) >> > > And for some reason

Re: Suggestion: Better way to extend user table

2009-08-17 Thread Jonas Obrist
James Bennett wrote: > On Mon, Aug 17, 2009 at 10:57 AM, Jonas Obrist wrote: > >> Thanks for your opinion on this, didn't know django had this feature >> once. But I just can't get it out of my head that there's gotta be a >> better solution than

Re: Suggestion: Better way to extend user table

2009-08-17 Thread Jonas Obrist
g my idea in a better way? To me (at least in my code) my version seems pretty elegant... And unless I find a better solution I'll continue using it for my own projects. Jonas Jacob Kaplan-Moss wrote: > Hi Jonas -- > > On Mon, Aug 17, 2009 at 7:43 AM, Jonas Obrist wrote: >

Suggestion: Better way to extend user table

2009-08-17 Thread Jonas Obrist
ch extends the User table before it's created, using subclassing. Jonas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-devel

Re: FileFields and file ownership

2009-08-12 Thread Jonas Pfeil
o change). This was originally scheduled and written for 1.0 maybe we can at least bring the FileField-clearing functionality into 1.2 ;) Regards, Jonas [1] http://code.djangoproject.com/ticket/7048 On Aug 12, 5:08 am, Malcolm Tredinnick wrote: > On Tue, 2009-08-11 at 04:39 -0700, Ol

DB Fields: reserved_names

2009-07-29 Thread Jonas Obrist
I tried to add support for an opposite of 'choices' to DB Fields (namely CharField) but failed horribly. I still think that would be a nice feature so I thought I'd bring this to this group. Maybe someone can implement this. What I had in mind was an option reserved_names (or however you want

Re: HTTP Errors

2009-07-27 Thread Jonas Obrist
It probably wouldn't be impossible to do it yourself and I'm well aware of the HttpResponseForbidden, but to me it doesn't makes sense that one error is considered an exception in django and the other ones responses. I'd like to see a unified way to handle this in Django and not just in my app

HTTP Errors

2009-07-27 Thread Jonas Obrist
I don't quite understand why I can raise a Http404 but not for example a Http403. I think one should be able to either raise all Http error codes (4xx, 5xx) or none. And I'd prefer being able to raise them as Exceptions --~--~-~--~~~---~--~~ You received this me

OneToManyField?

2009-07-21 Thread Jonas Obrist
In the documentation I see that there are Many-To-One Fields, Many-To-Many Fields and One-To-One Fields. What about a One-To-Many Field? You might now say that this is completely pointless since a Many-To-One Field reversed is basically what I want. But I'd say that in some cases it makes more

Re: Order of models metaclass __new__ dict

2009-01-12 Thread Jonas Haag
Honza Král wrote: > use Field.creation_counter instead of self.__class__ Oh, yeah. Thank you, it works :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email

Re: Order of models metaclass __new__ dict

2009-01-12 Thread Jonas Haag
Alex Koshelev wrote: > I can write a short overview: >Each model field(or form field) is marked by special counter while > model(or form) is loading. Then in metaclass fields are sorted by that > counter. > > I've recently written the blog post about this staff but its in > Russian language.

Re: Proposal: Make filters in admin persistent (#6903)

2008-11-14 Thread Jonas Pfeil
efore for the change list, but store the from_url in the session under a hash that we set as a GET parameter for the editing process. Just using the session wouldn't cut it, as we need to track multiple edit actions in parallel. Cheers, Jonas --~--~-~--~~~---~--~-

Proposal: Ordering in the admin and via the model API

2008-11-12 Thread Jonas Pfeil
ople think? Cheers, Jonas [1] http://code.djangoproject.com/ticket/13 [2] http://code.djangoproject.com/ticket/6118 [3] http://groups.google.am/group/django-developers/browse_thread/thread/13576fd99c9dfce8 [4] http://www.djangosnippets.org/sn

  1   2   >