Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread huu...@gmail.com
On Mar 17, 10:45 pm, Jacob Kaplan-Moss wrote: > On Tue, Mar 17, 2009 at 8:55 PM, Huuuze wrote: > > 7.  Django detects the missing cookie > > I think this is where you're getting hung up. Django doesn't "detect" > a "missing" cookie; Django sees a

Re: including text files with django tags?

2009-03-17 Thread Andy Mckay
On 17-Mar-09, at 7:48 PM, codingJoe wrote: > > > > > I have a text file that I want the user to see in a scrolling text > area? I would recommend reading through the django tutorial on the website, since it shows that this is done in python in views and not in a template. -- Andy

including text files with django tags?

2009-03-17 Thread codingJoe
My fist GAE app and I'm having problems importing a text file. What is the equivalent of the following include line in django? If nothing exists, how do I make that work? I have a text file that I want the user to see in a scrolling text area? Thanks! T

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Jacob Kaplan-Moss
On Tue, Mar 17, 2009 at 8:55 PM, Huuuze wrote: > 7.  Django detects the missing cookie I think this is where you're getting hung up. Django doesn't "detect" a "missing" cookie; Django sees a request from a browser that doesn't include a cookie. Nothing's missing; it's just a

Re: allowing a user to delete their own account and associated data.

2009-03-17 Thread Jacob Kaplan-Moss
On Tue, Mar 17, 2009 at 8:34 PM, tristan wrote: > A pointer to where I might find the python that deletes an account in > the "Auth" admin app would be great, because then I could just copy > that... I've found that does everything I need, but I need to expose > it

Re: My web page can not be Internationalized

2009-03-17 Thread Malcolm Tredinnick
On Tue, 2009-03-17 at 18:58 -0700, Eric wrote: > Can anyone help me ? If somebody could help you, they would have posted a reply. I know I found your post fairly incomprehensible, since it doesn't give any real details on how you're implementing any of this. it could be any one of about two

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Malcolm Tredinnick
On Tue, 2009-03-17 at 18:55 -0700, Huuuze wrote: > Malcolm, I believe you and appreciate your advice, but you need to > ease up. You're getting hung up on semantics. In this instance, I'm > simply differentiating between a user clicking a link that says > "Logout" (a.k.a, a manual logout)

Re: My web page can not be Internationalized

2009-03-17 Thread Eric
Can anyone help me ? On Mar 17, 5:22 pm, Eric wrote: > Hi, Now , I face a problem about Internationalization, I have used > django + python + extjs to created a log in html page. And my browser > is Firefox. > > In the page , the user can select the language which will be

Re: FIXED: Can't run django on Apache

2009-03-17 Thread Graham Dumpleton
Either way, their dango.root setting is wrong as they are setting it to physical file system path. Remove that whole django.root setting as you do not need it when mounting at root of site. The sooner people stop using mod_python the better. ;-) Graham On Mar 18, 12:41 pm, Karen Tracey

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Huuuze
Malcolm, I believe you and appreciate your advice, but you need to ease up. You're getting hung up on semantics. In this instance, I'm simply differentiating between a user clicking a link that says "Logout" (a.k.a, a manual logout) versus Django detecting the lack of a session cookie and

Re: FIXED: Can't run django on Apache

2009-03-17 Thread Karen Tracey
On Tue, Mar 17, 2009 at 1:54 PM, Bro wrote: > > [snip] > File "/var/lib/python-support/python2.5/django/core/handlers/ > base.py", line 44, in load_middleware >raise exceptions.ImproperlyConfigured, 'Middleware module "%s" > does not define a "%s" class' %

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Malcolm Tredinnick
On Tue, 2009-03-17 at 18:32 -0700, Huuuze wrote: [...] > As soon as the session expires, Django > updates the records in the django.sessions table. As such, the only > unique identifier for the user, "session_key", is overwritten. This isn't what happens when a session expires at all. Django

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Malcolm Tredinnick
On Wed, 2009-03-18 at 01:28 +, Paulo Köch wrote: > > Calling logout(), as the original poster requested doesn't achieve > > anything (it does nothing). If it did do something, it would still be a > > bad idea to call it, because the user could have already logged in again > > and logging them

Re: Typo for Django or Like?

2009-03-17 Thread Nick Lo
Hi James, Trying not to be pedantic but are you meaning to ask "if there are any applications that the list would recommend" rather than just "if there are any". I'm only saying this as it's otherwise it's almost impossible not to think http://lmgtfy.com/q=django+blogging +application and

Re: allowing a user to delete their own account and associated data.

2009-03-17 Thread tristan
I don't suppose anyone has any insight into this do they? A pointer to where I might find the python that deletes an account in the "Auth" admin app would be great, because then I could just copy that... I've found that does everything I need, but I need to expose it to my users so they can do it

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Huuuze
Yes, it does generate new session_id. The user has essentially told Django to expire the session, which in turn results in a new session key. I'm starting to agree with Malcolm. Outside of an elaborate solution, this one may not be possible. As soon as the session expires, Django updates the

Re: TemplateDoesNotExist

2009-03-17 Thread Karen Tracey
On Tue, Mar 17, 2009 at 12:00 PM, TP wrote: > > I have an error in my traceback saying the index.html file does not > exist, but it has been created in the correct DIR. > The exception traceback include a list of all the files the template loader looked for. Yours

Re: RelatedObject Cache

2009-03-17 Thread Andrew Fong
And there it is! Thanks Alex! On Mar 17, 2:18 pm, Alex Gaynor wrote: > On Tue, Mar 17, 2009 at 5:08 PM, Andrew Fong wrote: > > > Hello all, > > > Quick question. Given these models ... > > > class A(models.Model): pass > > > class B(models.Model): >

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Paulo Köch
> Calling logout(), as the original poster requested doesn't achieve > anything (it does nothing). If it did do something, it would still be a > bad idea to call it, because the user could have already logged in again > and logging them out would be unfortunate. Doesn't this generate a new

Re: memcached: is this thing plugged in?

2009-03-17 Thread hotani
Thanks for the responses - shortly after posting I realized what I missed for a successful test of the caching software. After adding the proper lines to 'MIDDLEWARE_CLASSES', memcached came to life. If anyone is curious, before memcached the test page was getting about 10 trans/sec. After

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Malcolm Tredinnick
On Wed, 2009-03-18 at 01:17 +, Paulo Köch wrote: [...] > Based on this, I can't see why a simple custom cron job inspecting the > pickled session data (assuming the user_id is in the session) before > purging old session would not suffice. Care to elaborate? I think you've arrived back at

Re: TemplateSyntaxError (newbie)

2009-03-17 Thread PaulE
Indeed I am using 1.0. Thanks for the info regarding the admin urls. --~--~-~--~~~---~--~~ 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

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Paulo Köch
On Wed, Mar 18, 2009 at 01:06, Malcolm Tredinnick wrote: > There's no guarantee that the same session > will go to the same process (not to mention that the processes will stop > and start over time). > > If you're going to do something like this, it has to be external

Re: TemplateSyntaxError (newbie)

2009-03-17 Thread Malcolm Tredinnick
On Tue, 2009-03-17 at 18:03 -0700, PaulE wrote: > Malcolm, > > Thanks for the quick reply. > Problem solved - after reading your reply. > I changed > (r'^cms/(.*)', include('cms.urls')), > to > (r'^cms/', include('cms.urls')), > and it works fine. > > I still don't quite understand

Re: TemplateSyntaxError (newbie)

2009-03-17 Thread Alex Gaynor
On Tue, Mar 17, 2009 at 9:03 PM, PaulE wrote: > > Malcolm, > > Thanks for the quick reply. > Problem solved - after reading your reply. > I changed >(r'^cms/(.*)', include('cms.urls')), > to >(r'^cms/', include('cms.urls')), > and it works fine. > > I still

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Malcolm Tredinnick
On Wed, 2009-03-18 at 00:55 +, Paulo Köch wrote: > Coder speaks louder. HTH. > > #Pseudo code. Not tested nor proven. > class TimeoutTimerPool(object): > """A pool that tracks a set of users and their active session. > Tipically used as a singleton.""" > from threading import Timer >

Re: TemplateSyntaxError (newbie)

2009-03-17 Thread PaulE
Malcolm, Thanks for the quick reply. Problem solved - after reading your reply. I changed (r'^cms/(.*)', include('cms.urls')), to (r'^cms/', include('cms.urls')), and it works fine. I still don't quite understand because this *admin* url works fine http://localhost:8000/admin/

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Paulo Köch
Argh! Code in emails sucks. Besides, there was a typo in the previous email. See http://dpaste.com/15848/ Cheers, Paulo Köch --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Paulo Köch
Coder speaks louder. HTH. #Pseudo code. Not tested nor proven. class TimeoutTimerPool(object): """A pool that tracks a set of users and their active session. Tipically used as a singleton.""" from threading import Timer def __init__(self): self.pool = {} def expiration_handler(self,

Re: Best practices to define model

2009-03-17 Thread Malcolm Tredinnick
On Tue, 2009-03-17 at 17:24 -0700, Joshua Partogi wrote: [...] > Any drawback from this approach > you've found so far? Everything has drawbacks and advantages. This version involves slightly more typing in settings, for example. And you have another directory to remember to rollout. But there

Re: Best practices to define model

2009-03-17 Thread Joshua Partogi
On Mar 18, 10:50 am, Malcolm Tredinnick wrote: > On Wed, 2009-03-18 at 10:48 +1100, Joshua Partogi wrote: > > Dear all, > > > Currently I have a project in which the model will be used by several > > django application. What is the best practice to define this model?

Re: TemplateSyntaxError (newbie)

2009-03-17 Thread Malcolm Tredinnick
On Tue, 2009-03-17 at 16:47 -0700, PaulE wrote: > All, > > I am > - learning python and django simultaneously. > - an experienced developer > - a bit frustrated > > While working my way through > "Python Web Development with Django" > I stumble on a TemplateSyntaxError when trying to > view

Re: Completions

2009-03-17 Thread Alex Gaynor
On Tue, Mar 17, 2009 at 8:10 PM, Alex Gaynor wrote: > > > 2009/3/17 Filip Gruszczyński > >> >> > Are you talking about autocompletion as in what the browser does, or >> some >> > sort of Ajax autocompleter. If it's the format that's handled through >>

Re: Completions

2009-03-17 Thread Alex Gaynor
2009/3/17 Filip Gruszczyński > > > Are you talking about autocompletion as in what the browser does, or some > > sort of Ajax autocompleter. If it's the format that's handled through an > > html autocomplete="off" attribute on the input so you just need to pass > that > > in

Re: Completions

2009-03-17 Thread Filip Gruszczyński
> Are you talking about autocompletion as in what the browser does, or some > sort of Ajax autocompleter.  If it's the format that's handled through an > html autocomplete="off" attribute on the input so you just need to pass that > in the attrs dictionary to a forms widget.  If it's the later

TemplateSyntaxError (newbie)

2009-03-17 Thread PaulE
All, I am - learning python and django simultaneously. - an experienced developer - a bit frustrated While working my way through "Python Web Development with Django" I stumble on a TemplateSyntaxError when trying to view a non admin page at this url:

Re: Best practices to define model

2009-03-17 Thread Malcolm Tredinnick
On Wed, 2009-03-18 at 10:48 +1100, Joshua Partogi wrote: > Dear all, > > Currently I have a project in which the model will be used by several > django application. What is the best practice to define this model? > > Let's say I have a category model that will be used from the blog >

Best practices to define model

2009-03-17 Thread Joshua Partogi
Dear all, Currently I have a project in which the model will be used by several django application. What is the best practice to define this model? Let's say I have a category model that will be used from the blog application and also product application. Do we define that model in either one

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Malcolm Tredinnick
On Tue, 2009-03-17 at 23:26 +, Paulo Köch wrote: > My previous idea was to maintain a Timer pool based on session ids. > Every time a request with a session hits your server, you reset the > Timer object associated with it. If a user logs out, you cancel the > respective timer. If a timer

Re: Model inheritance vs. User.get_profile()

2009-03-17 Thread Malcolm Tredinnick
On Tue, 2009-03-17 at 09:49 -0700, ntoll wrote: > Guys, > > Asking for advice here. > > What is the best way to extend the User class in > django.contrib.auth.models...? > > I could either inherit the class for my own model and add fields / > methods or use get_profile(). Now, whilst I realise

Re: Completions

2009-03-17 Thread Alex Gaynor
2009/3/17 Filip Gruszczyński > > Does DJango forms provide option of completions? I mean the ones we > can see in Google recently or in youtube. If not, could you point me > to the part of the code,where this could be added? > > -- > Filip Gruszczyński > > > > Are you talking

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Paulo Köch
My previous idea was to maintain a Timer pool based on session ids. Every time a request with a session hits your server, you reset the Timer object associated with it. If a user logs out, you cancel the respective timer. If a timer triggers, it's a timeout. But, we can try a simpler approach.

Completions

2009-03-17 Thread Filip Gruszczyński
Does DJango forms provide option of completions? I mean the ones we can see in Google recently or in youtube. If not, could you point me to the part of the code,where this could be added? -- Filip Gruszczyński --~--~-~--~~~---~--~~ You received this message

Re: memcached: is this thing plugged in?

2009-03-17 Thread Malcolm Tredinnick
On Tue, 2009-03-17 at 14:19 -0700, hotani wrote: [...] > Is there a way to check memcached to see if it is functioning > correctly? Memcached supports a "stats" command. One way to view it is simply telnet to the memcache port. For example: `--> telnet localhost 11211 Trying 127.0.0.1...

Re: Switching database backends at runtime?

2009-03-17 Thread Oliver Beattie
Nope, seems this is actually impossible (at least using manage.py shell), since it will load all of the models and hold references to them on initialization until termination, so the settings-definte backend is tied to BaseQuery forever :( On Mar 17, 12:01 pm, Oliver Beattie

Re: nested dereferencing of values within value calls in templates

2009-03-17 Thread Malcolm Tredinnick
On Tue, 2009-03-17 at 16:03 -0500, Jay Deiman wrote: [..]. > Template code: > == > > Output "eggs": {{ foo.{{ spam }} }} > > == > > Is there any way at all to do something like that? Write a custom filter that takes "spam" as an argument and does the

Re: memcached: is this thing plugged in?

2009-03-17 Thread Russell Keith-Magee
On Wed, Mar 18, 2009 at 6:19 AM, hotani wrote: > > The result? No difference. Memcached does not provide any benefit > according to my testing. I have siege set to log in as a user, then > hit a single page which makes several db calls. The memcached server > shows no movement

Re: Model inheritance vs. User.get_profile()

2009-03-17 Thread Dougal Matthews
get_profile is newer than model inheritance I believe. Working with profile is how everybody seems to be doing it, so follow the trend and it'll make every bodies lives easier ;) If you really want to read more about it, there is loads of chatter on the subject so to avoid reppetition;

Re: Django first app doubt

2009-03-17 Thread Jacob Kaplan-Moss
> I suspect it might be a bug with a change in Django I made today -- > are you running Django out of SVN? Er, no, the bug I thought was there isn't. Still, it'll always help to tell us what version of Django you're running. Jacob --~--~-~--~~~---~--~~ You

Re: Django first app doubt

2009-03-17 Thread Jacob Kaplan-Moss
On Tue, Mar 17, 2009 at 12:53 PM, Gustavo Senise wrote: > I am trying to access http://localhost:8000/polls/admin/ and getting a error > 'MediaDefiningClass' object is not iterable. > > Can anyone help!? Can you post the full traceback? I suspect it might be a bug with

Django first app doubt

2009-03-17 Thread Gustavo Senise
Hello fellows, I am starting the django first app and I am having a little trouble trying to understand why the admin area is not working after I changed the views to the Generic Views. Well, I can't access the admin area anymore. It seems that the tutorial doesn't cover the url for admin after

Model inheritance vs. User.get_profile()

2009-03-17 Thread ntoll
Guys, Asking for advice here. What is the best way to extend the User class in django.contrib.auth.models...? I could either inherit the class for my own model and add fields / methods or use get_profile(). Now, whilst I realise that get_profile() is the official advice it seems a tad

Re: How can i access UserProfile from User in the views?

2009-03-17 Thread ntoll
{{ user.get_profile.home_address }} should do the trick. On Mar 17, 4:46 pm, Paolo Corti wrote: > Hi > I know is easy to access to the UserProfile, like here: > > from django.contrib.auth.models import User > u = User.objects.get(pk=1) # Get the first user in the system >

Re: Django Admin Titles

2009-03-17 Thread AKK
Thanks, thats worked fine. I don't know why my original message has reproduced itself. Regards, Andrew --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Django Admin Titles

2009-03-17 Thread AKK
Hi, I've got the django adming setup but if i look at posts for example i just get a with post object loads of times. How can i it so it displays the post title? In my admin.py i have: admin.site.register(Post) and the model is: post_title = models.CharField(max_length=750) .

Re: Typo for Django or Like?

2009-03-17 Thread James Matthews
Sure, Typo is a blogging platform/cms (Like wordpress). I know about Django-cms and I am wondering if there are any others? Thanks James On Wed, Mar 18, 2009 at 12:02 AM, Alex Gaynor wrote: > > > On Tue, Mar 17, 2009 at 5:59 PM, James Matthews

Re: Typo for Django or Like?

2009-03-17 Thread Alex Gaynor
On Tue, Mar 17, 2009 at 5:59 PM, James Matthews wrote: > Hi, > > I have been using Django now for a while. I am wondering if there are any > applications like Typo for RoR in Django or you have to write it by > yourself. > > Thanks > James > > -- >

Typo for Django or Like?

2009-03-17 Thread James Matthews
Hi, I have been using Django now for a while. I am wondering if there are any applications like Typo for RoR in Django or you have to write it by yourself. Thanks James -- http://www.astorandblack.com --~--~-~--~~~---~--~~ You received this message because you

Re: Setting up Facebook Connect for your test environment

2009-03-17 Thread Roboto
thanks I'll try. Looks like they don't allow sandbox type environments yet. On Mar 17, 9:56 am, Chris Scott wrote: > On Mar 17, 2009, at 8:43 AM, Roboto wrote: > > > > > Hey guys, > > > I'm trying to get facebook connect to work on my django site.  I've > > hit a little

Re: Django Admin Titles

2009-03-17 Thread Alex Gaynor
On Tue, Mar 17, 2009 at 5:27 PM, AKK wrote: > > Hi, > > I've got the django adming setup but if i look at posts for example i > just get a with post object loads of times. How can i it so it > displays the post title? > > In my admin.py i have: > >

Django Admin Titles

2009-03-17 Thread AKK
Hi, I've got the django adming setup but if i look at posts for example i just get a with post object loads of times. How can i it so it displays the post title? In my admin.py i have: admin.site.register(Post) and the model is: post_title = models.CharField(max_length=750) .

Re: Django critter helps us code at the speed of light.

2009-03-17 Thread Eric Walstad
On Mar 16, 10:00 am, Klowner wrote: > That's just awesome. > > Quick and dirty 3D version done in blender > :)http://img.skitch.com/20090316-82bsdnfjm15xarx3t9c1e4a7q9.png > > - Mark Lucinda says: "I really like the 3D version; it's brilliant." -ew

Re: Models and select

2009-03-17 Thread Alex Gaynor
On Tue, Mar 17, 2009 at 5:13 PM, Juan Hernandez wrote: > Hi there: > > I have this model for example > > class Categories(models.Model): > name = models.CharField(max_length=30) > > which holds this data on the DB > > ++--+ > | id | name | >

Re: objects.filter (calling a method) ?

2009-03-17 Thread arbi
Ok thanks, But it would be great to have such things implemented in Django! On 17 mar, 22:13, Alex Gaynor wrote: > On Tue, Mar 17, 2009 at 5:06 PM, arbi wrote: > > > Hi, > > > I would like to do something like that, but I don't know if I can (I > >

memcached: is this thing plugged in?

2009-03-17 Thread hotani
I have a test server which is running the db and django app (apache/ mod_python). Before moving to production, I'm running stress tests and optimizing performance. My plan is to optimize on the test box, see what works, then implement these on production which is separate db and app servers.

Re: RelatedObject Cache

2009-03-17 Thread Alex Gaynor
On Tue, Mar 17, 2009 at 5:08 PM, Andrew Fong wrote: > > Hello all, > > Quick question. Given these models ... > > class A(models.Model): pass > > class B(models.Model): > model_a = models.ForeignKey(A) > > ... getting the model_a attribute on an instance of B will result

filter calling a method?

2009-03-17 Thread arbi
Hi, My message seems to have been deleted (I have just wrote it, I don't understand!) So, I want to do this, but I can't find it in Django : Here is MyClass MyClass : def __init__(self) : ... ... def similarity_to(self, other_object) : return integer I want to tell in

Models and select

2009-03-17 Thread Juan Hernandez
Hi there: I have this model for example class Categories(models.Model): name = models.CharField(max_length=30) which holds this data on the DB ++--+ | id | name | ++--+ | 1 | Musica | | 2 | Programacion | | 3 | Libros | | 4 | Politica

Re: objects.filter (calling a method) ?

2009-03-17 Thread Alex Gaynor
On Tue, Mar 17, 2009 at 5:06 PM, arbi wrote: > > Hi, > > I would like to do something like that, but I don't know if I can (I > didn't find it on djangoproject.com) : > > Here is myClass : > > myClass: > def __init__(self) : > ... > > def

RelatedObject Cache

2009-03-17 Thread Andrew Fong
Hello all, Quick question. Given these models ... class A(models.Model): pass class B(models.Model): model_a = models.ForeignKey(A) ... getting the model_a attribute on an instance of B will result in that related object being cached. So the question: given an instance of B, how do I know

objects.filter (calling a method) ?

2009-03-17 Thread arbi
Hi, I would like to do something like that, but I don't know if I can (I didn't find it on djangoproject.com) : Here is myClass : myClass: def __init__(self) : ... def similiarity_to(other_object) : return an integer And somewhere in my view I want to do :

nested dereferencing of values within value calls in templates

2009-03-17 Thread Jay Deiman
Ok, I'm wondering if there is any way to do this. Let me give a couple of ***simplified*** examples to clarify what I'm talking about here. I make "simplified" previously apparent because what I'm actually trying to do is much more complicated than these examples. View code:

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Huuuze
Paulo, thank you for the link, but I don't see how that will help. To help articulate the problem, here is a post I included on StackOverflow.com: >> I would like to audit when a user has experienced an idle timeout in my >> Django application. In other words, if the user's session cookie's

Re: Django bug that should be addressed: Idle timeouts do not clear session information

2009-03-17 Thread Paulo Köch
Taking the lead from http://www.artfulcode.net/articles/threading-django/ I would sugest you use a Timer object (http://www.python.org/doc/2.5.2/lib/timer-objects.html). DISCLAIMER: Careful! I haven't tested this! A Timer object uses a thread internally. Be careful with synchronization and

Select multiple db items and print

2009-03-17 Thread bsisco
i know that this is probably a RTFM situation but i've been through it and can't seem to find what i'm looking for. i would like to be able to have a table very similar to the change_list in the admin. within that table i would like to be able to select multiple records via checkboxes then

Re: Conditional row coloring in django-admin changelist --SOLVED

2009-03-17 Thread bsisco
ok...i figured it out. i added the following to the change_llist_results.html template and it worked like a charm: {% for result in results %} $(document).ready(function(){ var column = 12 $('img[alt="1"]').parent().filter('td:nth-child('+ (column)

Re: Django critter helps us code at the speed of light.

2009-03-17 Thread Eric Walstad
On Mar 16, 5:29 pm, Scott Lyons wrote: > Based on mrts' drawings, I made two backgrounds. I'm open to > suggestions or requests. > > http://www.flickr.com/photos/damagedgenius/3361587194/ > > and > > http://www.flickr.com/photos/damagedgenius/3361587300/in/photostream/

Re: Django critter helps us code at the speed of light.

2009-03-17 Thread Eric Walstad
On Mar 16, 11:00 am, Klowner wrote: > Quick and dirty 3D version done in blender > :)http://img.skitch.com/20090316-82bsdnfjm15xarx3t9c1e4a7q9.png Oooh, very cool! --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: How can i access UserProfile from User in the views?

2009-03-17 Thread Andy Mckay
On 17-Mar-09, at 10:36 AM, Paolo Corti wrote: > if i use this in the template i get this error: Caught an exception > while rendering: Cannot resolve keyword 'user' into field So it has no variable user, that has nothing to do with the rest of your problem. If you use request context

Re: FIXED: Can't run django on Apache

2009-03-17 Thread Bro
Hi I've installed Django 1.02 on my dedibox. I'm trying to make .py file readable and executable. Apache, Python, Django are installed. We have many website : /var/www/mysite1 /var/www/mysite2 /var/www/mysite3 we have : /var/django/mysite1 /var/django/mysite2 We configure in

Re: Django book mostly done?

2009-03-17 Thread Alex Gaynor
On Tue, Mar 17, 2009 at 1:47 PM, waltbrad wrote: > > I happened to visit the Django Book site 2.0 It still says that it's > not complete, but it seems to cover everything the 1.0 did except for > deployment and the Appendices. Could a person get a pretty good > grounding

Re: Numbering of items in template

2009-03-17 Thread Alex Gaynor
On Tue, Mar 17, 2009 at 1:48 PM, Jacob Kaplan-Moss < jacob.kaplanm...@gmail.com> wrote: > > On Tue, Mar 17, 2009 at 12:46 PM, Jesse wrote: > > I'm please to know of such a tag. Do you know of a good example of > > how it is used with the sum filter? Otherwise, I will try. >

Re: Numbering of items in template

2009-03-17 Thread Jacob Kaplan-Moss
On Tue, Mar 17, 2009 at 12:46 PM, Jesse wrote: > I'm please to know of such a tag.  Do you know of a good example of > how it is used with the sum filter?  Otherwise, I will try. I don't know why you'd need the sum filter; the for tag does everything you'd want. See

Re: Numbering of items in template

2009-03-17 Thread Jesse
I'm please to know of such a tag. Do you know of a good example of how it is used with the sum filter? Otherwise, I will try. Thanks! On Mar 17, 9:51 am, Alex Koshelev wrote: > You can use `forloop.counter` with `sum` filter. Or use `ol` html tag > with proper `start`

Django book mostly done?

2009-03-17 Thread waltbrad
I happened to visit the Django Book site 2.0 It still says that it's not complete, but it seems to cover everything the 1.0 did except for deployment and the Appendices. Could a person get a pretty good grounding in django now by reading 2.0? I guess what I mean is that for the past few

Re: How can i access UserProfile from User in the views?

2009-03-17 Thread Paolo Corti
Hello Andy > > Do you mean in the template? yes, sorry... > > I don't use Django templating but have you tried: > > user.get_profile.home_address > if i use this in the template i get this error: Caught an exception while rendering: Cannot resolve keyword 'user' into field thanks anyway

Re: How can i access UserProfile from User in the views?

2009-03-17 Thread Andy Mckay
On 17-Mar-09, at 9:46 AM, Paolo Corti wrote: > from django.contrib.auth.models import User > u = User.objects.get(pk=1) # Get the first user in the system > user_address = u.get_profile().home_address > > but is there a way to access to UserProfile in the view? Do you mean in the template? The

Re: FIXED: Can't run django on Apache

2009-03-17 Thread Bro
The result is : SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE mysite.settings PythonOption django.root /home/rex/django/mturk PythonDebug On PythonPath "['/home/rex/django/'] + sys.path"

Re: Problem with formsets and uploading of files

2009-03-17 Thread motard
I found the error in this post: http://groups.google.com/group/django-users/browse_thread/thread/adf591a15786ca98 Feel a bit embarrassed... Wasn't setting the enctype attribute in my form html tag... Regards, Stefan On 17 mar, 17:06, Alex Gaynor wrote: > On Tue, Mar

Re: TemplateDoesNotExist

2009-03-17 Thread TP
Still stuck on this. The tutorial says: Put the following code in that template: {% if latest_poll_list %} {% for poll in latest_poll_list %} {{ poll.question }} {% endfor %} {% else %} No polls are available. {% endif %} by the template does it meant the

Re: Numbering of items in template

2009-03-17 Thread Alex Koshelev
You can use `forloop.counter` with `sum` filter. Or use `ol` html tag with proper `start` attribute. On Tue, Mar 17, 2009 at 7:47 PM, Jesse wrote: > > Hello, > > I've finally gotten pagination to work.  Now I would like to add a > sequential number to the beginning of each

Re: static files protect access

2009-03-17 Thread alain31
Got it, thanks. For Apache, I found a clear tutorial : http://codeutopia.net/blog/2009/03/06/sending-files-better-apache-mod_xsendfile-and-php/ Alain. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Numbering of items in template

2009-03-17 Thread Jesse
Hello, I've finally gotten pagination to work. Now I would like to add a sequential number to the beginning of each record in the output. In previous languages I used something like count=count+1 and then placed count at the beginning of each record output in the template. How is a record

How can i access UserProfile from User in the views?

2009-03-17 Thread Paolo Corti
Hi I know is easy to access to the UserProfile, like here: from django.contrib.auth.models import User u = User.objects.get(pk=1) # Get the first user in the system user_address = u.get_profile().home_address but is there a way to access to UserProfile in the view? supposing the UserProfile

Re: Problem with formsets and uploading of files

2009-03-17 Thread motard
This is an error of mine that happened when transcribing my code to the mail. I DO call is_validate() The issue here seems to be something I miss regarding the use of file uploads together with formsets... Regards, Stefan On Mar 17, 5:06 pm, Alex Gaynor wrote: > On

Re: multiple python versions

2009-03-17 Thread TheIvIaxx
I tried do the whole 64 bit thing but ran into several headaches with compiling the modules for AMD64 on vista. I've never done it before and i kept having to download this and that sdk just to find it not working. So i just left everything 32 bit and got to work on the django app. I'll try

Re: Many to Many is empty when saving parent object

2009-03-17 Thread Brandon Taylor
Ah, gotcha, so my signal is attached to the wrong sender. I was thinking I would have access to the categories during the Entry's save operation due to the m2m relationship on the field, but obviously not. I'll move the signal and see what happens. Thank you, Brandon On Mar 16, 6:53 pm,

Re: Port in use Error

2009-03-17 Thread TP
gordyt Thanks this does help, I managed to overcome this problem yesterday, but was still slightly confused as to why I had the error in the first place, this helps me understand! Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Port in use Error

2009-03-17 Thread gordyt
TP I don't know if this applies to your situation or not, but... On an app I'm currently writing I'm using UUID primary keys for some of the models. When creating a new instance of one of those models, say through the admin interface, the development server will start up an instance of a

Re: Problem with formsets and uploading of files

2009-03-17 Thread Alex Gaynor
On Tue, Mar 17, 2009 at 11:09 AM, Stefan Tunsch wrote: > > Hi! > > I am having trouble getting a formset to work and handling the uploaded > files. > > First of all, let me say that it's the first time I'm working with > formsets. > I've also never before tried to upload

  1   2   >