[FUN] Uncyclopedia

2005-10-04 Thread Carlo C8E Miron
Hi Djangonauts™, Have you seen http://uncyclopedia.org/wiki/Django and especially http://uncyclopedia.org/wiki/Django_gods ? ROFL -- Carlo C8E Miron, ICQ #26429731 -- Disclaimer: If I receive a message from you, you are agreeing that: 1. I am by definition, "the intended recipient". 2. All

Model subclass accessing parent instances?

2005-10-04 Thread Andy Shaw
Hi all; I'm experimenting with subclassing models at the moment. Specifically, I'm trying to add an optional element to the user class. The following code works fine: from django.core import meta from django.models.auth import User class MyUser(User): about =

Re: Template guide -> administration feature.

2005-10-04 Thread kmh
On 10/5/05, JKR <[EMAIL PROTECTED]> wrote: > > i'm able to see tags, filter and models. but nothing under view? is > this normal when I'm using generic view. View info only shows up if you have added the setting: ADMIN_FOR = ['myproject.settings.main'] which lists the settings files for the

Re: Referencing MEDIA_URL from templates

2005-10-04 Thread kmh
Some examples of use (mis-use?) cases for making settings accessible to templates: 1. To avoid hard coding media url domains in your templates when you're moving between different test and production server setups. 2. To use, for example, the ADMIN_EMAIL setting in a generic error template that

Re: Template guide -> administration feature.

2005-10-04 Thread JKR
Thanks for the helps, No link from admin page, but i got it work under /admin/doc/ link. it required a python-docutils installed in order to view this page. i'm able to see tags, filter and models. but nothing under view? is this normal when I'm using generic view. Johny

Re: Referencing MEDIA_URL from templates

2005-10-04 Thread Adrian Holovaty
On 10/4/05, Maniac <[EMAIL PROTECTED]> wrote: > What's the recommended (if any) way to reference MEDIA_URL defined in > settings file from templates? MEDIA_URL is used by all FileFields to give their objects a get_FOO_url() method. See this page:

Referencing MEDIA_URL from templates

2005-10-04 Thread Maniac
What's the recommended (if any) way to reference MEDIA_URL defined in settings file from templates? Admin site uses custom template tag for it. Is there anything similar for general usage in projects?

Site-wide User Authentication

2005-10-04 Thread Andreas
What's the best way to check if a user is logged in on every page (read: view) of a website? I'd like to be able to display the username in the template if a user is logged in. At the moment, I'm using the following code: # Helper function: def get_user(request): try: user =

Re: big drop-down lists, raw_id_admin and custom primary key: a bug?

2005-10-04 Thread Jason Huggins
Adrian Holovaty wrote: > Oooh, that's a good idea. Django already displays the __repr__() of > the corresponding record on the *change* page, but it'd be nice to do > it automatically (via Ajax) right after the field is populated on the > add page (or changed on the change page). Yup... I