Re: About multilingual models

2009-08-19 Thread David Danier
e done) -> should use the language of the request or some other default language without the need to tell it so (sites usually only display one translation at a time, of course there needs so exist some way to get all translations) Greetings, David Danier --~--~-~--~~~

Re: I need a pony: Model translations (aka "my proposal")

2009-08-19 Thread David Danier
akes adding new attributes more easy. Using the Meta-subclass allows future ModelTranslation's to add/override fields to/of the original model and keeps this in sync with normal models (ModelTranslation could be a subclass of models.Model, using its own metaclass). Gre

Re: I need a pony: Model translations (aka "my proposal")

2009-08-25 Thread David Danier
eanField(default=False) >>> class Meta: >>> fields = ('foo',) This way the translation system stays very extendable and may be used for some version-tracking-scenario while not supporting this itself. btw.: This is another reason why I want to always use

Re: admin javacripts

2010-02-20 Thread David Danier
of sounds nice, but perhaps some sort of django namespace could be introduced. Meaning $jQD -> dj.$: var dj = {}; dj.$ = dj.jQuery = jQuery.noConflict(true); Greetings, David Danier -- You received this message because you are subscribed to the Google Groups "Django developers&qu

Re: Pass Thru Image Proxy Patch Interest?

2010-04-16 Thread David Danier
g this into serve() always means a request to your local webserver which may lead to a HTTP-redirect (so we have two requests). Of course having a template tags means {{ MEDIA_URL }}path/to/file must be replaced everywhere in your templates. But I think it's worth the benefit. Greetings, David

Re: Model translation

2010-08-07 Thread David Danier
uld create better tools for doing such things inside Django instead of trying to provide a solution to solve everything. I hope I haven't missed something essential. Model translations really touches most of the parts of Django (urls.py, QuerySet, views and of course models). I intentionally

Creating an independent auth/permission-framework, separate the models (Was: Adding support for replacing the auth User model to fit custom needs)

2007-02-19 Thread David Danier
min) is not as usable as it could be. And even better, it would simplify managing the auth-system as a whole (only small apps, that implement, provide or use some API). Greetings, David Danier P.S.: Sorry about the missing "In-Reply-To"-Header, I just joined this list. --~--~-

Re: Creating an independent auth/permission-framework, separate the models (Was: Adding support for replacing the auth User model to fit custom needs)

2007-02-27 Thread David Danier
ormal Django-way (Admin-subclass...). But it's nice to see separation the admin from the auth-app is on its way already. Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django deve

Re: Model.add() ?

2007-03-01 Thread David Danier
easy. But I think allowing the user to explicit use UPDATE or INSERT would be a nice feature. Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to th

Re: Model.add() ?

2007-03-01 Thread David Danier
ependent of save() and can be called directly (if you know what you do). Anyhow there needs to be some logic inside save(), of course. I'm not familiar with the current implementation of save(), so I don't know how complex it would be to accomplish this, but it sounds easy

Re: Creating an independent auth/permission-framework, separate the models (Was: Adding support for replacing the auth User model to fit custom needs)

2007-03-05 Thread David Danier
ackends-system obsolete (sorry), but keeps its flexibility while making things simpler for application-developers. For the permissions-system I would do similar. (One configuration-directive, some API thats fixed but allows model- and row-level-permissions) If you are interested I could try to contri

Reworking the authentication and user-system (Was: Creating an independent auth/permission-framework, separate the models)

2007-03-06 Thread David Danier
follow your coding-style here, but I'm willing to change that if I get some positive response on this. Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers&qu

Re: Possible bug: How does Django decide when to quote SQL arguments?

2007-03-07 Thread David Danier
> I found this query that isn't quoted correctly (I trimmed out some > stuff to make this shorter): AFAIK the queries are logged without quoting but executed correctly. (You can see this, if you have a SQL-error and the DB-backends throws an exception with the real query) Greet

Re: Ticket 3688 -- Improve support for mutually-referential models

2007-03-09 Thread David Danier
s there a real advantage over using this? (except for looking nicer) 8<- from django.db.models.loading import get_model [...] models.ForeignKey(get_model('account', 'User')) ->8 Greetings, David Danier --

Re: newsessions

2007-03-13 Thread David Danier
nt. But I haven't seen this so far, nor searched for it. ;-) Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to dj

Re: newsessions

2007-03-15 Thread David Danier
any interface. Greetings, David Danier --~--~-~--~~~---~--~~ 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 thi

Re: Support for a binary storage field?

2007-03-26 Thread David Danier
_ than a binary representation." Besides the other methods provide some optimization: "Protocol version 2 was introduced in Python 2.3. It provides much _more efficient_ pickling of new-style classes." Just my 2 cents, David Danier --~--~-~--~~~--

Re: Newforms: colon after label

2007-03-27 Thread David Danier
nk this should stay default. Greetings, David Danier --~--~-~--~~~---~--~~ 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 unsub

Re: {% url %} for generic views (proposal)

2007-03-28 Thread David Danier
st_comment', name="%(load_func)s.post_comment"), ) -------->8--- Perhaps this case is to specific to be added to a {% url %} refactoring, but if it can be done on the way it should be considered. Would really improve what you

LazyDate removal (changeset 4985)

2007-04-11 Thread David Danier
well (for initial data). Currently I had to replace LazyDate with datetime.now(), which is not lazy anymore (datetime.now as used for models would be lazy). Perhaps this can be changed, too? Greetings, David Danier --~--~-~--~~~---~--~~ You received this message be

Re: LazyDate removal (changeset 4985)

2007-04-22 Thread David Danier
> Just use datetime.now without the function call parentheses. Know this, doesn't work for newforms (initial value). I added a ticket (including a patch) to fix this: http://code.djangoproject.com/ticket/4018 David --~--~-~--~~~---~--~~ You received this message

Re: Ticket #3297 (reopened) - FileField / ImageField - newforms

2007-04-23 Thread David Danier
rms don't need to do so)? Greetings, David Danier --~--~-~--~~~---~--~~ 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 unsubscr

Re: Maintaining a patched Django (was re: Templates: short comments {##} eats text)

2007-04-25 Thread David Danier
the patches: http://dpaste.com/hold/9043/ svk patch help: http://dpaste.com/hold/9044/ svk Homepage: http://svk.bestpractical.com/ Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &quo

Re: Merge some branches in before 1.0?

2007-04-30 Thread David Danier
y default, instead this can go into a different application). But the code seems mature and working, only some details are missing, if the current auth-solution should be kept. (Changing this might be better for post-1.0...but adding this now and changing it later may be worse than changing it no

Re: Changeset [5231] -- do_clean_*() is awkward naming

2007-05-14 Thread David Danier
(_clean_FIELD/clean__FIELD)? validate_FIELD sounds right, too. Greetings, David Danier --~--~-~--~~~---~--~~ 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: Changeset [5231] -- do_clean_*() is awkward naming

2007-05-14 Thread David Danier
replaced by cleaned_data") clean_data = property(_clean_data_error) [...] Classes extending this can override clean_data with some method validating a data-field, users get some nice message, full_clean() writes to cleaned_data and this can be removed in the realese after the next one. Greetin

Re: auth.User refactor: reboot

2012-03-16 Thread David Danier
Hi, sorry, if this was said before, I haven't read the latest user discussions. I'm in favor of enhancing the auth app step by step, as everything else seems unlikely (haven't happend for a long time, why should it now). What I dislike about the current auth app in general is that it solves diffe

Re: ModelForms and the Rails input handling vulnerability

2012-06-13 Thread David Danier
Hi list, as I use "exclude" most of the times (to hide sensible fields from the user) I don't like the idea of this beeing removed. Perhaps another solution might be to force developers to either define fields _or_ exclude, so you have to at least think about this..without going through too much t

Re: URL dispatcher fallthrough?

2013-03-28 Thread David Danier
I'm with Tom here, this just feels wrong. The whole point of urls.py is to have a clean mapping of URLs to views. Of course I understand your problem, so let's look at the details. > // # front page for country > // / # list of schools and companies with activities > in that industry, in that co

Re: URL dispatcher fallthrough?

2013-04-02 Thread David Danier
> David: The slugs wouldn't be overlapping if they inherited from some > sort of "Organization" model with unique slug. The user could also add > validation code to prevent company and schools having same slugs. If you have a common base model this sounds like some polymorphic model problem, which

Re: Feature proposal: escape hatch for colliding template syntax in django templates

2010-10-20 Thread David Danier
> If we're going to do this, could we also look at deprecating the > 'templatetag' template tag? There are a couple cases a 'verbatim' tag > wouldn't cover that 'templatetag' wouldn't, but I'm kinda hard-pressed > to think of when they'd ever come up in reality. +1 for this. I for one don't even u

Re: Ticket #7817: Extending "with" and "include" tags.

2010-10-27 Thread David Danier
> Other tags which currently use the "as" token are: cycle, regroup and > url. These all introduce a new variable into the current context, > which does differ slightly from how {% with %} alters a variable in a > contained scope. So my secondary (perhaps somewhat feeble) argument is > that this ac

Re: One Django instance, hundreds of websites

2011-01-26 Thread David Danier
> On the other hand, having one setting file per site where the only difference > is the site id seems a bit too much overhead. Why not use something like this: from global_settings import * SITE_ID = 235 #This also allows further changes like: #INSTALLED_APPS = INSTALLED_APPS + ( # 'fooapp

Re: Django urls in JavaScript

2011-03-24 Thread David Danier
I currently handle this issue in a much easier way: I've created an app which allows creating a context for Javascript (this basically works like the template context processors do, calling defined functions and combining its results into a dict). The resulting context will be available in the temp

[RFC] Moving from FormWizard to ViewWizard

2011-08-13 Thread David Danier
Hi, ich recently found myself fighting with FormWizard, again. I think its a known fact that the integrated wizard lacks features and needs to be refactored, but this time I struggled using one of the third-party implementations out in the wild (http://github.com/stephrdev/django-formwizard). The

Re: [RFC] Moving from FormWizard to ViewWizard

2011-08-15 Thread David Danier
Hi Jannis, >> So, what do you think. Should we try to move forward to a ViewWizard? > *jumps in time machine* > Done! See [1] for the work Stephan and me did a few months ago. This really is nice, I like seeing the old FormWizard becoming more flexible and reusable. But not what I intended. The

Re: [RFC] Moving from FormWizard to ViewWizard

2011-08-15 Thread David Danier
Hi Jannis, > I think your intent is the same we had with refactoring the wizard -- > allowing access to the view state inside the wizard steps. Not only. I also tried to allow steps (=views) to completely move away from the current form based approach. This means each step can decide what to to o

Re: [RFC] Moving from FormWizard to ViewWizard

2011-08-15 Thread David Danier
Hi Jannis, >> So, what do you think. Should we try to move forward to a ViewWizard? > *jumps in time machine* > Done! See [1] for the work Stephan and me did a few months ago. This really is nice, I like seeing the old FormWizard becoming more flexible and reusable. But not what I intended. The

Re: ticket 13125 is waiting for a design decision for 18 months

2011-09-02 Thread David Danier
> Description: > "The login_required decorator is not checking User.is_active, as > staff_member_required does. If an authenticated user is deactivated > (via setting is_active to False), the user is still able to browse > login_required-protected views." > For probably most people, the expected an

Unify wraps() and update_wrapper() imports?

2008-06-28 Thread David Danier
quote, but this is somewhat different) Greetings, David Danier P.S.: I did not open a ticket on this, as I think, this needs discussion and such minor issues should not flood trac. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: XMLField in nfa

2008-07-01 Thread David Danier
4 for details. The second ticket contains a XML-validator using lxml. Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to dj

Re: XMLField in nfa

2008-07-01 Thread David Danier
t posted some code that works here, but it doesn't fit into django in its current state. Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post

Some ideas about AUTH_PROFILE_MODULE (tickets: #7584, #7592 and #7400)

2008-07-02 Thread David Danier
ree new lines and should not cause any trouble I think. Of course docs are missing so far. Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to th

Re: Some ideas about AUTH_PROFILE_MODULE (tickets: #7584, #7592 and #7400)

2008-07-02 Thread David Danier
to mention. ;-) This doesn't remove the need to catch the DoesNotExist-exception everywhere. Additionally it does not work when trying to create reusable applications that need to have access to some profile. Greetings, David Danier --~--~-~--~~~---~--~

Re: Make clickable area of object links larger

2008-07-13 Thread David Danier
the whole field clickable, every other field can be made clickable by configuration, if someone wants. I don't like the idea of making the whole row clickable. Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Make clickable area of object links larger

2008-07-13 Thread David Danier
s, too. So making the whole field () clickable should really be enough, the row itself (everything inside ) does not need to be clickable by default. Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: unique_for_ fields

2008-10-01 Thread David Danier
s Meta: # perhaps useful for urls like /foo unique_together = ('slug', 'category', 'pub_date__year') Just some ideas I had when reading the original post, don't know if this would require lots of work. :) Greetings, David Danier --~--~-

Re: Customizable User model as GSoC project

2009-03-28 Thread David Danier
Hi Ted, perhaps take a look at ticket #3011 (http://code.djangoproject.com/ticket/3011). Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to

I need a pony: Model translations (aka "my proposal")

2009-07-11 Thread David Danier
ey, it only took me about 2 hours to write this down, after thinking about a solution for the last weeks). I would like to get some input on this topic, about what you think model translations could look like. Marc, I don't know if you have some proposal of your own. P

Re: I need a pony: Model translations (aka "my proposal")

2009-07-14 Thread David Danier
rently uses this. Foreign fields by design always need some JOIN related to them, so this will depend on conditional joins. If this gets implemented perhaps model inheritance can be rewritten to use foreign fields, as this looks like a more generic approach. Did I miss something? Greetin

Re: I need a pony: Model translations (aka "my proposal")

2009-08-02 Thread David Danier
en using pluggable-model-i18n in a productive environment. Greetings, David Danier --~--~-~--~~~---~--~~ 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: newforms issues

2007-05-22 Thread David Danier
half-cleaned data out of cleaned_data will get easier). And of course clean_FIELD() is not documented so far, which was the reason for changing its name to do_clean_FIELD() in some commit lately. So I don't see any reason why not to do this again to get things straight. Greetings, David Danier

Re: Ticket #3297 and File uploads

2007-06-04 Thread David Danier
orm(new_data) But I think copy() already allocates memory, so the performance difference might be small. Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group.

Re: Ticket #3297 and File uploads

2007-06-04 Thread David Danier
rue, so the var did not include any special chars' else: print 'most likely with foreign languages' If you change the encoding of the request this might be fine, but the items in the dict returned by copy() should (/MUST?) look the same as the items in the original. Or am I

Re: contrib.thumbnails approval?

2007-06-20 Thread David Danier
folder if the file does not exists any more. Perhaps this can even be done in some post_delete-signal-handler (iterate over all fields, find image-fields, delete thumbnail-folders). Greetings, David Danier --~--~-~--~~~---~--~~ You received this message becaus

Re: Shared memory across processes

2007-06-26 Thread David Danier
he settings-module should do the rest... Sorry if this is stupid and I miss some bigger picture here. ;-) Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. T

Re: Unicode branch - last call for comments(?)

2007-07-04 Thread David Danier
ngs in my code and works really smooth after using __unicode__. ;-) Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email t

Re: Unicode branch - last call for comments(?)

2007-07-04 Thread David Danier
> Well if I have understood what you say, it is exactly what is > explained here <http://code.djangoproject.com/wiki/ > UnicodeBranch#PortingApplicationsTheQuickChecklist>.. Right, now I feel dump. ;-) I even read the docs some time ago.... Greeting

Re: Problem in current svn TRUNK

2007-07-11 Thread David Danier
e.djangoproject.com/wiki/UnicodeBranch#PortingApplicationsTheQuickChecklist Greetings, David Danier --~--~-~--~~~---~--~~ 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: #4001 - newforms commit=false and m2m data loss

2007-07-21 Thread David Danier
t called by it. Greetings, David Danier --~--~-~--~~~---~--~~ 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 t

Re: schema evolution

2007-07-23 Thread David Danier
environment without having to fear that they screw the whole thing up easily. In a professional environment this might help having a nice way to deprecate things. Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: How submit a patch with files not in subversion?

2007-08-02 Thread David Danier
actical.com/ Greetings, David Danier --~--~-~--~~~---~--~~ 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,

Re: usability issues

2007-08-05 Thread David Danier
So this definitely needs to be put into your own middleware or view (which does the redirect). Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this

About Changeset [5819]

2007-08-06 Thread David Danier
/models/fields/__init__.py?rev=5819#L785). Why is this done? If I read the code right self.upload_to gets stripped later in FileField.get_filename() and is added in File.get_directory_name(), again. Greetings, David Danier --~--~-~--~~~---~--~~ You received this

Re: ModelChoiceField's clean() uses default manager instead of query set

2007-08-07 Thread David Danier
ople may guess valid IDs that they should not use (for example if you use user_profile.some_relation as the queryset). Perhaps it could be changed to only allow choices in the queryset, but an option is added to ModelChoiceField to use the default manager? Greetings

Re: manage.py idea?

2007-08-15 Thread David Danier
> Would following that with a syncdb then restore the content types for > the installed apps? I'll have to test that later. Even if it did the id's might have changed and any generic relations be broken. Greetings, David Danier --~--~-~--~~~

Re: newforms-admin and django.contrib.auth

2007-12-18 Thread David Danier
ailable (which might not be the case when not using django.contrib.auth or not using an auth-system at all) and that it has a is_authenticated/message_set attribute (which might be ok, as this could be called "API" you need to reproduce). Greetings, David Danier --~--~-~--~~-

Re: newforms-admin and django.contrib.auth

2007-12-18 Thread David Danier
said before: It only fixes one application out of many. Instead replacing code like LogEntry.objects.log_action(...) with request.user.logentry_set.create(...) would help, not only in the admin. Greetings, David Danier --~--~-~--~~~---~--~~ You received t

Re: newforms-admin and django.contrib.auth

2007-12-19 Thread David Danier
to replace django.contrib.auth gives some nice advantages, even over the current backends-system. For example you do not need to sync your db with LDAP when using LDAP as the backend. A User-model only containing the DN would be enough here. Greetings, David Danier --~--~-~--~~--

Re: newforms-admin and django.contrib.auth

2007-12-19 Thread David Danier
to add the admin-app only to have a nice and clean permission-framework?). It looks to me like the "unreplaceable django.contrib.auth"-problem will be fixed (or worked around) only in the admin now, without considering adding this functionality to the entire django-framework. Greetings, D

Re: API question for model saving

2008-04-28 Thread David Danier
ems with naming the new parameter and difficulties in creating self-explaining possible values ("not must_create", rather than "must_not_create"). Just my 2 cents, David Danier --~--~-~--~~~---~--~~ You received this message because you are subsc

Re: API question for model saving

2008-04-28 Thread David Danier
is a very common > word and there are a number of non-database uses for it. You don't have to stick to this names. I just used them, as I think they are pretty self-explainig. Greetings, David Danier --~--~-~--~~~---~--~~ You received this message because