Re: Views, Filters, and Pain

2006-08-04 Thread Michael Hamilton
As suggested, you could enforce this at the view level. I would add that you could even wrap a generic view. For example, here some code wrapping the object_list generic and filtering the queryset by user ID: def time_by_user_list(request,

How would I do this with Djangol?

2006-08-04 Thread John M
I have a model of stock holdings(id, symbol) and a model of stock prices(id, symbol, price, date) How would I go about filtering for just the latest prices for all the stocks? Your help is appreciated. John --~--~-~--~~~---~--~~ You received this message

get_for_model building bad SQL?

2006-08-04 Thread Jay Klehr
Hello, Running Django's dev server on mysql 4.1.20 and trying to make use of the get_for_model method from the ContentTypes package to get the content type of a model (using the examples laid out in the GenericForeignKey documentation

Re: generic views object_list & custom template tags

2006-08-04 Thread Malcolm Tredinnick
On Fri, 2006-08-04 at 21:50 -0700, bernie2004 wrote: > when using a generic views object_list, > i would like to know if there is a faster way to get all > the extra variables inside a custom template tag: > > {% navigation pages page has_previous has_next %} > > and > > @register.simple_tag >

generic views object_list & custom template tags

2006-08-04 Thread bernie2004
when using a generic views object_list, i would like to know if there is a faster way to get all the extra variables inside a custom template tag: {% navigation pages page has_previous has_next %} and @register.simple_tag def navigation( pages, page, has_previous, has_next ): ... create

Re: How to user django upload file ?

2006-08-04 Thread limodou
On 8/5/06, Zheng JinYuan <[EMAIL PROTECTED]> wrote: > > Can not find document in django site about how to upload file ? Any tips ? > Please django FAQ document. -- I like python! My Blog: http://www.donews.net/limodou My Django Site: http://www.djangocn.org NewEdit Maillist:

How to user django upload file ?

2006-08-04 Thread Zheng JinYuan
Can not find document in django site about how to upload file ? Any tips ? --~--~-~--~~~---~--~~ 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 model -> DOT converter

2006-08-04 Thread gjiro
Very nice! Curious to see where this is heading... django.contrib.viz?? Gjiro --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: help with fastcgi failure

2006-08-04 Thread Tamara D. Snyder
On Aug 4, 2006, at 7:25 PM, Malcolm Tredinnick wrote: > > On Fri, 2006-08-04 at 14:45 -0500, Tamara D. Snyder wrote: >> Hi All, >> >> I'm getting this error message (in my apache error log) when I try to >> use fastcgi: >> >> (13)Permission denied: FastCGI: failed to connect to server "/ >>

Re: Django model -> DOT converter

2006-08-04 Thread Jeremy Dunck
On 8/4/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote: > I have an initial, rather crude implementation of the Django model -> > DOT (the Graphviz file format) converter. Related:

Re: Django model -> DOT converter

2006-08-04 Thread Russell Keith-Magee
On 8/5/06, Antonio Cavedoni <[EMAIL PROTECTED] > wrote: Hello everyone,I have an initial, rather crude implementation of the Django model ->DOT (the Graphviz file format) converter.Hi AntonioNifty! If I may make some comments (and this is intended as constructive criticism, not an attempt to

Re: Django model -> DOT converter

2006-08-04 Thread Malcolm Tredinnick
On Sat, 2006-08-05 at 02:17 +0200, Antonio Cavedoni wrote: > Hello everyone, > > I have an initial, rather crude implementation of the Django model -> > DOT (the Graphviz file format) converter. > > Some generated .dot files: > > http://cavedoni.com/2006/08/camera.dot >

Re: help with fastcgi failure

2006-08-04 Thread Malcolm Tredinnick
On Fri, 2006-08-04 at 14:45 -0500, Tamara D. Snyder wrote: > Hi All, > > I'm getting this error message (in my apache error log) when I try to > use fastcgi: > > (13)Permission denied: FastCGI: failed to connect to server "/Library/ > WebServer/Documents/django.fcgi": connect() failed > > I

Django model -> DOT converter

2006-08-04 Thread Antonio Cavedoni
Hello everyone, I have an initial, rather crude implementation of the Django model -> DOT (the Graphviz file format) converter. Some generated .dot files: http://cavedoni.com/2006/08/camera.dot http://cavedoni.com/2006/08/mincer.dot The resulting Graphviz image:

Re: Kid templates ValueError: too many values to unpack

2006-08-04 Thread Don Arbow
On Aug 4, 2006, at 4:56 AM, bernie2004 wrote: > BTW, by default TEMPLATE_DEBUG is set to DEBUG and not to False like > specified at > http://www.djangoproject.com/documentation/settings/#template-debug In django/conf/global_settings.py it is set to False. In your project's settings file

show many2many data as comma-separated-text. fast/optimal solution?

2006-08-04 Thread gabor
hi, i have a problem with a certain web-application, and wonder if someone has an idea how to solve it the best way imagine the following situation.. class Role(Model): title = CharField(maxlength=100) class User(Model): name = CharField(maxlength=100) roles =

Re: Off Topic: Mac software for database design?

2006-08-04 Thread Ian Holsman
On 05/08/2006, at 3:07 AM, John Melesky wrote: If you could point to the specific screencasts, that would makeidentifying the tool easier.At a guess, though, CocoaMySQL is a likely candidate. Even if it's notwhat they're using, it's useful for the things you

Re: Off Topic: Mac software for database design?

2006-08-04 Thread Dan Shafer
I use YourSQL - http://yoursql.ludit.it/On 8/4/06, Rob Hudson < [EMAIL PROTECTED]> wrote:I've seen some screencasts of various web frameworks (rails, turbogears) where the user has a nice interface to a mysql admin toolfor creating tables, running queries, etc on a Mac.  I can't find areference

help with fastcgi failure

2006-08-04 Thread Tamara D. Snyder
Hi All, I'm getting this error message (in my apache error log) when I try to use fastcgi: (13)Permission denied: FastCGI: failed to connect to server "/Library/ WebServer/Documents/django.fcgi": connect() failed I am using apache 1.3. I've got the latest flup installed. I am using the

Re: Off Topic: Mac software for database design?

2006-08-04 Thread Glenn Tenney
On 4 Aug 2006, at 19:35, Joseph Heck wrote: > I believe it was a little custom script that generated a schema > model in OmniGraffle from the ruby code. Not 100% sure, but I > recall seeing one of the local ruby guys using it. Back in April I posted here: Subject: pictorial representation

Re: Creating User Accounts

2006-08-04 Thread medhat
So, is there a way to not have to repeat the fields (from the example) "username" and "password" in the customer model? I wanted to achive something similar to this, but I don't want to duplicate the fields (look at my related question in

Re: Off Topic: Mac software for database design?

2006-08-04 Thread Antonio Cavedoni
On 4 Aug 2006, at 19:35, Joseph Heck wrote: > I believe it was a little custom script that generated a schema > model in OmniGraffle from the ruby code. Not 100% sure, but I > recall seeing one of the local ruby guys using it. It’s probably off-topic and orthogonal to the MySQL modeling tool

Re: Distribute Django program to run on a local computer

2006-08-04 Thread Rob Hudson
A little more info this morning... Bob Ippolito posted a followup with some guidance. It makes it much simpler but I'm still seeing the same errors. Here's the latest py2app-setup.py: #!/usr/bin/env python from setuptools import setup setup( app=["run.py"],

File upload and custom manipulator

2006-08-04 Thread didier Belot
Hello, I have a model with a FileField. When using the MyModel.AddManipulator() in the view, everything works as expected. But I need a custom manipulator. I've already made some custom manipulators that works pretty well, so I'm sure I'm not too wrong here. The one that don"t works is the one

Re: Views, Filters, and Pain

2006-08-04 Thread Waylan Limberg
On 8/4/06, Dave <[EMAIL PROTECTED]> wrote: > [snip] > How can I set up the User permissions such that the logged in User can > only access Orders they've created? > This feature is not yet available, although it is being worked on [1]. As a workaround, I believe it has generally been suggested

Re: Problem with serializers

2006-08-04 Thread Seth Buntin
Thanks Jacob. I copied that text off of a webpage and the quotes messed me up. I guess I should have realized that when TextMate didn't color them correctly. Seth Jacob Kaplan-Moss wrote: > On Aug 4, 2006, at 12:05 PM, Seth Buntin wrote: > > DeprecationWarning: Non-ASCII character '\xe2' in

Re: Off Topic: Mac software for database design?

2006-08-04 Thread Jacob Kaplan-Moss
On Aug 4, 2006, at 11:40 AM, Rob Hudson wrote: > I've seen some screencasts of various web frameworks (rails, > turbogears) where the user has a nice interface to a mysql admin tool > for creating tables, running queries, etc on a Mac. I can't find a > reference anywhere to what this might be.

Re: Views, Filters, and Pain

2006-08-04 Thread Jacob Kaplan-Moss
On Aug 4, 2006, at 12:20 PM, Dave wrote: > Now, I know I'm probably not making proper use of the User object, so > any suggestions in that regard would be helpful, as well as tied to > the > main problem I'm having. Yeah, what you want is ``request.user`` -- that's the user who's loading

Re: Creating User Accounts

2006-08-04 Thread Dave
Thanks for the tip. I've added conditions to ensure this is intended behavior, based on your suggestion of checking self.id. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Off Topic: Mac software for database design?

2006-08-04 Thread John Melesky
Rob Hudson wrote: > I've seen some screencasts of various web frameworks (rails, > turbogears) where the user has a nice interface to a mysql admin tool > for creating tables, running queries, etc on a Mac. I can't find a > reference anywhere to what this might be. I downloaded and tried MySQL

Re: Problem with serializers

2006-08-04 Thread Seth Buntin
I just realized that I am also getting an error in my console: /Users/sethbuntin/django_src/django/core/urlresolvers.py:118: DeprecationWarning: Non-ASCII character '\xe2' in file /Users/sethbuntin/django_projects/kate/tick/ajax_views.py on line 6, but no encoding declared; see

Off Topic: Mac software for database design?

2006-08-04 Thread Rob Hudson
I've seen some screencasts of various web frameworks (rails, turbogears) where the user has a nice interface to a mysql admin tool for creating tables, running queries, etc on a Mac. I can't find a reference anywhere to what this might be. I downloaded and tried MySQL Workbench but it was very

Re: Off Topic: Mac software for database design?

2006-08-04 Thread [EMAIL PROTECTED]
Rob Hudson wrote: > I've seen some screencasts of various web frameworks (rails, > turbogears) where the user has a nice interface to a mysql admin tool > for creating tables, running queries, etc on a Mac. I can't find a > reference anywhere to what this might be. I downloaded and tried MySQL

Problem with serializers

2006-08-04 Thread Seth Buntin
Here is my setup ajax_views.py: from django.core import serializers def subfocus(request): data = serializers.serialize("xml", SubFocus.objects.all()) return HttpResponse(data, mimetype="text/javascript") urls.py: (r'^tick/ajax/subfocus', 'kate.tick.ajax_views.subfocus'),

Non-database fields on the admin side?

2006-08-04 Thread medhat
Hi, Is there an easy way to create filds on the admin side that don't have database columns behind them? I am thinking of something whose value will drive some functionality in the save() method in the model, but does not need to be saved. If this does not exist, how about the following feature

Re: Ajax and Django example application

2006-08-04 Thread Darryl Caldwell
That is awesome. Thanks for putting this together.-dOn 8/3/06, Istvan Albert <[EMAIL PROTECTED] > wrote:Hello All,For those interested here is an AJAX based demo application using django, developed with two different _javascript_ libraries: Prototypeand with

Re: Off Topic: Why does IE hate me?

2006-08-04 Thread Jay Parlar
On 8/4/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > On 04-Aug-06, at 6:40 PM, Jay Parlar wrote: > > > > > So what part exactly was wrong with my original design that IE didn't > > like? Was it that I only floated the sidebar, and not the main content > > area? Does IE always reject that

Re: Novice problem with cookies

2006-08-04 Thread Waylan Limberg
On 8/3/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi Gabriel. > > All the clients are windows machines and I don't know how to set the > equivalent of /etc/hosts in a Windows box. > Just search for a file named "hosts". On my XP box it is located at

Re: Off Topic: Why does IE hate me?

2006-08-04 Thread Kenneth Gonsalves
On 04-Aug-06, at 6:40 PM, Jay Parlar wrote: > > So what part exactly was wrong with my original design that IE didn't > like? Was it that I only floated the sidebar, and not the main content > area? Does IE always reject that kind of design? this is becoming really OT - there are realms of

Re: Off Topic: Why does IE hate me?

2006-08-04 Thread Jay Parlar
On 8/3/06, Bryan Chow <[EMAIL PROTECTED]> wrote: > > This renders properly in Internet Explorer 6, mostly. You might also > place a or equivalent just before the > footer to be doubly sure that it doesn't get mixed up with the floating > blocks. Hope this helps! > Cool, thanks a lot! So what

Code to spawn a new, independent process

2006-08-04 Thread Corey
Hey everyone, I've seen references and questions in previous posts about how to spawn a process to do some hefty processing. I had that need (processing of 1.6 million records at a time). I created this code with help from other places on the net and it seems to work pretty well. I'm putting it

Re: Rejoice! No more editing hashes when creating users

2006-08-04 Thread Enrico
Hi all, I like the idea of a "Change password" view. It doesn't feel like changing the password by mistake. But wouldn't hurt to use the "not-empty" approach, what matters is to have this feature. Regards. Enrico --~--~-~--~~~---~--~~ You received this message

Many2Many to same table w. intermediary table - admin problems

2006-08-04 Thread mathiasp
Can admin edit_inline a many2many relation to the same table via an intermediary? How? Example: party <- relation -> party, editing party & using edit_inlne for relation, django 0.95 admin bombs. Details: Using this abridged model: - from django.db import models class

Re: Really weird - Admin not working with Apache/modpython

2006-08-04 Thread Hale
>From what you said about sqlite3 not working - I took the plunge into PostgreSQL. And it is working now. No media. But, I'll figure that out. Thanks for the tips on curl and sqlite3. -mhale --~--~-~--~~~---~--~~ You received this message because you are

problem with the structure of our site (sharing user-data)

2006-08-04 Thread patrickk
we´d really appreciate some help with this problem: 1. we´re having several sites sharing basic userdata (first name, last name, username ...) - so every user can login to all of the sites using the same login/password. 2. every site has a specific userprofile (e.g. newsletter for that

Re: Ajax and Django example application

2006-08-04 Thread Corey Oordt
Istvan, Thanks for the code. I can't wait to dive into it. Corey On Aug 4, 2006, at 12:12 AM, Istvan Albert wrote: > > Hello All, > > For those interested here is an AJAX based demo application using > django, developed with two different javascript libraries: Prototype > and with MochiKit >

Re: Creating User Accounts

2006-08-04 Thread Derek Hoy
On 8/4/06, Dave <[EMAIL PROTECTED]> wrote: > > > I think your best bet is to override the save() method of your model. > > This worked perfectly. It didn't even occur to me that I could do that. > Thanks so much for the suggestion. Just be careful, because the save() will be called if you update

Re: Many to many and save() overiding method. Entry / Tags

2006-08-04 Thread coulix
answer is there http://groups.google.com/group/django-users/browse_thread/thread/99680b69d2d4799c/07093d3695163269?lnk=gst=many+to+many+save=3#07093d3695163269 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

software thuriam

2006-08-04 Thread [EMAIL PROTECTED]
Thuriam Software Services >From solution design and offshore software development to outsourcing application support and improvement, Thuriam's offers a compelling alternative to minimize software development costs, and improve the quality of your software solutions and compress software

Many to many and save() overiding method. Entry / Tags

2006-08-04 Thread coulix
Hello everyone, i am creating a django powered blog. Here is my simplified model class Entry(models.Model): [...] tags = models.ManyToManyField(Tag) def save(self): super(Entry, self).save() print self.tags.all() class Tag(models.Model):

Re: Declare a variable in a template

2006-08-04 Thread JHeasly
Don Arbow wrote: > > list_1 = Shows.objects.filter(upcoming=True) > list_2 = Shows.objects.filter(past=True) > > return render_to_response('template.html' > {'upcoming_shows':list_1, 'past_shows':list_2}) > > Don Don, Thanks for the clean, clear example! It helped me see a way out in a

Public Domain ( was Re: Full Text Search w/ MySQL)

2006-08-04 Thread Ian Holsman
On 03/08/2006, at 10:42 PM, Andrew Durdin wrote: the code in the paper is released intothe public domain, so there's nothing stopping any interested personfrom taking it and developing it into something more suited for generalsearching.AndrewThis isn't directed at you, or your paper Andrew.I

Re: Rejoice! No more editing hashes when creating users

2006-08-04 Thread [EMAIL PROTECTED]
One word: Amen. --~--~-~--~~~---~--~~ 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 [EMAIL

Re: problems with runfcgi

2006-08-04 Thread Gacha
I was thinking that runfscgi is smth like runserver :D now I understand my mistake. Thanx :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Rejoice! No more editing hashes when creating users

2006-08-04 Thread Malcolm Tredinnick
On Thu, 2006-08-03 at 23:42 -0500, Adrian Holovaty wrote: > On 8/3/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > The traditional approach is that they are password entry boxes that are > > empty and you only pay attention in the form processing if they contain > > something (in which case

Re: Rejoice! No more editing hashes when creating users

2006-08-04 Thread Ian Holsman
On 04/08/2006, at 3:37 PM, Malcolm Tredinnick wrote:On Fri, 2006-08-04 at 15:13 +1000, Ian Holsman wrote:[...] I like the idea of a change password view, could I twist your arm a bit and make it a  'generate random passwordand email it to the user view' instead of 'set password' ?and possibly have