Re: Tagging app

2006-05-26 Thread tekNico
> One of the things that motivated my design was the ability to store > creation dates - i.e. you can see exactly when you (or anyone else) > tagged a specific item with a specific bit of text. Ian's solution > goes further, and has various models, including a 'Bookmark' that > allows more inform

Re: How to build manipulator fields in dynamic way?

2006-05-26 Thread nkeric
hi Jaroslaw, I guess you're trying to implement multipage forms. here is the basic ideas: 1. set a 'step' flag in your view function for determine the current step the user is doing 2. use the form manipulator.fields.append(forms.) to dynamically create form's layout base on 'step' 3. while pr

How to build manipulator fields in dynamic way?

2006-05-26 Thread Jaroslaw Zabiello
How to create manipulator fields in more dynamic way? For example I have the form, where only one combobox field is displayed in the begining. After submit, another combobox will be displayed. But its content depends on previous choice... How to do it if I have to define all fields in the constr

Re: Will Complex URLs Slow Things Down?

2006-05-26 Thread Cameron Kenneth Knight
3. "(?i)pattern" matches "PATTERN" --~--~-~--~~~---~--~~ 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

Will Complex URLs Slow Things Down?

2006-05-26 Thread bradford
I'm trying to match emails in my urls.py by doing the following (which was taken from core.validators: (?P[A-Z0-9._%-][+A-Z0-9._%-]*@(?:[A-Z0-9-]+\.)+[A-Z]{2,4}) I have a few questions, though. 1. If the url pattern is too complex, will it slow anything down? 2. I'm assuming this matches the u

Re: Tagging app

2006-05-26 Thread Luke Plant
On Friday 26 May 2006 22:37, Jacob Kaplan-Moss wrote: > Looking forward to seeing your code, OK, you can now get it here: http://files.lukeplant.fastmail.fm/public/python/lp_tagging_app_0.1.zip or here, using bzr: bzr branch http://files.lukeplant.fastmail.fm/public/python/lukeplant_me_uk/

How to validate CheckboxField?

2006-05-26 Thread Jaroslaw Zabiello
I am using Django SVN. How to validate tthe form which consists of two CheckboxField fields. The rule is: the form is validated if ANY of those fields is checked. My manipulator is: from django import forms class TestManipulator(forms.Manipulator): def __init__(self): self.fields = (

Re: Q behavior with filter() and exclude()

2006-05-26 Thread Luke Plant
On Friday 26 May 2006 18:57, Doug Van Horn wrote: > I posted this here to: > http://www.djangoproject.com/documentation/db_api/ > > It seems that when you pass a Q() object into .filter() or > .exclude(), you end up with the same results. That is, the context > of the method, filter or exclude,

Re: SQL Unions with QuerySets?

2006-05-26 Thread Luke Plant
On Friday 26 May 2006 16:52, Jacob Kaplan-Moss wrote: > qs = name_startswith | name_contains > if len(input) >= 5: > qs = qs | description_startswith | description_contains > return qs[start:start+pagesize+1] > > This code does *one* query only. Yeah, I'm in love

Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)

2006-05-26 Thread [EMAIL PROTECTED]
Ok, I'm in something now... I look to the rails guys how install ruby on rails under IIS. I get this: http://made-of-stone.blogspot.com/2006/01/rails-on-iis-revisited.html And with http://urlrewriter.net/index.php/using/installation/windows-server-2003 I was able to get close... I install F

Re: Related tags ala del.icio.us

2006-05-26 Thread Jay Parlar
On 5/26/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > > I would do something like this: > > def related_tags(tag_name): > return > Tag.objects.filter(paper__tag__name__exact=tag_name).exclude(name__exact=tag_name).distinct() > > Filter expression reads like "all tags that linked to any

Re: use admin info in non-admin page

2006-05-26 Thread Eric Walstad
On Friday 26 May 2006 14:34, tsnyder wrote: > Hi all, > > I'd like to add a "last modified on" bit to one of the pages generated by > django. I have noticed that the admin app keeps track of all the changes > that are made. Is it possible to access that information and display it on > one of my

Django Google Summer of Code & Merquery

2006-05-26 Thread Rudolph
Hi, I just read this post about the Google Summer of Code: http://groups.google.com/group/django-ecommerce/browse_thread/thread/a6af863a3df0f128 I think that post should have been on the django users list. I saw that Google sponsors Merquery - Text Indexing & Search Engine Abstraction Layer for

Re: Tagging app

2006-05-26 Thread Jacob Kaplan-Moss
Hey Luke -- Looks great; I've personally been working on something similar but it looks like you'll beat me to it :) I've also been slowing adding generic relationship support, and I'd really like to get a look at your GenericForeignKey class; chances are it would simplify a good deal of code I'

use admin info in non-admin page

2006-05-26 Thread tsnyder
Hi all, I'd like to add a "last modified on" bit to one of the pages generated by django. I have noticed that the admin app keeps track of all the changes that are made. Is it possible to access that information and display it on one of my pages? Thanks, Tamara --~--~-~--~~--

Re: select multiple in many to many fields not usable for long lists

2006-05-26 Thread [EMAIL PROTECTED]
I actually have mine set in a way that you can put type=CheckBox or type=SelectBox as an argument in the model definition. Let me know if you need the code. Ivan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djan

Re: select multiple in many to many fields not usable for long lists

2006-05-26 Thread [EMAIL PROTECTED]
cpaciba bolshoe I will try this, of course it breaks the original code but I guess it's the only way --~--~-~--~~~---~--~~ 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: Member logins and member management

2006-05-26 Thread Rob Hudson
OK, so it sounds like the default would be to use the normal auth system. Are there any tips on doing things like member lists and such as part of the public website for logged in users. Can I just tie into the existing Users model? --~--~-~--~~~---~--~~ You rec

JOB: Come work for World Online!

2006-05-26 Thread Jacob Kaplan-Moss
Howdy folks -- We're hiring a designer/developer/project manager here at World Online (where Django was first developed). If you want to work for the best web development team anywhere in the world, you need to drop us a line. My co-worker Jeff has (many) more details at http:// www2.jef

Re: select multiple in many to many fields not usable for long lists

2006-05-26 Thread [EMAIL PROTECTED]
here is what you need to do, 1. in file django/db/models/fields/related.py => class ManyToManyField => function get_manipulator_field_objs replace return [curry(forms.SelectMultipleField, size=min(max(len(choices), 5), 15), choices=choices)] with return [curry(forms.CheckboxSelectMultipleField,

Re: I need instructions in best way to use django under IIS shared hosting (Python is installed)

2006-05-26 Thread [EMAIL PROTECTED]
Ok, fair points. I think that using python in a pure CGI setup is responsible in part of the lack of performance here. Because that, I'm looking how use fastcgi and/or wsgi here. Also, I don't see how the common setup of map .py extension for cgi can help with django (how can execure django/home

Re: Member logins and member management

2006-05-26 Thread Joseph Kocherhans
On 5/26/06, Rob Hudson <[EMAIL PROTECTED]> wrote: > > I've built a small website for a club with Django trunk so far and it's > working very well. I'm ready to start thinking about member management > -- user account creation, logins, member list and details pages, etc. > > IIRC, there was some m

Re: new to django, and have some questions

2006-05-26 Thread James Bennett
On 5/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > One question I've been trying to get answered before I start messing > around with the project is input validation. Specifically html. Django lets you hook a list of validator functions to any field in any model [1]; there's a set of buil

Re: Slicing [-1] on objects.all()

2006-05-26 Thread Luke Plant
On Friday 26 May 2006 03:31, Jan Claeys wrote: > > 2. Use an order_by method to set the reverse order and then get the > > first item, use a minus sign to denote DESC order: > > > >Foo.objects.order_by("-column")[0] > > > > The second option is FAR superior. The first solution is, IMO, > > to

Q behavior with filter() and exclude()

2006-05-26 Thread Doug Van Horn
I posted this here to: http://www.djangoproject.com/documentation/db_api/ It seems that when you pass a Q() object into .filter() or .exclude(), you end up with the same results. That is, the context of the method, filter or exclude, is ignored when it receives a Q object. For example: In [1]:

Re: SQL Unions with QuerySets?

2006-05-26 Thread Doug Van Horn
Thanks! I ended up seeing that after my original post. I knew I was missing something. Unfortunately that behavior does exactly what you would expect, one query, yielding mixed results. In other words, if I search for 'zo' my results would be ordered ['Bozo', 'Zorro']. I'd like for the result

Re: What server configuration to use

2006-05-26 Thread DavidA
I'm running my Django blog (http://davidavraamides.net) on Fedora under VMWare GSX 3.1. I have it configured for 256M (the physical box has 1GB). There is another Fedora guest running phpBB similarly configured. My typical load across all VMs is about 3%. It works great. Both are running Apache +

Re: Foreign keys in views

2006-05-26 Thread Jorge Gajon
Hi, I also found that behavior and what I did was to copy new_data['station'] to new_data['station_id'] when there were errors from "get_validation_errors()". Like this: def change_recording(request, recording_id): snip. if request.POST: new_data = request.POST.copy()

Re: Please help this newbie

2006-05-26 Thread Luke Plant
Salvage wrote: > I understand when you say I cant build those sites without having > programing skills but are there no modules that are already pre-built > like print this article, comment on this article, send by email, most > popular etc. That one can call with some django tags or something l

new to django, and have some questions

2006-05-26 Thread [EMAIL PROTECTED]
Greetings, (scroll down to CLIFFNOTES for the short version) Here at my company, we're using python and Zope, though several of the developers have been going on about how great Django is. I'm a systems administrator by profession, and a php/mysql developer who has been toying with dojo as hobby

Re: Please help this newbie

2006-05-26 Thread Salvage
Thanks Luke for your reply. I use a VPS so I guess mod_python can be installed cause I have root access. I am happy to hear that I can integrate the templates that i want. I understand when you say I cant build those sites without having programing skills but are there no modules that are already

Choice Listings in Admin based on a previous Choice

2006-05-26 Thread keukaman
I'm building an application that has the following structure: Category Subcategory I'm using 'choices' in the category object to display 14 categories. I'd like to base the Subcategory choices on the selection to the Category choice. Is there a simple way to do this? --~--~-~--~

Re: Member logins and member management

2006-05-26 Thread James Bennett
On 5/26/06, Rob Hudson <[EMAIL PROTECTED]> wrote: > IIRC, there was some mention of a new auth system. Is the auth system > documented here: The multi-auth branch, currently under development, is meant to make it easier to drop in something other than the Django auth database for authentication

Re: html input tag width corresponding to CharFields always fixed

2006-05-26 Thread John DeRosa
[EMAIL PROTECTED] wrote: > for a field defined as > spot =models.CharField(maxlength=250), > or band =models.CharField(maxlength=2), > > the input field in forms always has a fixed width. how to change that > ? Add length=. Like so: formfields.TextField(field_name="address_line1", maxlength

Member logins and member management

2006-05-26 Thread Rob Hudson
I've built a small website for a club with Django trunk so far and it's working very well. I'm ready to start thinking about member management -- user account creation, logins, member list and details pages, etc. IIRC, there was some mention of a new auth system. Is the auth system documented h

Re: SQLite concurrent access to database

2006-05-26 Thread Joseph Heck
Consider a django SQLite DB for each of the machines or have a central "collection" server running somewhere that the various individual agents can talk to - a REST, XML-RPC, or so API. -joe On 5/22/06, Kilian CAVALOTTI <[EMAIL PROTECTED]> wrote: On Sunday 21 May 2006 21:26, Graham King wrote:>   K

Re: SQL Unions with QuerySets?

2006-05-26 Thread Jacob Kaplan-Moss
On May 26, 2006, at 10:34 AM, Doug Van Horn wrote: > Are there plans to provide & and | operators > on QuerySet objects? It seems like that'd be a pretty big > undertaking, > but pretty frickin sweet if done well /me steps out of time machine... See http://www.djangoproject.com/documentation/

Re: SQL Unions with QuerySets?

2006-05-26 Thread Doug Van Horn
I wish I could edit my post. I see that & and | do work. I posted to early. I think you can pretty much disregard my post. I'm probably going to have to get clever in joining up my data for 'relevence'. Sorry for the disturbance. I'll be sure to google better next time. --~--~-~--~

Templates parameters

2006-05-26 Thread Kilian CAVALOTTI
Hi djangonauts, I'd like an advice on the following problem: I try to display a sorted list in a template, according to GET parameters. I'd like to use the 'dictsort' filter and the 'reversed' keyword, since I'd like to sort on values created in the view, which are not present in DB. Currentl

SQL Unions with QuerySets?

2006-05-26 Thread Doug Van Horn
I thought I'd post this as I'm not seeing anything obvious in the documentation (that is to say, I cannot /find/ anything, not that it /isn't/ there in an obvious place). I'm making a particular object searchable from my customer UI. I will have a field titled: 'Quick Search' which will search t

Re: Please help this newbie

2006-05-26 Thread Luke Plant
Salvage wrote: > I have never coded in python and even my knowledge of php is > limited(though I can install any script with php). But I see from the > news sites that are built with django, that it has all that i need for > newspaper/media sites. I want to know if I django can be installed in a

Re: Problems with stepping with the tutorial

2006-05-26 Thread Eric Walstad
On Friday 26 May 2006 07:26, kender wrote: > /usr/lib/python2.3/site-packages/django/bin/django-admin.py > startproject new $ python Python 2.3.5 (#2, Aug 30 2005, 15:50:26) [GCC 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)] on linux2 Type "help", "copyright", "credits" or "license" for more infor

Re: Problems with stepping with the tutorial

2006-05-26 Thread kender
And, I use python2.3 to run manage.py, the same my django libs are installed to: ls -l `which python` lrwxr-xr-x 1 root root 9 2006-02-17 03:17 /usr/bin/python -> python2.3 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Problems with stepping with the tutorial

2006-05-26 Thread kender
Hey, I just try the tutorial I found on http://www.djangoproject.com/documentation/tutorial1/. This is what I do (after installing django from svn): * create new project (/usr/lib/python2.3/site-packages/django/bin/django-admin.py startproject new). It creates a directory 'new', containing the _

select multiple in many to many fields not usable for long lists

2006-05-26 Thread [EMAIL PROTECTED]
hello, the default html tag in forms for many to many fields is a select multiple. but this is very hard to use for long lists of 200 + items where the selected items are few. also once you click once in the select field (by accident say) all multiple selection is cancelled so that all the inf

Please help this newbie

2006-05-26 Thread Salvage
I have never coded in python and even my knowledge of php is limited(though I can install any script with php). But I see from the news sites that are built with django, that it has all that i need for newspaper/media sites. I want to know if I django can be installed in a hostspace with just an i

html input tag width corresponding to CharFields always fixed

2006-05-26 Thread [EMAIL PROTECTED]
Hello, for a field defined as spot =models.CharField(maxlength=250), or band =models.CharField(maxlength=2), the input field in forms always has a fixed width. how to change that ? thanks --~--~-~--~~~---~--~~ You received this message because you are subs

Re: 404 and 500 erros

2006-05-26 Thread Ivan Sagalaev
Vladikio wrote: > I know errors 500 and 404 automatically use 404.html and 500.html ... >but is there a way to define a view that handles those errors ? > Yes. http://www.djangoproject.com/documentation/tutorial3/#write-a-404-page-not-found-view > For instance to send an email each time a 500

Re: Slicing [-1] on objects.all()

2006-05-26 Thread Luke Plant
Jay Parlar wrote: > Maybe a note should go into the db_api docs about -1 not working? I > did look at those docs before sending my original message, and didn't > see anything about that. I think it should throw an exception saying that negative indices are not supported (and even include a hint

Re: What server configuration to use

2006-05-26 Thread Graham King
PythonistL wrote: > I am going to setup a server to use it with Django. > I am going to use: Trustix Linux (http://www.trustix.org) > mod_Python with Apache > > Is 1GB memory enough? > > Regards, > L. > I'm running two Django sites (www.carriagereturn.org and www.mytimestream.com) on a vir

Re: views

2006-05-26 Thread DavidA
Mary, If I'm understanding you correctly you can simply use the 'values' method of the DB-API to query the value of the field for all rows: >>> from danet.blog.models import Post >>> Post.objects.values('slug') [{'slug': 'yet-another-django-blog'}, {'slug': 'fun-at-home-and-zoes-first-birth day'

Re: What server configuration to use

2006-05-26 Thread Milton Waddams
you'll probably want to detail expected traffic levels On 5/26/06, PythonistL <[EMAIL PROTECTED]> wrote: > > I am going to setup a server to use it with Django. > I am going to use: Trustix Linux (http://www.trustix.org) > mod_Python with Apache > > Is 1GB memory enough? --~--~-~--~~

What server configuration to use

2006-05-26 Thread PythonistL
I am going to setup a server to use it with Django. I am going to use: Trustix Linux (http://www.trustix.org) mod_Python with Apache Is 1GB memory enough? Regards, L. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Tagging app

2006-05-26 Thread Luke Plant
arthur debert wrote: > ps: how is the GenericForeignKey going to work? will it be imported > from the tagging app's package, or will it go into trunk? There is no guarantee that any of this stuff will go into trunk at all - the core django devs would obviously have to be for it first. But the

Re: Tagging app

2006-05-26 Thread Luke Plant
Ivan Sagalaev wrote: > The single target means that one tag can't be used for different models? Yep, a single 'Tag' object is associated with just one target and one creator. However, you can easily tag different models and objects with the same bit of text. > I have chosen a different approa

404 and 500 erros

2006-05-26 Thread Vladikio
Hi, I know errors 500 and 404 automatically use 404.html and 500.html ... but is there a way to define a view that handles those errors ? For instance to send an email each time a 500 error happens ? Best, -- Vladikio --~--~-~--~~~---~--~~ You received this m

Re: Tagging app

2006-05-26 Thread Jason Davies
Sounds great, I'd love to see this added. Regards, Jason --~--~-~--~~~---~--~~ 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