Re: get for errors as string and not as HTML

2008-04-29 Thread Mike Chambers
Thanks. This was the only way I could get the string: {% for s in form.user_name.errors %}{{s}}{% endfor %} I tried some of the list template filters (such as slice, but didnt havent any luck with them). Are there instances where more than one validation error would be returned for a

Re: Queryset-refactor branch has been merged into trunk

2008-04-29 Thread pemdas
The above post is in reference to Craig Ogg's post on using the Mercurytide FullText searching. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: get for errors as string and not as HTML

2008-04-29 Thread Ronny Haryanto
On Wed, Apr 30, 2008 at 12:03 PM, Mike Chambers <[EMAIL PROTECTED]> wrote: > > Name > {{ form.user_name }} {{ form.user_name.errors }} > > Is there any way to just get the raw error string? You should be able to treat form.user_name.errors as

Re: Queryset-refactor branch has been merged into trunk

2008-04-29 Thread pemdas
Thanks for the post! It would have taken me hours to figure out where to start looking when this error first came up. I made the change to my SearchQuerySet subclass instead and it works also. I didn't make the change to SearchManager. My code looks like this if interested. class

get for errors as string and not as HTML

2008-04-29 Thread Mike Chambers
I have a form that I am custom rendering in a view like so: -- Name {{ form.user_name }} -- I am working on implementing input error feedback, so I did this: -- Name {{ form.user_name }} {{

Re: Django, Komodo and Mac OS X

2008-04-29 Thread Scott SA
On 4/29/08, ydjango ([EMAIL PROTECTED]) wrote: >My path is > >/Users/xyz/django-trunks/django/bin > >and I have links created as mentioned in django installation guide. > >what path did you add, till django-trunks or till django? > >when I do . I see all the attributes and methods of >the model

a question about model inheritance after qs-rf

2008-04-29 Thread medhat
Hi, QS-rf in general and model inheritance in particular are really cool. I have been waiting for them for a long time, thanks :-) I am trying now to use them. And one question I have is the following: for multi-table inheritance, (using the example from the documentation,) let's say that we

Re: Django, Komodo and Mac OS X

2008-04-29 Thread ydjango
My path is /Users/xyz/django-trunks/django/bin and I have links created as mentioned in django installation guide. what path did you add, till django-trunks or till django? when I do . I see all the attributes and methods of the model class but do not see "objects" ( I want .objects. code

Re: Passing file contents to output w/o reading it to memory

2008-04-29 Thread Graham Dumpleton
On Apr 30, 11:44 am, vv2 <[EMAIL PROTECTED]> wrote: > Hi there, > > I just noticed latest changeset in django-trunk (http:// > code.djangoproject.com/changeset/7510) and I started wondering if it > is possible to pass file contents to output without actually storing > it in memory. > > So, the

Passing file contents to output w/o reading it to memory

2008-04-29 Thread vv2
Hi there, I just noticed latest changeset in django-trunk (http:// code.djangoproject.com/changeset/7510) and I started wondering if it is possible to pass file contents to output without actually storing it in memory. So, the question is: Is there anything like PHP's fpassthru() function

Insane Frustration with IE and Image uploading

2008-04-29 Thread Roboto
This is probably all just a result of lack of experience, poor programming practices and knowledge, but I thought I'd share this little bit of information. My code to validate picture data posted below. My quick commentary on it is that it works 100% for fire fox, safari. But images won't

Re: cut-and-paste traceback error actually the error from the time before --

2008-04-29 Thread Joe Murphy
Yeah -- I am using firefox. Thanks for the lead on that. On Apr 29, 2:05 pm, Mike H <[EMAIL PROTECTED]> wrote: > Are you using firefox? I think this is a "helpful" feature of firefox > where if you fill out a form and refresh the page, it remembers the > form content so you don't have to fill it

Re: Hardy Upgrade And PythonPath

2008-04-29 Thread Graham Dumpleton
On Apr 30, 3:26 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi, > > > > > I could use some help getting my Django website back up after an > > upgrade to Hardy Heron. Instead of using svn to get Django, I used > > synaptic this time. Now my site doesn't work and I'm a bit confused > > on

Re: Suggestions on UI (client side web) framework to complement Django

2008-04-29 Thread Andre Meyer
On Tue, Apr 29, 2008 at 9:00 PM, Szaijan <[EMAIL PROTECTED]> wrote: > > In searching for a JS toolkit for my first JS app, I found YUI and > Dojo to be of equal power and utility, but YUI is MUCH better > documented. bad documentation for Dojo is a myth - nowadays. Dojo 1.1 is well documented

Re: authenticated sessions that don't depend on http, cookies, etc.

2008-04-29 Thread Doug B
> I'd like to use something like the Django sessions middleware, > but I don't want to involve cookies or HTTP request headers > at all.  Does anyone have a good way to do this? Why not? You've got to use some kind of transport to get the XML there anyway, and django is built with HTTP in mind.

Re: Login Redirect Ignored

2008-04-29 Thread Szaijan
Dead on Karen, thanks. I am transferring the site from my OS X box to a hosting site and was reviewing the wrong template. All is well now. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Session/Varibale and HttpResponseRedirect help please

2008-04-29 Thread Brandon Taylor
Hi Doug, Yes, I'm absolutely certain it's not a browser caching issue. I was concerned that there was something syntactically wrong with my session get/set code that would cause the value not to be stored. Thoughts? Thanks, Brandon On Apr 29, 10:21 am, Doug Van Horn <[EMAIL PROTECTED]> wrote:

Re: Login Redirect Ignored

2008-04-29 Thread Karen Tracey
On Tue, Apr 29, 2008 at 4:25 PM, Szaijan <[EMAIL PROTECTED]> wrote: > > I'm using the latest django-registration (svn). When I use the login > URL directly, so 'next' is not set, the result of a successful login > drops the user to my document root directory. I've checked in shall > and

Re: Django, Komodo and Mac OS X

2008-04-29 Thread Rui Pacheco
This is what I had to do: Added the path to my Django uncompressed directory to Preferences -> Languages -> Python -> Additional Python Import Directories On Apr 29, 10:48 pm, Rui Pacheco <[EMAIL PROTECTED]> wrote: > It's now working. Very strange, I had a very hard time importing >

Re: Django, Komodo and Mac OS X

2008-04-29 Thread Rui Pacheco
It's now working. Very strange, I had a very hard time importing django.db.models but all of a sudden it works. On Apr 29, 10:44 pm, Szaijan <[EMAIL PROTECTED]> wrote: > Hi Rui, > > I'm using Komodo Edit 4 on Mac OSX 10.5 and code completion works for > me in .py files out of the box (just

Re: Django, Komodo and Mac OS X

2008-04-29 Thread Szaijan
Hi Rui, I'm using Komodo Edit 4 on Mac OSX 10.5 and code completion works for me in .py files out of the box (just tested it for django.utils.simplejson.) I did nothing to the setup to get this to work. Is it possible your django installation isn't on the python path for the user you're logged

Django, Komodo and Mac OS X

2008-04-29 Thread Rui Pacheco
Hi all I've looked for a solution for this but I couldn't find any. I've installed Django on a MacBook Pro and settled on Komodo as my IDE because Eclipse on the Mac is just too slow. The problem is, I can't get code completion to work because Komodo doesn't find the Django packages. I

Re: Admin site - apply business logic

2008-04-29 Thread [EMAIL PROTECTED]
thanks for shedding some light, I'll be sure to keep my eye on the newforms-admin branch. Maybe I'll get my hands dirty in the todo list that's stopping the merger as it looks very promising to me. -al On Apr 29, 9:55 pm, "Justin Lilly" <[EMAIL PROTECTED]> wrote: > I think you'd be interested

Re: need to use both django 0.96 and django trunk for work

2008-04-29 Thread Simon Willison
On Apr 29, 10:03 pm, berthor <[EMAIL PROTECTED]> wrote: > I was told by my boss that I would be using both django 0.96 and > django trunk on 2 separate projects. Now I'm not sure how to go about > doing this, as I have been working with only django 0.96 before. I've > downloaded the trunk

need to use both django 0.96 and django trunk for work

2008-04-29 Thread berthor
I was told by my boss that I would be using both django 0.96 and django trunk on 2 separate projects. Now I'm not sure how to go about doing this, as I have been working with only django 0.96 before. I've downloaded the trunk version on my desktop, and have tar file of 0.96 also on my desktop.

Best way to extend an existing django app

2008-04-29 Thread Scott SA
Hi, I'm looking for clues as to the best way I can add methods and attributes to an existing django app. I need to add quite a bit of functionality to a portion of the existing app, while other portions are good (very good, actually). Two initial, but undesirable, options I see are to fork or

Re: cut-and-paste traceback error actually the error from the time before --

2008-04-29 Thread Colin Bean
In this situation it might be helpful to use tamper data (or something similar) to examine the all of the requests / responses and see exactly what your server is sending and when Could at least determine if this is broswer behavior or if Django is really sending the incorrect trace. Colin

Which kind of model inheritance is most suited?

2008-04-29 Thread francesco
Hi, I'd like to implement two kind of users in my system: a buyer and a seller. Both kind of users should, of course, inherit from a user model. As I'd like to use the authentication framework from django.contrib, should I have the "user" as table in the database or can I get by with an abstract

Re: How to use dojo toolkit in django?

2008-04-29 Thread [EMAIL PROTECTED]
I've also been looking at Dojo lately. Of the javascript frameworks I've looked over, it appears to have the best combination of abstraction and features (feel free to offer alternatives). I've tried to get the dojox.Grid thing working but have so far failed to do so. Serializing a queryset into

Login Redirect Ignored

2008-04-29 Thread Szaijan
I'm using the latest django-registration (svn). When I use the login URL directly, so 'next' is not set, the result of a successful login drops the user to my document root directory. I've checked in shall and LOGIN_REDIRECT_URL is set correctly and being imported correctly, but it is not being

Authentication-backend problem

2008-04-29 Thread Hanne Moa
I have a type of user that is logged in to the site in a way externally (SAML2-module for apache) to django (newest newforms-admin branch). This external login-process leaves a token in the environment-variables: while the token is in the envvars, the user is logged in. (I hope to write a SAML2

Re: cut-and-paste traceback error actually the error from the time before --

2008-04-29 Thread Mike H
Are you using firefox? I think this is a "helpful" feature of firefox where if you fill out a form and refresh the page, it remembers the form content so you don't have to fill it in again. So if you get an error page, fix the problem, refresh and get a different error, firefox messes up

Re: authenicate

2008-04-29 Thread J. Cliff Dyer
On Mon, 2008-04-28 at 13:01 -0700, Chris wrote: > Anyone see what I am doing wrong here? > Yes. You're not asking good questions. You neither tell us what happens when you run your code, nor what you expect to have happen. Please revise and repost. > http://dpaste.com/47296/ > > Thanks

Re: Admin site - apply business logic

2008-04-29 Thread Justin Lilly
I think you'd be interested in the newforms admin branch of django. http://code.djangoproject.com/wiki/NewformsAdminBranch which is what is suggested for extending the admin panel (with your business logic, for instance). Note that this isn't part of trunk yet. Many people have chosen to wait

Re: Great article about web2py

2008-04-29 Thread mdipierro
OK, will add the references you mention. Some questions/comments: Why isn't the custom Q object for left joins part of Django? or is it? The fact that Django uses a template language that is not written in python and that you can cache it, does not mean Django qualifies as a full YES under my

Admin site - apply business logic

2008-04-29 Thread [EMAIL PROTECTED]
Would it be possible to make Admin site business logic aware when dealing (CRUD) with model objects? For example, I have an "InventoryItem" model accessible via Admin site. I wish to make "InventoryItem" model objects no-editable, read- only, if they fall outside of a given date range as per my

Dynamically filter records in Admin pages

2008-04-29 Thread vincentd
Hello all, I'm using django-0.96 and I'm looking for a simple methods to limit dynamically the records we can see/modify via the admin pages. I have several tables where I store the author of record (the User). When the user has been logged-in, I would use the Admin pages to let him view/modify

authenticated sessions that don't depend on http, cookies, etc.

2008-04-29 Thread Andrew D. Ball
Afternoon. I'm working on a Django application that uses XML-RPC to expose all of its logic. I require that for every method expect the user creation/registration method the requestor be authenticated. I'd like to use something like the Django sessions middleware, but I don't want to involve

Re: Rendering specific widgets of a MultiWidget

2008-04-29 Thread Martin Diers
I'm not sure why DurationField should be added to the core. It's really easy to subclass MultipleValueField and MultiWidget. In any case, from looking at DurationField, it seems that the defaults for days, seconds, and microseconds are sane enough that you would probably be safe to

Re: Suggestions on UI (client side web) framework to complement Django

2008-04-29 Thread Szaijan
In searching for a JS toolkit for my first JS app, I found YUI and Dojo to be of equal power and utility, but YUI is MUCH better documented. If you like writing the widgets but need a cross- functional framework to put underneath them, try http://mochikit.com/. Very functional and well

cut-and-paste traceback error actually the error from the time before --

2008-04-29 Thread Joe Murphy
I thought this was "maybe it's just me" problems -- but it happens on every install of Django, in every environment I've dealt with Django (which is now up to six). When I get a Django error page, the error that's listed in the cut-and- paste traceback is actually the error that existed the

SITE_ID Set Incorrectly and Ignored by get_current()

2008-04-29 Thread Szaijan
I'm not quite sure what I'm doing wrong here. Using the Sites framework, I have a site defined in my database with ID = 2. In the manage.py shell, I can get the correct site by setting SITE_ID to '2' or 2, and calling Site.objects.get(id=SITE_ID), but Site.objects.get_current() always returns

Re: I think psyco breaks Django trunk (post qs-rf merge)

2008-04-29 Thread TP
We've had periodic problems using Pyscho and have resorted to just enabling it for the few key functions that really need it. In our case there are a couple functions that do significant number crunching and so it makes sense to Psycho them but not the rest of the site. On Apr 29, 12:35 pm, Ken

check if template block has been defined?

2008-04-29 Thread Mike Chambers
Is there any way to check if a template block has been defined? Something like: {%if title%} : {% endif %}{% block title %}{% endblock %} Looking at: http://www.djangoproject.com/documentation/templates/#template-inheritance it doesn't look like there is. Can anyone suggest a workaround?

Unicode slug?

2008-04-29 Thread chatchai
Hi, I'm try to get meaning full url but it seem like I will give up and use translate or random ascii instead. I try to quote slug and got key error because urllib doesn't take care about unicode. So I add self.slug = quote(self.slug.encode('utf-8')) and it work with some case, not all. I have

Re: change path to django project.

2008-04-29 Thread igor.potapenko
yes. problem've solved. in settings replace nola.polls to nola2.polls and anyting work fine. big tnx!!! On 29 апр, 20:55, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Apr 29, 2008 at 12:39 PM, igor.potapenko <[EMAIL PROTECTED]> > wrote: > > > > >   Hello! > > > I installed new project

Re: Hardy Upgrade And PythonPath

2008-04-29 Thread Rajesh Dhawan
Hi, > I could use some help getting my Django website back up after an > upgrade to Hardy Heron. Instead of using svn to get Django, I used > synaptic this time. Now my site doesn't work and I'm a bit confused > on path names. > > I believe Hardy installed Django to

Hardy Upgrade And PythonPath

2008-04-29 Thread dayvo
I could use some help getting my Django website back up after an upgrade to Hardy Heron. Instead of using svn to get Django, I used synaptic this time. Now my site doesn't work and I'm a bit confused on path names. I believe Hardy installed Django to /var/lib/python-support/python2.5/ django

Re: Great article about web2py

2008-04-29 Thread Joseph
With respect to using py2exe to compile Django app, refer these two: http://www.jjude.com/index.php/archives/70, ideas which I borrowed heavily from http://www.silverstripesoftware.com/blog/archives/51 Ofcourse I didnt compile the templates. Joseph On Apr 29, 9:14 pm, mdipierro <[EMAIL

Re: Great article about web2py

2008-04-29 Thread Rajesh Dhawan
Hi, > About Left Outer Joins: > > Would the use of a custom Q object in Django to perform a LEFT OUTER > JOIN require programming in raw SQL or can it be done programming with > the ORM API only? In the first case it does not count as explained in > the document. In the second case I will be

Re: Great article about web2py

2008-04-29 Thread Kumar McMillan
On Tue, Apr 29, 2008 at 11:14 AM, mdipierro <[EMAIL PROTECTED]> wrote: > Anyway, if you post an example of a Django bytecode compiled > application and documentation on how to create and deploy it, I will > amend my document to reflect that. If a feature is not tested and not > documented it

Re: change path to django project.

2008-04-29 Thread Karen Tracey
On Tue, Apr 29, 2008 at 12:39 PM, igor.potapenko <[EMAIL PROTECTED]> wrote: > > Hello! > > I installed new project in path1 (... django/nola). After that I make > copy of this project to path2. > Why it work with path1 and don't work with path2 ? > > I thought, that there is some options

Re: Suggestions on UI (client side web) framework to complement Django

2008-04-29 Thread Ken
If you're going to use YUI, I'd check out Ojay (http:// ojay.othermedia.org/). Raw YUI is very verbose; Ojay is a convenience layer on top of it. -Ken On Apr 29, 12:09 pm, ydjango <[EMAIL PROTECTED]> wrote: > Thanks, Going ahead with YUI. > > Reasons for choosing yui > 1) Free and from Yahoo.

change path to django project.

2008-04-29 Thread igor.potapenko
Hello! I installed new project in path1 (... django/nola). After that I make copy of this project to path2. Why it work with path1 and don't work with path2 ? I thought, that there is some options (path_var or smth) in setting.py, but I found no variables. Where is information about path's

I think psyco breaks Django trunk (post qs-rf merge)

2008-04-29 Thread Ken
I just updated my production site to latest trunk, and got hard 500 errors (not even going through the exception handler). Problem caused by bad interaction of new Query objects and psyco. Disable psyco. The exception was: File "/csc/django/db/models/sql/query.py", line 185, in clone

The Summer of Trance vol.3

2008-04-29 Thread furkan atacan
[image: alt] download now The Summer of Trance vol.3 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Eurovision Song Contest 2008 donwload now

2008-04-29 Thread furkan atacan
[image: Eurovision Song Contest 2008] Download now Eurovision Song Contest 2008 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Linkin Park AOL Full Concert

2008-04-29 Thread furkan atacan
[image: alt] Linkin Park AOL Full Concert donwload now sdc --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Great article about web2py

2008-04-29 Thread mdipierro
About Left Outer Joins: Would the use of a custom Q object in Django to perform a LEFT OUTER JOIN require programming in raw SQL or can it be done programming with the ORM API only? In the first case it does not count as explained in the document. In the second case I will be happy to amend the

Re: Suggestions on UI (client side web) framework to complement Django

2008-04-29 Thread ydjango
Thanks, Going ahead with YUI. Reasons for choosing yui 1) Free and from Yahoo. Well supported. 2) Grids 3) Datatable Surprising, how very few frameworks support data tables and how hard is to do data table. I would have expected this to be something out of box for all frameworks. Even

Re: Great article about web2py

2008-04-29 Thread ydjango
Article states... "Web2py and J2ee are the only frameworks that allow byte code compile applications and distribute them in closed source" I read somewhere that "cx_Freeze" can be used to do the same for any python app including those based on Django . I have not used cx_freeze, but intend to do

Re: Django Registration URLs

2008-04-29 Thread Szaijan
Thanks Nathaniel. Adding the line to my urls.py just before the include works. MJ On Apr 29, 5:00 am, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote: > On Apr 28, 6:30 pm, Szaijan <[EMAIL PROTECTED]> wrote: > > > The base urls function properly, i.e. /visionary/accounts/register > > goes where

Re: Great article about web2py

2008-04-29 Thread Rajesh Dhawan
Here are a couple of comments on your slides: 1. Slide: "web2py and j2ee are the only frameworks that allow to byte code compile applications and distribute them in closed source." You can distribute Django applications too with just the .pyc/.pyo compiled files instead of the .py sources.

Re: making a stand-alone program call a django app directly

2008-04-29 Thread Andrew D. Ball
Perfect! Thanks, Andrew On Mon, Apr 28, 2008 at 03:18:45PM -0700, [EMAIL PROTECTED] wrote: > > http://www.b-list.org/weblog/2007/sep/22/standalone-django-scripts/ > > On Apr 28, 5:10 pm, "Andrew D. Ball" <[EMAIL PROTECTED]> wrote: > > Greetings. > > > > I'm working on a Django application and

Re: Session/Varibale and HttpResponseRedirect help please

2008-04-29 Thread Doug Van Horn
You may want to make sure your browser cache isn't showing you an old page. Hit F5 a few times, and also make sure your browser settings have the cache at 0MB, so it doesn't cache anything. After that I'd start by adding some print statements after you add the variable to the session and right

Re: Queryset-refactor branch has been merged into trunk

2008-04-29 Thread Kevin Monceaux
On Sun, 27 Apr 2008, simonbun wrote: > So qs-rf hit trunk and was merged into nfa on the same day! That's > excellent news, both for me and for django. Thanks so much for your > efforts Malcolm (and Brosner for the quick merge)! I'll second that. I've been running against the nfa branch. I

Re: Great article about web2py

2008-04-29 Thread Rajesh Dhawan
On Apr 29, 9:57 am, mdipierro <[EMAIL PROTECTED]> wrote: > Actually, the document is not linked to the web page yet because I am > hoping to get comments and corrections from the different communities. > I admit bias in the choice of comparables and topics but I decide the > target audience.

Re: passing form to base template

2008-04-29 Thread skunkwerk
should do the trick, thanks On Apr 28, 7:49 pm, "Ronny Haryanto" <[EMAIL PROTECTED]> wrote: > On Tue, Apr 29, 2008 at 9:33 AM, skunkwerk <[EMAIL PROTECTED]> wrote: > >  I've got two forms included in my base template, from which a few > >  others inherit.  Currently I'm passing a

Re: class in models.py 'not defined' exception

2008-04-29 Thread skunkwerk
thanks! that was exactly the problem. after i removed the django-created tables from models.py, it started working again. On Apr 28, 10:57 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Apr 29, 2008 at 1:31 AM, skunkwerk <[EMAIL PROTECTED]> wrote: > > > thanks karen, > >   i think my

Re: two choices questions

2008-04-29 Thread dimrub
I finally solved #2 with plain vanilla 0.96. Basically, it involves overriding the fields property of the AdminOptions for the application in question (similar to what's described here: http://lukeplant.me.uk/blog.php?id=1107301634) by a function, that looks up the necessary info, and replaces

Re: Choosing database settings based on request?

2008-04-29 Thread dimrub
What you can try out is the following approach (a variation of which I use in order to customize the data being presented based on the identity of the currently logged in user). 1. Create a middleware that pushes the relevant info from the request into a thread local storage. 2. Create a custom

Re: Great article about web2py

2008-04-29 Thread mdipierro
Actually, the document is not linked to the web page yet because I am hoping to get comments and corrections from the different communities. I admit bias in the choice of comparables and topics but I decide the target audience. Nevertheless I would like to the document to be accurate. If I say

Re: urls stumping me

2008-04-29 Thread Peter of the Norse
That's totally it. The reverse function is fairly stupid (for speed), and it always goes for the first match. You've got two URLS with the same view. That's when it's time for: http://www.djangoproject.com/documentation/url_dispatch/#naming-url-patterns > No, I don't think thats it. Like I

Choosing database settings based on request?

2008-04-29 Thread Tim Chase
While playing around, I found myself wandering down this path, wondering if anybody else had been here before. In summary, I'm wondering if there's an easy way to jockey my DB settings based on information completely self-contained within the request. In longer detail... In this case, it

Rendering specific widgets of a MultiWidget

2008-04-29 Thread Bram Duvigneau
Hello, I'm using the DurationField from http://gulopine.gamemusic.org/2007/nov/03/storing-passages-of-time/ This is working fine, but the included widget shows text fields for days, hours, minutes, seconds and microseconds. I would like to have hours:minutes. The best solution seems to be that

Re: Django Registration URLs

2008-04-29 Thread Nathaniel Whiteinge
On Apr 28, 6:30 pm, Szaijan <[EMAIL PROTECTED]> wrote: > The base urls function properly, i.e. /visionary/accounts/register > goes where it is supposed to, but when resulting URLs are called, they > all get called as /accounts/register/complete instead of /visionary/ > accounts/register/complete.

Re: object.filter and accessing items

2008-04-29 Thread lars
http://code.djangoproject.com/ticket/7121 :-) --~--~-~--~~~---~--~~ 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,

Re: Tutorial: __str__() problems

2008-04-29 Thread Juanjo Conti
Try with this code: def __str__(self): return "testing" Does that work? -- Juanjo Conti --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: sql_queries does not include all the sql statements

2008-04-29 Thread Simon Willison
On Apr 29, 9:31 am, leopay <[EMAIL PROTECTED]> wrote: > oh,sorry ,I made a mistake,it is Entry.objects.all()[0:1] > I means when I write like this Entry.objects.all()[0:1],I cannot find the > this raw sql like 'select col_name from entry_table limit 1' in > sql_queries,but if I write like this

Re: object.filter and accessing items

2008-04-29 Thread lars
I was having a look at the code in order to find out what is going on. First thing I noticed is the set_limit method of sql/query.py. The high_mark is computed as follows: self.high_mark = min(self.high_mark, self.low_mark + high) Shouldn't it be max instead of min? Just wondering. After I

Re: generic delete_object issue on Firefox (redirect bug)

2008-04-29 Thread yml
Hello Koenb, Thank you very much your workaround is working like a charm. I have pasted below an example. In case someone else look for a solution to this problem in the future. However this is close to witchcraft art. I do not understand how FF can be aware that I am doing something in my view

Re: Tutorial: __str__() problems

2008-04-29 Thread Jarek Zgoda
[EMAIL PROTECTED] napisał(a): > I'm just going through the mysite tutorial and can't seem to get the > __str__() method to work when adding it to the two classes, I still > get []. This happened before and I'm not really > sure what fixed it. I'm running .096 > > polls/models.py: > from

Re: Tutorial: __str__() problems

2008-04-29 Thread Jarek Zgoda
shabda napisał(a): > Though __str__ should work here, until you can get this working, try > writing __unicode__ method > > [EMAIL PROTECTED] wrote: >> Hello, >> I'm just going through the mysite tutorial and can't seem to get the >> __str__() method to work when adding it to the two classes, I

Re: Disabling and clearing cache

2008-04-29 Thread Julien
Just after sending this post I had an idea. I could just add a CACHE_ENABLED boolean setting and test it before pulling out the cached version. That's for disabling cache. Any idea about clearing? I gorgot to mention that I'm using file caching. Do I necessarily have to manually delete those

Re: sql_queries does not include all the sql statements

2008-04-29 Thread leopay
oh,sorry ,I made a mistake,it is Entry.objects.all()[0:1] I means when I write like this Entry.objects.all()[0:1],I cannot find the this raw sql like 'select col_name from entry_table limit 1' in sql_queries,but if I write like this Entry.objects.all()[0],I could the sql in sql_queries when use

Re: Tutorial: __str__() problems

2008-04-29 Thread shabda
Though __str__ should work here, until you can get this working, try writing __unicode__ method [EMAIL PROTECTED] wrote: > Hello, > I'm just going through the mysite tutorial and can't seem to get the > __str__() method to work when adding it to the two classes, I still > get []. This happened

Re: Tutorial: __str__() problems

2008-04-29 Thread shabda
Though __str__ should work here, until you can get this working, try writing __unicode__ method [EMAIL PROTECTED] wrote: > Hello, > I'm just going through the mysite tutorial and can't seem to get the > __str__() method to work when adding it to the two classes, I still > get []. This happened

Custom Q object for Full-text

2008-04-29 Thread Grupo Django
HI, I'm trying to make a custom Q-like object as Malcolm recommended me. I have this code: class FT: def add_to_query( self, query, used_aliases ): select={ 'rank': "ts_rank_cd(tsv, query, 32)", } query.add_extra( select,None,('tsv @@

Disabling and clearing cache

2008-04-29 Thread Julien
Hi, I'm using cache.get() and .set() so do fine-grained caching of my site. Works great, but I'd find convenient to be able to force clearing the cache or disabling it altogether at will? Is there a command in Django or a trick that could do that? Thanks a lot, Julien

Tutorial: __str__() problems

2008-04-29 Thread [EMAIL PROTECTED]
Hello, I'm just going through the mysite tutorial and can't seem to get the __str__() method to work when adding it to the two classes, I still get []. This happened before and I'm not really sure what fixed it. I'm running .096 polls/models.py: from django.db import models import datetime

Re: sql_queries does not include all the sql statements

2008-04-29 Thread Amit Ramon
* leopay <[EMAIL PROTECTED]> [2008-04-29 00:07 -0700]: > > I use django.core.context_processors.debug to see the sql_queries in > template. > The raw sql of query > > Entry.objects.all()[0,1] > > does not in the sql_queries,but if I change the query like this > > Entry.objects.all()[0] > >

Regression with QS-RF

2008-04-29 Thread shabda
I have a queryset with .extra call where I do something like this, self.get_query_set().extra ... tables=['news_topic as permission_table'] .. Pre qs-rf, the values in tables were not being escaped and so this was working, with qs-rf the value in tables is escaped, so my code fails.

sql_queries does not include all the sql statements

2008-04-29 Thread leopay
I use django.core.context_processors.debug to see the sql_queries in template. The raw sql of query Entry.objects.all()[0,1] does not in the sql_queries,but if I change the query like this Entry.objects.all()[0] and then the sql is in the sql_queries. why?

Re: class in models.py 'not defined' exception

2008-04-29 Thread g m
THANKYOU On 4/29/08, skunkwerk <[EMAIL PROTECTED]> wrote: > > > I've been struggling with this error for the past hour. > > Error while importing URLconf 'winebago.urls': name 'AuthPermission' > is not defined > Exception Location: /usr/lib/python2.5/site-packages/django/core/ > urlresolvers.py

Re: Session/Varibale and HttpResponseRedirect help please

2008-04-29 Thread g m
THANKYOU On 4/29/08, Brandon Taylor <[EMAIL PROTECTED]> wrote: > > > Hello everyone, > > I'm doing a redirect after a form to a "thank you" page, which I would > like to personalize with some of the data from the form. I've tried > setting a session as such: > > ### views.py code > > if

Re: Great article about web2py

2008-04-29 Thread g m
HAI On 4/29/08, simonbun <[EMAIL PROTECTED]> wrote: > > > It's beyond me why they would classify PHP as a web framework, and on > top of that, include CakePHP in the comparison as well... Other than > that, it's hardly an independant and unbiased review, coming from the > authors of web2py

Re: Great article about web2py

2008-04-29 Thread g m
HAI On 4/28/08, Milan Andric <[EMAIL PROTECTED]> wrote: > > > This is not Django specific but it is framework relevant. I thought > this was a great writeup of features for any framework. At least I am > one person who likes the features of this web2py framework. > >

Re: @@@HOME BASED BUSSINESS OPPERTUNITY@@@

2008-04-29 Thread g m
OK On 4/29/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > HiGuys & friends... iam shyni. > > > my website is interested here > > >see this site > > but not complesary ok . > > by friends &

Re: Template variable in filter?

2008-04-29 Thread g m
HAI On 4/29/08, Mike Chambers <[EMAIL PROTECTED]> wrote: > > > Is it possible to include a template variable inside a filter? > > Specifically, I want to have a global setting for the date format string: > > Something like: > > settings.py > -- > DATE_TIME_FORMAT = "M j, F \a\t P" > > >

Re: object.filter and accessing items

2008-04-29 Thread g m
HAI On 4/29/08, lars <[EMAIL PROTECTED]> wrote: > > > Hi all, > > I was playing around with object.filter when I noticed something funny > in my postgresql.log. > This is my query in the view: > >prev_and_current = > Article.objects.filter(id__lte=article_id).order_by('-id')[0:2] >

  1   2   >