Re: Where does the request.user get set?

2006-04-03 Thread Ivan Sagalaev
shredwheat wrote: >Is that in magic-removal? I am working off of SVN trunk > Then it's in HTTP handlers (core/handlers/wsgi.py and core/handlers/modpython.py). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djang

Re: Brain fried - need help with M2M and MR

2006-04-03 Thread tonemcd
Yes, of course - it all makes sense now after some sleep. Thanks for the hint on ipython Luke, I've had it installed for ages wth django, and it is *extremely* helpful, but I just couldn't see the wood for the trees. For the record for anyone else doing this, here's how I did it with generic vie

Re: Brain fried - need help with M2M and MR

2006-04-03 Thread tonemcd
<2001> It's all so much clearer to me now... My headache has cleared up now, and I can see exactly what you mean Derek. It works fine now, thanks! Here's a snippet for others; urls.py (r'^electives/tag/(?P[0-9A-Za-z-]+)', 'site1.elective.views.tag'), site1.electives.views.tag def tag(re

Re: Custom template tag (?) help

2006-04-03 Thread Chase
I knew it was something stupid and easy. I was just following the wrong part of the tutorial. Thanks, Chase --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Where does the request.user get set?

2006-04-03 Thread limodou
On 4/4/06, shredwheat <[EMAIL PROTECTED]> wrote: > > Is that in magic-removal? I am working off of SVN trunk, and my > middleware/auth only has some handlers. > Yeah, it's in M-R branch. If you are using 0.91 trunk, I'm sorry I don't know where it's. -- I like python! My Blog: http://www.donew

Re: Where does the request.user get set?

2006-04-03 Thread shredwheat
Is that in magic-removal? I am working off of SVN trunk, and my middleware/auth only has some handlers. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

Re: Custom template tag (?) help

2006-04-03 Thread limodou
On 4/4/06, Chase <[EMAIL PROTECTED]> wrote: > > Hi all > > I've read the docs and looked through a few examples, but I can't > figure this out: I want to create the equivalent a global template > variable -- a string representing the current outdoor temperature -- to > display atop every page with

Re: Where does the request.user get set?

2006-04-03 Thread limodou
On 4/4/06, shredwheat <[EMAIL PROTECTED]> wrote: > > I'm trying to figure out out the "request.user" attribute is being set. > The request is the first argument to a view function. I hunted around > django/core and django/middleware, but can't seem to find how it gets > its value. > > I'm investig

Custom template tag (?) help

2006-04-03 Thread Chase
Hi all I've read the docs and looked through a few examples, but I can't figure this out: I want to create the equivalent a global template variable -- a string representing the current outdoor temperature -- to display atop every page without having to render it again and again in every view. It

Where does the request.user get set?

2006-04-03 Thread shredwheat
I'm trying to figure out out the "request.user" attribute is being set. The request is the first argument to a view function. I hunted around django/core and django/middleware, but can't seem to find how it gets its value. I'm investigating adding a similar value to all request objects. Thanks fo

Re: Look at this! Perhaps a bug or a mistake

2006-04-03 Thread Malcolm Tredinnick
On Mon, 2006-04-03 at 16:15 -0500, James Bennett wrote: > On 4/3/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > > My environment > > Django 0.91 > > DB: sqlite3 > > I'd bet money that this is the problem: IIRC there are some problems > with doing date-based queries on SQLite in 0.91. Can you try

Re: Relationship with self with relationship data in app.py

2006-04-03 Thread Russell Keith-Magee
On 4/4/06, Grimboy <[EMAIL PROTECTED]> wrote: Basically I want a Model that relates with itself, the relationshipits self will also have data. (That's why I've made it a seperateModel).Firstly: You can forward reference a model by using its name as a string ( e.g., ForeignKey("foo") works, in the s

Re: Relationship with self with relationship data in app.py

2006-04-03 Thread Luke Plant
On Monday 03 April 2006 21:45, Grimboy wrote: > I have this problem with the following code (highlight: > http://pastebin.com/638352) > > Basically I want a Model that relates with itself, the relationship > its self will also have data. (That's why I've made it a seperate > Model). Have a look i

Re: Brain fried - need help with M2M and MR

2006-04-03 Thread Luke Plant
On Monday 03 April 2006 19:12, tonemcd wrote: > I'm using magic-removal and have a 'simple' model for a tag-based > posting system (which will turn into a voting and image uploading > system). > > Here's the model (slightly cut down to save space); > > class Tag(models.Model): > slug = models

Re: Brain fried - need help with M2M and MR

2006-04-03 Thread [EMAIL PROTECTED]
I use something like this in a template: {% for o in tag.post_set.all %} Derek --~--~-~--~~~---~--~~ 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.c

Re: Help with performance?

2006-04-03 Thread Joseph Heck
Have you considered enabling the profiling mod_python connector to see if that gives you any insight? It isn't extensively documented, but it's pretty straight up on the wiki: http://code.djangoproject.com/wiki/ProfilingDjangoOn 4/2/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:P.S. I just switc

Re: BEST FOR NET PROFESINALS

2006-04-03 Thread Grimboy
Alright, I have a spam filter, and both of you being on the same email provider as me I assume you have too. The filter filtered for me and now your replying to the message made it appear. Just a wee bit annoying.Oh well, FrankieOn 03/04/06, Douglas Campos <[EMAIL PROTECTED]> wrote: totally agreed

Re: 0.91 vs SVN vs m-r

2006-04-03 Thread Rudolph
For me, edit_inline in M-R just works, but I didn't try any complex edit_inline models yet. Rudolph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Re: BEST FOR NET PROFESINALS

2006-04-03 Thread Douglas Campos
totally agreed On 4/3/06, Javier Nievas <[EMAIL PROTECTED]> wrote: Maybe we need an spam filter... --~--~-~--~~~---~--~~ 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

Re: BEST FOR NET PROFESINALS

2006-04-03 Thread Javier Nievas
Maybe we need an spam filter... --~--~-~--~~~---~--~~ 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 from this group, send email to

Re: How to exclude in limit_choices_to (magic removal)

2006-04-03 Thread Rudolph
Ticket filed: http://code.djangoproject.com/ticket/1579 I'm afraid I can't patch this myself (yet), so I'll just be patient. Rudolph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Look at this! Perhaps a bug or a mistake

2006-04-03 Thread James Bennett
On 4/3/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > My environment > Django 0.91 > DB: sqlite3 I'd bet money that this is the problem: IIRC there are some problems with doing date-based queries on SQLite in 0.91. Can you try with MySQL or Postgres and see if you run into the same problem? --

Re: Look at this! Perhaps a bug or a mistake

2006-04-03 Thread Douglas Campos
sorry, like any other newb, there's a long path to achieve nettiquette goals :) My environment Django 0.91 DB: sqlite3 ---cut here--- from django.core import meta CLASSES_EVENTO = ( (0,'Sem Classe'), (1,'Pequeno Príncipe'), (2,'Ensino Fundamental I'), (3,'Ensino F

Relationship with self with relationship data in app.py

2006-04-03 Thread Grimboy
I have this problem with the following code (highlight: http://pastebin.com/638352) Basically I want a Model that relates with itself, the relationship its self will also have data. (That's why I've made it a seperate Model). Here is a simplified version of what I want to do. class Relationship

Re: Look at this! Perhaps a bug or a mistake

2006-04-03 Thread James Bennett
On 4/3/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > Any Clues? Without more details on your setup, it's just about impossible to figure out what's going wrong here. For starters, what database backend are you using? -- "May the forces of evil become confused on the way to your house." -- Ge

Re: Look at this! Perhaps a bug or a mistake

2006-04-03 Thread Tom Tobin
On 4/3/06, Douglas Campos <[EMAIL PROTECTED]> wrote: > > Any Clues? Works for me (the following being from ipython): In [9]: x = blog.entry.get_list() In [10]: x Out[10]: [, , ] In [11]: x[0] Out[11]: In [12]: x[0].time_published Out[12]: datetime.datetime(2006, 4, 3, 0, 45) In [13]: x = blo

Re: How to exclude in limit_choices_to (magic removal)

2006-04-03 Thread Joseph Kocherhans
On 4/3/06, Rudolph <[EMAIL PROTECTED]> wrote: > > Is this worth a bug report? Seems like a bug ... > Yeah. Please file a ticket. This is a bug. Joseph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: How to exclude in limit_choices_to (magic removal)

2006-04-03 Thread Rudolph
Is this worth a bug report? Seems like a bug ... Rudolph --~--~-~--~~~---~--~~ 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 from

Look at this! Perhaps a bug or a mistake

2006-04-03 Thread Douglas Campos
~/myprojects $ python manage.py shell Python 2.4.2 (#1, Feb 1 2006, 00:26:00) [GCC 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from django.models.calendario import eventos >>> eventos.

Brain fried - need help with M2M and MR

2006-04-03 Thread tonemcd
My head hurts (really, it does, I think I've given myself a headache trying to figure this out) I'm using magic-removal and have a 'simple' model for a tag-based posting system (which will turn into a voting and image uploading system). Here's the model (slightly cut down to save space); class

Re: 0.91 vs SVN vs m-r

2006-04-03 Thread binaryfeed
I started a project this past weekend using the magic-removal branch. Overall, things seem quite stable. The biggest problem is that not all of the docs/ tree has been updated, so, for example, tutorials are out of date. It is possible to read the Wiki and the old tutorials to figure out how to

Re: 0.91 vs SVN vs m-r

2006-04-03 Thread James Bennett
On 4/3/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Should I stick to SVN? or can start my project in m-r ?( m-r become > 0.92?) Magic-removal is pretty stable, but it's still not finished, so there are things still being worked on; for example, if you're relying heavily on edit_inline, you

0.91 vs SVN vs m-r

2006-04-03 Thread [EMAIL PROTECTED]
Hi All, I am new to django, I've started to learn django from 0.91 then switch to SVN and discover m-r. Wich one to use better? m-r seems to be most attractive but from Status page on wiki: "Not for the faint of heart at this point. Still being heavily developed." Should I stick to SVN? or can

generic CRUD views and hidden user fields

2006-04-03 Thread binaryfeed
Note: I am using the magic-removal branch. I am looking for the most elegant way to use the generic CRUD views while at the same time being able to support a hidden django.contrib.auth.models.User field. Here's what I'm doing now: #--- my model class Item(models.Model): topic = mode

Re: moving items in admin-interface

2006-04-03 Thread Wilson Miner
Depends on who you talk to. We use it all over the place. I'm not sure what the status is with magic-removal. It interacts with edit_inline, which AFAIK doesn't have a finished interface in m-r yet. On 4/2/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > The order_with_respect_to field seems

Re: Error in admin

2006-04-03 Thread Douglas Campos
0 errors found I think that my model used a python reserved name When I changed it, all went well I will make more tests then post the result here On 3/31/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: On Mar 31, 2006, at 11:22 AM, Douglas Campos wrote:> How can I get rid of this error?> Coul

Re: adding a validator

2006-04-03 Thread layik
I have also read all posts related to a validator here --~--~-~--~~~---~--~~ 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 from thi

adding a validator

2006-04-03 Thread layik
I have read the validator documents please help me with steps of adding a validator to my FileField. where do I start? I dont know where to put somthing similar to this example into my class, http://www.djangoproject.com/documentation/forms/#Validators and where to put each bit! thanks! --~-

Re: follow relationship

2006-04-03 Thread akaihola
http://code.djangoproject.com/wiki/CookBookChoicesContantsClass Feel free to fix any mistakes on the page! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Too many SQLs in change_list pages

2006-04-03 Thread akaihola
I'm hitting the same problem with my own views and templates. I can query lots and lots of objects with one filter, but when I start to access related objects for each of the objects, Django fires lots of separate queries. I know select_related=True, but it doesn't seem to make a difference, and i

Re: How to make the module name translatable in M-R

2006-04-03 Thread akaihola
Create an __init__.py file in the app directory: from django.utils.translation import gettext_noop gettext_noop('The name of the app') Then do the usual make-messages.py etc. dance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

How to make the module name translatable in M-R

2006-04-03 Thread Rudolph
Hi, How do I translate the modulename in the admin interface in the Magic Removal branch? With model names it's easy by using the verbose_name and verbose_name_plural. Thanks, Rudolph --~--~-~--~~~---~--~~ You received this message because you are subscribed to

EVERY ONE IS THANKING ME FOR THE INFO...

2006-04-03 Thread success
FOR FURTHER DETAILS Pl. VISIT http://umaj.ws --~--~-~--~~~---~--~~ 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 from this group, s

EVERY ONE IS THANKING ME FOR THE INFO...

2006-04-03 Thread success
FOR FURTHER DETAILS Pl. VISIT http://umaj.ws --~--~-~--~~~---~--~~ 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 from this group, s

BEST FOR NET PROFESINALS

2006-04-03 Thread success
FOR FURTHER DETAILS Pl. VISIT http://umaj.ws --~--~-~--~~~---~--~~ 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 from this group, s

Too many SQLs in change_list pages

2006-04-03 Thread Qi Cheng
Hi, guys I have been troubled by a problem for weeks, this maybe very easy for you guys. It is about the "list_display" in ADMIN of models, say ModelA. If I add a method in list_dispaly(not a field) , which will access other models data, say ModelB. Then when I acess the modelA's change_list pa

Re: Admin in mr

2006-04-03 Thread Ian Clelland
On 4/2/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > > I just checked it out of the repository earlier this week. I'll try > updating and see if that makes a difference. Looks like Adrian fixed this behaviour on Wednesday -- The template that generates the admin index uses the verbose_name_plural