Re: group traffic

2006-08-29 Thread Kenneth Gonsalves
On 30-Aug-06, at 10:40 AM, Frank Stüss wrote: > since this list is getting bigger day by day.. > Eam.. what about splitting this group up in say two or three lists? > > django.newbies (like me :-) > django.apps > django.views the only split I can see useful is to make a new list called

Re: group traffic

2006-08-29 Thread limodou
On 8/30/06, Frank Stüss <[EMAIL PROTECTED]> wrote: > > Hi folks, > since this list is getting bigger day by day.. > Eam.. what about splitting this group up in say two or three lists? > > django.newbies (like me :-) > django.apps > django.views > > Looking for better names/categories. > > As all

group traffic

2006-08-29 Thread Frank Stüss
Hi folks, since this list is getting bigger day by day.. Eam.. what about splitting this group up in say two or three lists? django.newbies (like me :-) django.apps django.views Looking for better names/categories. As all of you answerers are doing a great job helping, may be this would help

Re: viewing generated SQL without running the query

2006-08-29 Thread Gary Wilson
Malcolm Tredinnick wrote: > On Tue, 2006-08-29 at 03:53 +, Gary Wilson wrote: > > I see that there is a _get_sql_clause() method, but is there a function > > that will return the constructed query string? > > Deja vu. I tried to implement something like this a little while back. > The thing

Re: verbose_name option not working...

2006-08-29 Thread mediumgrade
Great! Thanks! --~--~-~--~~~---~--~~ 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: advice on debugging ajax apps in django (possibly OT)

2006-08-29 Thread clee
Thank you. I've found django/test/client.py in svn. --~--~-~--~~~---~--~~ 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

Re: Multiple File Upload???

2006-08-29 Thread Russell Keith-Magee
On 8/29/06, cerealito <[EMAIL PROTECTED] > wrote: Is there anyway that i can catch those and pass them to djangoManipulator'sdo_html2python() and save() methods?Your request appears to have multiple files in it, which suggests that your template is working fine. As far as I can see, all that

models wierdness

2006-08-29 Thread Rob Hudson
I've got an app called page I've been working on. Pages can contain text, graphics, or media and each have their own table which refer back to page (ForeignKey). When I set up this model, only page_media has the inlined SQL for the foreign key ("REFERENCES"), where as the others do it with an

Re: Directional Many-to-many

2006-08-29 Thread Russell Keith-Magee
On 8/30/06, Siah <[EMAIL PROTECTED]> wrote: Somehow though, if I go to ChildObj and ask for its children, I willget the FatherObj as well. What am I doing wrong?By default, m2m fields are symmetrical - what you put in at one end, you can see from the other. If you want to make m2m fields

Re: mod_python apache problems...

2006-08-29 Thread mediumgrade
Thanks, Ricardo. That was it :-) --~--~-~--~~~---~--~~ 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

Re: Re: advice on debugging ajax apps in django (possibly OT)

2006-08-29 Thread James Bennett
On 8/29/06, clee <[EMAIL PROTECTED]> wrote: > Thank you, I just downloaded firebug and it looks like a big step > forward. You might also want to look at the new testing support that went into Django recently -- we've always had support for using doctest, but unittest has just been added and

Re: AJAXWidgetComboBox in admin?

2006-08-29 Thread Matthew Flanagan
Hi, I have a large revamp of this code that i've been meaning to upload to the wiki for a while. I'll try to do it today or tomorrow. The new code uses the newer dojo Select widget (which I wrote incidentally :). I've also written a templatetag to make it easier to use the widget in your

Re: python sets and objects returned in queries

2006-08-29 Thread Gary Wilson
Ivan Sagalaev wrote: > Gary Wilson wrote: > > Why can't objects be used in python sets? Example: > > > [u.username for u in User.objects.all()] > > ['bar', 'foo', 'foobar'] > a = User.objects.filter(username__contains='foo') > b = User.objects.filter(username__contains='bar') >

Re: ManyToManyField not populated in form

2006-08-29 Thread [EMAIL PROTECTED]
I have the same problem :| --~--~-~--~~~---~--~~ 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: file upload = simple DoS possibility

2006-08-29 Thread Adrian Holovaty
On 8/29/06, Michael Samoylov <[EMAIL PROTECTED]> wrote: > Is the any way to control upload process (max file size, etc.)? Great > framework but file upload can couse DoS. > [...] > User can try to upload any size file and waste all server's cpu and > memory and you can imagine situation with

Re: advice on debugging ajax apps in django (possibly OT)

2006-08-29 Thread clee
Thank you, I just downloaded firebug and it looks like a big step forward. -chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

ManyToManyField not populated in form

2006-08-29 Thread cyberco
In a form for changing a model instance all fields get correctly filled with existing values except the ManyToManyField form fields (which renders as a choice list in a form). It shows the correct list of options, but none of the options is selected, even though the instance of the model should

Re: advice on debugging ajax apps in django (possibly OT)

2006-08-29 Thread [EMAIL PROTECTED]
Firebug http://www.joehewitt.com/software/firebug/ has helped me out a ton. In it's console firebug shows every ajax request, and if there is an http 500 error you can see the entire response. So you don't see the nicely formated django error page, but you see the html source of the nicely

advice on debugging ajax apps in django (possibly OT)

2006-08-29 Thread clee
Hello, I'm a long-time python user who is new to django, javascript, and Mochikit. I'm very pleased with django so far but I'm having a bit of a quandry as I start to mix in javascript and Mochikit. One thing I like about django is that if I make an error in my python code it send me that great

Re: syncing with external BB database --- what would you do?

2006-08-29 Thread [EMAIL PROTECTED]
Register Django user in punBB: ## - open register.php - find: // Add user - after add: $salt = substr(md5(base64_encode(time())), 0, 5); $db->query('INSERT INTO auth_user (username, email, password, is_active, date_joined) VALUES

Re: many to many problems

2006-08-29 Thread [EMAIL PROTECTED]
Somehow, I got this working. Nevermind... I think I was trying too hard. I went back to the Django docs on manipulators and copied the sample manipulator code (for your view) and presto - it works. --~--~-~--~~~---~--~~ You received this message because you are

Re: Finding entries with multiple tags

2006-08-29 Thread [EMAIL PROTECTED]
> I am really close to finishing the rewrite work necessary to make this > easy. It's a bug that it doesn't work already. You should be able to > filter using > > Post.objects.filter(tag = 'django').filter(tag = 'python') Yes! This is what I tried before but noticed it did not work (the

many to many problems

2006-08-29 Thread [EMAIL PROTECTED]
I would love to write up a howto for UPDATING a manyTOMany field, but I cannot figure out how it is done. I would love to get the concept here: I have a db model called "Projects" with a ManyToMany field called "Team" when updating the Project I want to also update the Team(s) In the

Re: Finding entries with multiple tags

2006-08-29 Thread Chris Kelly
agreed with Malcom on this one:you should be splitting the url string at the top (removing the last blank entry) to get the array of tags.from there you can just iterate over the tags array until you hit the end in a for loop. then in that for loop, just call a filter on the queryset, using the

Re: viewing generated SQL without running the query

2006-08-29 Thread Malcolm Tredinnick
On Tue, 2006-08-29 at 03:53 +, Gary Wilson wrote: > I see that there is a _get_sql_clause() method, but is there a function > that will return the constructed query string? Deja vu. I tried to implement something like this a little while back. The thing that is hard about getting it to work

Re: Finding entries with multiple tags

2006-08-29 Thread Malcolm Tredinnick
On Tue, 2006-08-29 at 14:05 +, [EMAIL PROTECTED] wrote: > > > Yes, you are right. I was not thinking straight. > > Not a problem. Help is always appreciated! > > > > Anyone know what the > > > best method for performing this in SQL would be? Select all posts for > > > each tag and use

Re: view.py as class not just methods

2006-08-29 Thread Malcolm Tredinnick
On Sat, 2006-08-26 at 10:34 +, skink wrote: > Hi, > > I'm relatively new to django and maybe my question is stupid, but... > > Is it possible to map in urls.py some url not to function in views.py > (which has first argument with HttpRequest) but to some class methot? > In that case each

Re: included templates to load own objects

2006-08-29 Thread Malcolm Tredinnick
Hi Mae, On Mon, 2006-08-28 at 14:53 +, Mae wrote: > I want included-including templates to be able to act independently > from each other. I want the including template to not have to know > anything about the particulars of the template it's including. > > I want to be able to write

Re: How to handle person to person relationships

2006-08-29 Thread Jeremy Dunck
On 8/29/06, Mir Nazim <[EMAIL PROTECTED]> wrote: > > I have already gone through that. but problem is that I need to add > some attributes to relationships like > > he is my best friend > i have not met him > > something like orkut. If you're going to attach view and template behavior based on

Re: Finding entries with multiple tags

2006-08-29 Thread DavidA
[EMAIL PROTECTED] wrote: > That works easily when you're just looking up one Tag. What I'm trying > to figure out is the best way to search for multiple tags and return > only the Posts common to all of those tags: Joe, My bad. I misunderstood your question. I think the only way to do this (in

Re: Creating new apps

2006-08-29 Thread Guillermo Fernandez Castellanos
Hi, > I have been on your SVN, but how do i tell Django that each little app has > its own urls.py? is putting it in the directory enough to automatically let > django know that each little app has its own urls.py? Afterwards you can define a urls.py for each project. Check for those urls.py in:

Re: Directional Many-to-many

2006-08-29 Thread Corey Oordt
Take a look at: http://www.djangoproject.com/documentation/models/m2m_and_m2o/CoreyOn Aug 29, 2006, at 12:15 PM, Siah wrote:Hello,Given this model:class Person(models.Model):    name = models.CharField(maxlength=200)    children = models.ManyToManyField('self')I can do:   

Re: How to handle person to person relationships

2006-08-29 Thread Mir Nazim
I have already gone through that. but problem is that I need to add some attributes to relationships like he is my best friend i have not met him something like orkut. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Creating new apps

2006-08-29 Thread Corey Oordt
Charles,I've always seen a Project as a Site. Although there are situations that that may not be true, for most of us, it probably is.I've seen an App as a grouping of functionality. Examples would be Blog, Forums, News, Gallery, etc.Good design practices should keep as much internal within each

Re: Creating new apps

2006-08-29 Thread charles sibbald
Hi Guillermo,Thanks for the help.I have been on your SVN, but how do i tell Django that each little app has its own urls.py? is putting it in the directory enough to automatically let django know that each little app has its own urls.py?Also for authenticating users, do i use django.contrib.auth,

Directional Many-to-many

2006-08-29 Thread Siah
Hello, Given this model: class Person(models.Model): name = models.CharField(maxlength=200) children = models.ManyToManyField('self') I can do: FatherObj.children.add(ChildObj) Somehow though, if I go to ChildObj and ask for its children, I will get the FatherObj as well. What am

Re: Recovering from a server problem

2006-08-29 Thread keukaman
Kenneth Gonsalves wrote: > On 29-Aug-06, at 6:58 AM, keukaman wrote: > > > Is there a way simple way to reestablish all of the relationships > > between apps, etc, after a server outage? > > is it possible that your .pyc files have got out of sync? Maybe you > could rm -rf the whole django tree

Re: off-topic: why does it take so long for emails ...

2006-08-29 Thread Don Arbow
On Aug 29, 2006, at 3:36 AM, va:patrick.kranzlmueller wrote: > > I see. any chance to get me off the spam-list? Adrian didn't say YOU were on a spam list, but that some MESSAGES may have been flagged by Google as potential spam. Not much you can do about the time lag. There are times I've

Re: AJAXWidgetComboBox in admin?

2006-08-29 Thread Chris Long
Nothing right now. Currently the admin interface doesn't use any AJAX, but it has been under discussion for a while to implement it. If you did wish to use it, you could probably modify the admin interface fairly easily to implement it (w/o changing the actual django.contrib.admin) package.

Re: Creating new apps

2006-08-29 Thread Guillermo Fernandez Castellanos
Hi, I did my own homepage (www.haruki.eu) where I have several "applications" done together. As I understood after asking in the list and looking at several project svn trees, the 2nd way seems to be prefered for a sizable application. It allows modularity and reusability. What I do is have a

Re: How to handle person to person relationships

2006-08-29 Thread Reinhard Knobelspies
http://www.djangoproject.com/documentation/models/m2m_recursive/ --~--~-~--~~~---~--~~ 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

How to handle person to person relationships

2006-08-29 Thread Mir Nazim
How code the relationship like "a person has many friends" code so far. class Person(models.Model): full_name = models.CharField(maxlength=100) nick_name = models.CharField(maxlength=20) about = models.TextField(blank=True) sex = models.CharField(maxlength=1, choices=SEXES)

file upload = simple DoS possibility

2006-08-29 Thread Michael Samoylov
Hi all. Is the any way to control upload process (max file size, etc.)? Great framework but file upload can couse DoS. For example: class Account(models.Model): user = models.OneToOneField(User) birthday = models.DateField(blank=True, null=True) icq =

AJAXWidgetComboBox in admin?

2006-08-29 Thread zenx
Just wanted to know if there are any implementations of the AJAXWidgetComboBox for the ForeignKey relationship inputs in the admin forms (instead of using raw_id_admin=True) http://code.djangoproject.com/wiki/AJAXWidgetComboBox Thank you! --~--~-~--~~~---~--~~

Re: python syntax errors

2006-08-29 Thread Kenneth Gonsalves
On 29-Aug-06, at 6:46 PM, Jay Parlar wrote: >> in idle). Even if it does compile, if some import errors are there, >> again you will not get the error - just the script headers thing > > There are lots and lots of potential runtime errors that wouldn't be > caught. Just running your stuff in

Re: Finding entries with multiple tags

2006-08-29 Thread DavidA
Gary Wilson wrote: > [EMAIL PROTECTED] wrote: > > > def tags(request, url): > > > # Don't need the last item in the list since it will > > > # always be an empty string since Django will append > > > # a slash character to the end of URLs by default. > > > tags =

Re: Multiple File Upload???

2006-08-29 Thread Russell Keith-Magee
On 8/29/06, cerealito <[EMAIL PROTECTED]> wrote: Isn't there a way to upload as many files as i want to (much like gmailhandles attatchments)and then associating them to the descriptions?Try this:class Description(models.Model):     text = models.CharField(maxlength=100)    class Admin:   

Re: python syntax errors

2006-08-29 Thread Jay Parlar
On 8/29/06, Ilia Kantor <[EMAIL PROTECTED]> wrote: > And people here tell me set admin email.. So I will get emails with errors > WHILE I DEVELOP on my home box! > *rofl* > > Maybe django redirects stdout/stderr somewhere so the errors get consumed ? It wouldn't be Django redirecting, it would

Re: python syntax errors

2006-08-29 Thread Jay Parlar
On 8/28/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > if there are syntax errors, the file will not compile and the only > error apache will give is incomplete script headers or something like > that. So before running with apache, make sure the file compiles (F5 > in idle). Even if it does

Re: Limit view to group members: what function for the @user_passes_test decorator?

2006-08-29 Thread cyberco
Great! Thanks for the excellent reply. --~--~-~--~~~---~--~~ 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

Re: viewing generated SQL without running the query

2006-08-29 Thread DavidA
Gary Wilson wrote: > I see that there is a _get_sql_clause() method, but is there a function > that will return the constructed query string? You can just do the same construction that's done in django/db/models/query.py: >>> from danet.blog.models import Post, Tag >>> qs =

Re: off-topic: why does it take so long for emails ...

2006-08-29 Thread va:patrick.kranzlmueller
I see. any chance to get me off the spam-list? kenneth: I didn´t check that before. yesterday it was on the web interface immediately and I was waiting for the e-mail for about half an hour. thanks, patrick Am 29.08.2006 um 05:14 schrieb Adrian Holovaty: > > On 8/28/06, patrickk <[EMAIL

Re: Additional Functionality to Admin Interface

2006-08-29 Thread chrisdo
Thanks, I'll try it at home, I don't have internet access for subversion here. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Additional Functionality to Admin Interface

2006-08-29 Thread Kenneth Gonsalves
On 29-Aug-06, at 2:55 PM, chrisdo wrote: > I'm quite new to Django, and I couldn't find anything in the > documentation. > I want to develop a gallery system in Django, so if I add a new > picture, I'm uploading it (the field is a ImageField). you could use nesh's ImageWithThumbnail field:

Additional Functionality to Admin Interface

2006-08-29 Thread chrisdo
Hi there I'm quite new to Django, and I couldn't find anything in the documentation. I want to develop a gallery system in Django, so if I add a new picture, I'm uploading it (the field is a ImageField). But I don't want to set the height and witdh, I just want to upload the image file (in the

edit_inline fails

2006-08-29 Thread Ilia Kantor
I have an object + edit_inline=stacked I edit inline object and press save... But nothing changes.. How can I debug what's up ? No errors, just doesn't work (trunk) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

threadlocals with limit_choices_to in models

2006-08-29 Thread ibson
Hi, I'm using the threadlocals hack (http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser) in my model to filter machines by group. But it's not stable at all. And most of the time the filter return nothing because the usergroup is empty. Here's a piece of my code : usergroup =

Re: Multiple File Upload???

2006-08-29 Thread cerealito
Ok, the problem then is, that my model has just a single entity called picture. What I'm trying to do is asociate multiple image files to multiple `descriptions'. I'm doing this by a intermedaite table: #Images to be used in descriptions class Image(models.Model): altText =

Problem accessing users and groups in Admin

2006-08-29 Thread Luis P. Mendes
Hi, I posted this on Saturday, but since I had no replies, I'm reposting it. What should I look for to solve this problem: When I access http://127.0.0.1:8000/admin/ I get Groups Users in the Autho Fieldset. If I click on Users http://127.0.0.1:8000/admin/auth/user/ I get a list of all the

Re: python syntax errors

2006-08-29 Thread Ilia Kantor
> if there are syntax errors, the file will not compile and the only > error apache will give is incomplete script headers or something like > that. So before running with apache, make sure the file compiles (F5 > in idle). Even if it does compile, if some import errors are there, > again you

Re: python sets and objects returned in queries

2006-08-29 Thread Ivan Sagalaev
Gary Wilson wrote: > Why can't objects be used in python sets? Example: > [u.username for u in User.objects.all()] > ['bar', 'foo', 'foobar'] a = User.objects.filter(username__contains='foo') b = User.objects.filter(username__contains='bar') set.intersection(set(a), set(b))