Creating a temporary model in tests

2009-06-05 Thread foxbunny
a model within the `tests.py`, to test storage of premalinks, etc. Is that possible, and how is it done? If it's not possible, how do I test this? The app itself is here: http://github.com/foxbunny/django-permalib/tree/master Best regards, -- Branko

Inline admin forms with dynamically defined initial data

2009-05-16 Thread foxbunny
Hi, all I have three models in many-to-many-through arrangement. Let's call them A, B, C, where B is the join model. I would like to edit B as inline from C, so that the number of inlines and their pre-filled data (if possible at all) matches the number of A objects. If I have, say three

Note to serbian language translators/users

2009-03-30 Thread foxbunny
Updated translations as per django-trunk rev 10162 are available at: http://github.com/foxbunny/django-sr-locale/tree/master The translations include both Serbian Cyrillic (default `sr` locale) and Serbian Latin (`sr_LA` locale) and full translations of both `django.po` and `djangojs.po`. I'm

Django site assets

2009-03-27 Thread foxbunny
Hi, I'd like to announce the very early pre-alpha version of Django site assets app. What it does is quite similar to what django-assets. The code is on gihub: http://github.com/foxbunny/django-site-assets/tree/master I coded this because I couldn't get django-assets to work on my box. Just

Re: request object in custom template filter code?

2009-03-25 Thread foxbunny
I forgot to mention I'm on django-trunk rev. 10163. Branko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe

request object in custom template filter code?

2009-03-25 Thread foxbunny
I am trying to write a custom template filter which takes a variable which is a model object and grabs fields from a related object based on request.session['lang'] parameter. Or it would if I knew how to get the `lang` parameter from within the filter code. Here is the code:

Re: Django on apache and mod_python.... and problems

2008-06-22 Thread foxbunny
On Jun 22, 5:59 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > I'm assuming you have papastudio.blog listed in INSTALLED_APPS? > > Does apache have read access to the whole tree under  /papastudio, including > blog?  It seems apache can read /papastudio, otherwise you'd get an > 'ImportError: No

Django on apache and mod_python.... and problems

2008-06-21 Thread foxbunny
Hi, list, I'm trying to deploy a very simple Django app, and it's driving me crazy. I've followed the docs and set up Apache with mod_python. Then I uploaded the app, did syncdb, and everything works when I ./ manage.py runserver on the remote host, but httpd won't serve it. I'm using Django

Re: extra_context and DoesNotExist exception

2008-04-10 Thread foxbunny
Okay, solved this. It was the offending latest(). I thought it returned a QuerySet, but I was badly mistaken. I don't even know how I got the idea... :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: extra_context and DoesNotExist exception

2008-04-10 Thread foxbunny
Here's the custom manager code. I didn't have the latest version with me, so I try to recreate the get_hot() method below. class PublishedManager(models.Manager): def get_query_set(self): return super(PublishedManager,

Re: extra_context and DoesNotExist exception

2008-04-10 Thread foxbunny
On Apr 10, 12:38 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Can your get_hot() method (is it manager?) use filter() instead of > get()? This way you would get QuerySet. Well, it is a custom manager method that uses filter(). I just named it get_hot (which, now that you mention it, may be a bit

extra_context and DoesNotExist exception

2008-04-10 Thread foxbunny
I'm trying to shove some custom query sets into extra context for something like 5 generic view items. One of the QSs finds all news items that are marked as 'hot' and is used to display those item (if they exist) in a small list on any page along with whatever content is intended for the main

Re: Newbie here, needs help with ImageField

2008-03-10 Thread foxbunny
On Mar 10, 2:10 pm, Michael Newman <[EMAIL PROTECTED]> wrote: > Passing your error along would be helpful because it will help us > pinpoint exactly what part of your code is having issues. Python > traceback is amazing helpful in that if you follow its path, even > though it might not look like

Newbie here, needs help with ImageField

2008-03-10 Thread foxbunny
Hi, I've read the tutorial, and bits of docs here and there. I would like to thank the great Django community for making this a splendid learning experience! So, I felt confident enough to start writing a simple image gallery app. Here's the code for the main app's models.py.