Re: Custom Admin Save redirect?

2009-02-24 Thread peschler
menu = MenuEntry.objects.get(pk=object_id).menu response = super(YourClassAdmin, self).delete_view(request, object_id) if type(response) == HttpResponseRedirect: return HttpResponseRedirect('../../../menu/%d/' % menu.pk) return response --- Regard

Announcing django-modeltranslation-0.1

2009-02-22 Thread peschler
://code.google.com/p/django-modeltranslation/ Docs: http://code.google.com/p/django-modeltranslation/wiki/InstallationAndUsage Happy translating! peschler --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Default email value for django.contrib.comments?

2009-02-22 Thread peschler
This only happens when you're logged in. The comments app adds the e-mail of the currently logged in user if no other e-mail is given. Even if your site does not allow users to login, you might be logged into the admin which is the same. Logout from the admin, try the comment form again and the

Re: Changing the language in test client

2009-02-15 Thread peschler
> > You are misunderstanding what the set_language view does. That view sets > up the client's locale cookie so that whenever a view is processed for > that particular web client, it will be done in the locale of "de" (in > your case). Ok. Thanks for making this clear. > > It does not change the

Changing the language in test client

2009-02-15 Thread peschler
Hi, i'm currently writing unit tests for an application where I need to change the language in the test client. I tried using the "django.views.i18n.set_language" view within a test case like so: --- def setUp(self): self.client.post('/set_language/', data={'language': 'de'}) d

Re: OneToOneField relation and bidirectional StackedInline behavior in contrib.admin context

2009-01-28 Thread peschler
Hi, actually I am facing the same problem here. I did quite a search on the subject and I found no real solution to this use case. Here are my models: --- contacts/models.py: class Address(models.Model): street = models.CharField(max_length=255) city = models.CharField(max_le

Re: Testing framework or model save behaves differently after qsrf merge?

2008-06-11 Thread peschler
Hi Russ, thanks for your answer. I will open a ticket and attach the test case. regards, peschler On 10 Jun., 15:45, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Tue, Jun 10, 2008 at 6:53 AM, peschler <[EMAIL PROTECTED]> wrote: > > > I'm cu

Testing framework or model save behaves differently after qsrf merge?

2008-06-09 Thread peschler
I'm currently facing a weird problem with the testing framework after updating to the latest trunk version of the newforms-admin branch. I have written a small example and a unittest to explain the issue and to show that there seems to be some sort of problem after the qsrf merge. I'm not quite su

Re: to_template filter

2008-03-31 Thread peschler
Your "to_template" tag does what inclusion tags are for (not the {% include %} tag!). http://www.djangoproject.com/documentation/templates_python/#inclusion-tags peschler On 31 Mrz., 15:20, glopglop <[EMAIL PROTECTED]> wrote: > Hi, > > here is a simple filter I use

Re: django.newforms and AJAX

2008-03-27 Thread peschler
s for AJAX based ForeignKey and ManyToMany handling. Implementing a custom field allows specifying JS and CSS for the field, which will then be added automatically into the template. peschler On 27 Mrz., 16:01, David Cramer <[EMAIL PROTECTED]> wrote: > I was planning on using mootools, b

Re: Customized ChoiceField doesn't save properly with newforms-admin

2008-03-27 Thread peschler
Not quite sure, but IMHO you need to use a ModelChoiceField instead of a ChoiceField in your formfield_for_dbfield(). http://www.djangoproject.com/documentation/newforms/#fields-which-handle-relationships pe On 27 Mrz., 06:21, Julien <[EMAIL PROTECTED]> wrote: > Hi, > > I was busy doing other t

Re: Flatpages

2007-10-10 Thread peschler
Try to prepend a slash to your src attribute: Should be /media/js/tiny_mce/tiny_mce.js not media/js/tiny_mce/tiny_mce.js hope that helps pe On 10 Okt., 13:50, AniNair <[EMAIL PROTECTED]> wrote: > Hi, > I am trying to add tinymce to flatpages in admin using > change_from.html in admin/flatpages

ANN: A Django template tag for integrating a Flash based flv player

2007-10-04 Thread peschler
I'm happy to announce the release of my Django template tag for integrating a Flash based flv player into Django templates. The application including documentation and sourcecode can be found at: http://pyjax.net/blog/1/2007/09/28/django-template-tag-integrating-flash-based-flv-pl/ The applicati

Re: Variables in TemplateTags

2007-10-03 Thread peschler
Hi Niklas, > So in code it should look like this: > If user is my argument that was given to render_to_response, i want to > give the function the submodel status of user; like this: > {{ percentbar user.status }} > Some docs on how to achieve this can be found here: http://www.djangoproject.c

Re: Using a filter with many to many relationship

2007-09-17 Thread peschler
Wouldn't the following code solve the problem without Q objects? Offer.objects.filter(searchterms__term='ThemePark', searchterms__term='London') According to the docs the filter parameters are AND'ed. Admittedly I never used this in combination with ManyToMany fields, so I might be wrong here.