Re: User getting inadvertently logged out

2009-06-06 Thread Karen Tracey
On Sat, Jun 6, 2009 at 7:50 PM, metametagirl wrote: > > Hi folks, > I'm new to Django and web development in general (though I'm > experienced with Python). I'm developing two sites on my local > desktop machine. Each site is a separate Django site with one app, > and each site has a separate s

Re: Strange: named URL only works in root urlconf..

2009-06-06 Thread Karen Tracey
On Fri, Jun 5, 2009 at 8:17 AM, gnijholt wrote: > > I've used named URLs for some time now, never had any trouble with > them. > But now I have added an app 'website' to a new Django project. > (version 1.1 beta 1 SVN-10924) > > My root urlconf (as defined in settings.py) contains an include to >

Re: Question about login

2009-06-06 Thread David
Your reply is truely helpful! Thanks Gabriel! On Jun 6, 7:22 pm, Gabriel wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > David escribió: > > > > > > > Hello, > > > Just wonder if anybody has met this. I modified LOGIN_REDIRECT_URL > > from "accounts/profile" to 'accounts' but Dj

Re: Related Managers and use_for_related_fields strangeness

2009-06-06 Thread Streamweaver
I'll have to look harder at the documentation then as I'm a bit confuesed. What I thought was happening was that I would get a Project object (p) by filtering. I thought p.release_set returned a query set of Release filtered to those related to that project and I could just continue to filter do

Re: Type Error str is not callable in base.py

2009-06-06 Thread Alex Gaynor
On Sat, Jun 6, 2009 at 11:05 PM, grElement wrote: > > I found the tickets regarding this error on the bug reports and > noticed that it comes up when there is something wrong with your view, > but I can't seem to find anything off. Here is my view.py in that app. > Weird thing is I'm just copying

Type Error str is not callable in base.py

2009-06-06 Thread grElement
I found the tickets regarding this error on the bug reports and noticed that it comes up when there is something wrong with your view, but I can't seem to find anything off. Here is my view.py in that app. Weird thing is I'm just copying this over from another project and it was working fine there

Re: Question about login

2009-06-06 Thread Gabriel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 David escribió: > Hello, > > Just wonder if anybody has met this. I modified LOGIN_REDIRECT_URL > from "accounts/profile" to 'accounts' but Django still re-directs to > "accounts/profile" after a user has logined successfully. If > LOGIN_REDIRECT_U

Re: Tricky URL / Reverse Regex

2009-06-06 Thread bimsland
That's most likely what I'm going to do, but from a purely academic perspective (and because I love using regex to shorten things) I was hoping someone might have an idea on how to accomplish what I'm going for without splitting things up. ;) On Jun 6, 6:42 pm, Alex Gaynor wrote: > On Sat, Jun 6

Re: Tricky URL / Reverse Regex

2009-06-06 Thread Alex Gaynor
On Sat, Jun 6, 2009 at 9:39 PM, bimsland wrote: > > Working on making some URLs on a project of mine ReSTful, and decided > to go with the filename extensions route for specifying content-type. > > I've got a view named concerts, and to keep backwards compatibility, I > need to make sure the old

Tricky URL / Reverse Regex

2009-06-06 Thread bimsland
Working on making some URLs on a project of mine ReSTful, and decided to go with the filename extensions route for specifying content-type. I've got a view named concerts, and to keep backwards compatibility, I need to make sure the old URLs still work. I need the urlpattern to match... ^/conce

Question about login

2009-06-06 Thread David
Hello, Just wonder if anybody has met this. I modified LOGIN_REDIRECT_URL from "accounts/profile" to 'accounts' but Django still re-directs to "accounts/profile" after a user has logined successfully. If LOGIN_REDIRECT_URL is the url for default re-directing, then why it still comes the word "pro

Re: The best hoster to install Django

2009-06-06 Thread Kenneth Gonsalves
On Sunday 07 June 2009 05:14:20 Bro wrote: > I ask a question : What is the best hoster to install Django ? http://djangofriendly.com/hosts/ < study them all and remember that you have to choose the best for your proposed application: small - a shared hosting like webfaction medium - a VP

User getting inadvertently logged out

2009-06-06 Thread metametagirl
Hi folks, I'm new to Django and web development in general (though I'm experienced with Python). I'm developing two sites on my local desktop machine. Each site is a separate Django site with one app, and each site has a separate sqlite3 database file. I'm experiencing the following odd behavio

Re: The best hoster to install Django

2009-06-06 Thread Dj Gilcrease
Webfaction Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com On Sat, Jun 6, 2009 at 5:44 PM, Bro wrote: > > Hi Everyone, > > I ask a question : What is the best hoster to install Django ? > Because Django is a very cool project, I want to buy a Hoster that > support Django. > > Thanks :)

The best hoster to install Django

2009-06-06 Thread Bro
Hi Everyone, I ask a question : What is the best hoster to install Django ? Because Django is a very cool project, I want to buy a Hoster that support Django. Thanks :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: Related Managers and use_for_related_fields strangeness

2009-06-06 Thread Ramiro Morales
On Thu, Jun 4, 2009 at 11:41 PM, Streamweaver wrote: > > I'm still struggling a bit with related managers.  I have what I think > should work right by the documentation but behavior isn't as expect. > > [...] > > I have a Project model which has Releases so Releases have a FK field > for Projects.

Re: default settings for applications

2009-06-06 Thread ben
Thanks for the answer. In particular I'm wondering about apps that will be shared by several projects. The default_settings.py would then be the values of the settings if the projects don't override these settings in their DJANGO_SETTINGS_MODULEs. Effectively I'm planning on using something like

Fwd: nortech

2009-06-06 Thread Ramdas S
-- Forwarded message -- From: Ramdas S Date: Sun, Jun 7, 2009 at 2:34 AM Subject: nortech To: Dhaval Valia , Bhaswati Das < bhaswa...@ubmindia.com> -- Ramdas S +91 9342 583 065 -- Ramdas S +91 9342 583 065 --~--~-~--~~~---~--~~ You receive

Re: Related Managers and use_for_related_fields strangeness

2009-06-06 Thread Streamweaver
Cutting down the code sample I gave above in case that helps. Code snippet below Again, my problem is that if I call Release.objects.planning_backlog() it works and I get all relavant Releases. If I call Project.release_set.planning_backlog() I again get all Releases that fit the filter instead

Re: Related Managers and use_for_related_fields strangeness

2009-06-06 Thread Streamweaver
No insights at all in the group? --~--~-~--~~~---~--~~ 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 switch of autosaving for a m2m-relationship

2009-06-06 Thread Julian
hi russell, thanks, this is what I've found studying the code but not in the documentation. thanks a lot! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

OT: running custom management command from cron & Unicode output error

2009-06-06 Thread Carlos A. Carnero Delgado
Hi there! I'm having a problem with a custom management command. Running interactively on the console will work perfectly, merrily printing its output in Unicode (I need that; accented characters among other things). But, if I put that command in a cron job, it will fail with UnicodeEncodeErr

Re: Bulk get

2009-06-06 Thread Daniel Roseman
On Jun 6, 4:13 pm, Andrew Fong wrote: > Was hoping not to have to loop back through it -- but I guess I'll > just have to suck it up and do it. Thanks. > If you've got the order already in model_pk_list, you can use the order_by parameter to .extra() to get the results in that order straight f

Re: How to deal with object that have out of date querysets

2009-06-06 Thread AlexM
Thats what i was looking for , thanks guys . On Jun 6, 6:10 pm, Andrew Fong wrote: > What you're dealing with is called a "race condition". Transactions > ensure that a set of database operations occur together in a single > uninterrupted unit. That's not quite the exact definition, but if > you

Re: How to deal with object that have out of date querysets

2009-06-06 Thread Tomasz Zieliński
On 6 Cze, 17:05, Alex Gaynor wrote: > 2009/6/6 Tomasz Zieliński > > > > > On 6 Cze, 16:26, Masklinn wrote: > > > > Use transactions? > > > Or use atomic SQL increment - bypassing Django ORM, > > if speed is main concern here. > > > In the development version Django's ORM can do atomic SQL >

Re: Bulk get

2009-06-06 Thread Andrew Fong
Was hoping not to have to loop back through it -- but I guess I'll just have to suck it up and do it. Thanks. On Jun 6, 11:04 am, Michael wrote: > On Sat, Jun 6, 2009 at 10:55 AM, Andrew Fong wrote: > > > Hi all, > > > I'm trying to figure out how to do this and can't seem to wrap my head > > a

Re: How to deal with object that have out of date querysets

2009-06-06 Thread Andrew Fong
What you're dealing with is called a "race condition". Transactions ensure that a set of database operations occur together in a single uninterrupted unit. That's not quite the exact definition, but if you're picky, see this: http://en.wikipedia.org/wiki/Database_transaction You can find document

Re: How to deal with object that have out of date querysets

2009-06-06 Thread Alex Gaynor
2009/6/6 Tomasz Zieliński > > > > On 6 Cze, 16:26, Masklinn wrote: > > > Use transactions? > > Or use atomic SQL increment - bypassing Django ORM, > if speed is main concern here. > > -- > Tomasz Zieliński > http://pyconsultant.eu > > > In the development version Django's ORM can do atomic SQL o

Re: Bulk get

2009-06-06 Thread Michael
On Sat, Jun 6, 2009 at 10:55 AM, Andrew Fong wrote: > > Hi all, > > I'm trying to figure out how to do this and can't seem to wrap my head > around it today. I have currently have a piece of code like this: > > x = [MyModel.objects.get(pk=pk) for pk in model_pk_list] > x = MyModel.objects.filter

Re: How to deal with object that have out of date querysets

2009-06-06 Thread Tomasz Zieliński
On 6 Cze, 16:26, Masklinn wrote: > Use transactions? Or use atomic SQL increment - bypassing Django ORM, if speed is main concern here. -- Tomasz Zieliński http://pyconsultant.eu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Bulk get

2009-06-06 Thread Andrew Fong
Hi all, I'm trying to figure out how to do this and can't seem to wrap my head around it today. I have currently have a piece of code like this: x = [MyModel.objects.get(pk=pk) for pk in model_pk_list] I want to modify this such that ... * Everything is done with one call to the DB instead len

Re: Customizing extends template tag for mobile version of site

2009-06-06 Thread Andrew Fong
I thought about doing that, but the problem with that approach is it sort of violates the distinction between developer and designer that the Django template system establishes. I'm not sure having the designer muck around in Python to change which template their design extends is a good idea. I'

Re: How to deal with object that have out of date querysets

2009-06-06 Thread Masklinn
On 6 juin 09, at 15:34, AlexM wrote: > In one of my views i am using a custom manager , the custom manager > finds a user , alters his "balance" (where balance is an integer > value) , and then saves the user with the new balance. > > The problem occurs when http requests coming really fast on th

Re: Feedbacks and recommendations about test coverage tools

2009-06-06 Thread Michelschr
Here is another interesting link: http://siddhi.blogspot.com/2007/04/code-coverage-for-your-django-code.html It's a bit old, but it points itself to other interesting links (read the comments also...) After reading and testing a bit all these things, I arrive for the moment at the conclusion th

How to deal with object that have out of date querysets

2009-06-06 Thread AlexM
In one of my views i am using a custom manager , the custom manager finds a user , alters his "balance" (where balance is an integer value) , and then saves the user with the new balance. The problem occurs when http requests coming really fast on that view. Lets say the "original" value of a us

Re: how to switch of autosaving for a m2m-relationship

2009-06-06 Thread Russell Keith-Magee
On Sat, Jun 6, 2009 at 5:11 PM, Julian wrote: > > hello, > > i have a queryset and a model with a manytomany-relationship, let's > say a pizza has toppings. > > my pizza margharita has already some toppings and now i retrieve a > queryset of some more and want to add them to the pizza: > > for top

Re: Customizing extends template tag for mobile version of site

2009-06-06 Thread Matthias Kestenholz
On Fri, Jun 5, 2009 at 6:35 PM, Andrew Fong wrote: > > I was hoping someone could explain to me what the exact behavior would > be if the Extends Node in the template was not first. > > Here's my use-case scenario: I need to maintain separate mobile and > desktop templates for my site. I'm findin

Re: Feedbacks and recommendations about test coverage tools

2009-06-06 Thread kRON
Thanks for posting the links, I'll be sure to try and test it during the weekend. On Jun 5, 1:37 pm, Michelschr wrote: > Hello everyone, > > What are the current trends about the best test coverage tools to use > with Django? > Do you have feedback or recommendations for me? > > Up to now, I fou

Re: Django SVN vs. stable

2009-06-06 Thread Tomasz Zieliński
Hello On 6 Cze, 10:50, "K.Berkhout" wrote: > Hi, > > I'm about to start a new project using Django. > Do you recommend me to start with the stable release and convert to > 1.1 later, or would it be better to start with the development SVN > version? According to this: http://www.djangoproject.

Re: Django SVN vs. stable

2009-06-06 Thread Masklinn
On 6 Jun 2009, at 10:50 , K.Berkhout wrote: > Hi, > > I'm about to start a new project using Django. > Do you recommend me to start with the stable release and convert to > 1.1 later, or would it be better to start with the development SVN > version? > > Thanks, > > Kevin I'd say it depends on tw

how to switch of autosaving for a m2m-relationship

2009-06-06 Thread Julian
hello, i have a queryset and a model with a manytomany-relationship, let's say a pizza has toppings. my pizza margharita has already some toppings and now i retrieve a queryset of some more and want to add them to the pizza: for topping in toppings: pizza.toppings.add(topping) the problem

Django SVN vs. stable

2009-06-06 Thread K.Berkhout
Hi, I'm about to start a new project using Django. Do you recommend me to start with the stable release and convert to 1.1 later, or would it be better to start with the development SVN version? Thanks, Kevin --~--~-~--~~~---~--~~ You received this message becaus