How to use pychecker with Django

2008-02-21 Thread shabda
I want to use pychecker to do static analysis on my code. So I set up DJAGO_SETTINGS_MODULE and run pychecker from shell. I am getting exceptions like, G:\prajact>pychecker project\urls.py G:\prajact>C:\Python24\python.exe C:\Python24\Lib\site-packages \pychecker\checker.py project\urls.py

Re: Assigning Dates to DateField instances

2008-02-21 Thread Doug B
I think we'd need to see your Event model class too. It really would be a good idea to take advantage of the validation from doing this as a django form, just passing in POST is dangerous. It would also abstract the whole datetime handling issue for you.

Re: How to stop validations duplications in forms and models?

2008-02-21 Thread shabda
>(the save() method shouldn't raise >any validation errors except those triggered by the database server due >to IntegrityErrors). So what is the recommended place to write validations in models, for now? On Feb 22, 12:25 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2008-02-21 at

Re: Creating a form with only foreign keys?

2008-02-21 Thread [EMAIL PROTECTED]
If you use old forms.. you'd just do something like this .. for each of the attributes you want to search on. class MyManipulator(forms.Manipulator): def __init__(self): sizes = [] all_sizes = Size.objects.all() if all_sizes: sizes = [(obj.name, obj.name)

Re: loaddata on big fixture doesn't seem to end

2008-02-21 Thread Russell Keith-Magee
On Fri, Feb 22, 2008 at 12:07 PM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Thu, 2008-02-21 at 18:58 -0800, msoulier wrote: > > Hi, > > > > I'm loading a fixture with 2500 objects in it into postgres 7.4. > > > > For some reason, loaddata is looking in a lot of additional places

Re: Resolving dynamic dictionary parameters in templates

2008-02-21 Thread Julien
I recently found that snippet, which you could use to assign a temporary variable in your template: http://www.djangosnippets.org/snippets/539/ In theory, it's bad practice, but so useful in some situation ;) On Feb 22, 1:13 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2008-02-21

Re: loaddata on big fixture doesn't seem to end

2008-02-21 Thread Malcolm Tredinnick
On Thu, 2008-02-21 at 18:58 -0800, msoulier wrote: > Hi, > > I'm loading a fixture with 2500 objects in it into postgres 7.4. > > For some reason, loaddata is looking in a lot of additional places > than the file I'm handing it. > > [EMAIL PROTECTED] teleworker]# PYTHONPATH=.. python

loaddata on big fixture doesn't seem to end

2008-02-21 Thread msoulier
Hi, I'm loading a fixture with 2500 objects in it into postgres 7.4. For some reason, loaddata is looking in a lot of additional places than the file I'm handing it. [EMAIL PROTECTED] teleworker]# PYTHONPATH=.. python manage.py loaddata /root/clients.json Loading '/root/clients.json'

Re: Phantom Query

2008-02-21 Thread Dave Fowler
Malcolm! You rock! I had put a function before every render_to_response to analyze the queries made by every function and I still couldn't find it. Your solution went deeper and i found the strange query being made in the default 500 page rendering! How bazar. Thanks a ton for your help.

Re: Resolving dynamic dictionary parameters in templates

2008-02-21 Thread Malcolm Tredinnick
On Thu, 2008-02-21 at 20:47 -0500, Nick Fishman wrote: > Hey everyone. I've run into an issue with dictionaries in templates, and > I'm kind of stuck. I'm trying to track incidents by username and month. > Here's what I have passed into a template: > > months = ['Mar', 'Feb', 'Aug', 'Sep',

Resolving dynamic dictionary parameters in templates

2008-02-21 Thread Nick Fishman
Hey everyone. I've run into an issue with dictionaries in templates, and I'm kind of stuck. I'm trying to track incidents by username and month. Here's what I have passed into a template: months = ['Mar', 'Feb', 'Aug', 'Sep', 'Apr', 'Jan', 'May', 'Nov', 'Dec', 'Oct'] mapping = {'username':

Re: Transient ViewDoesNotExist errors

2008-02-21 Thread Richard Jones
On Feb 22, 11:02 am, Richard Jones <[EMAIL PROTECTED]> wrote: > On Feb 22, 9:54 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > > Or use one of the many other options for serving Django applications > > (mod_wsgi, cherryPy's server, nginx + fastcgi, lighttpd + fastcgi, ...). > > I have

Re: Transient ViewDoesNotExist errors

2008-02-21 Thread Richard Jones
On Feb 22, 9:54 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Or use one of the many other options for serving Django applications > (mod_wsgi, cherryPy's server, nginx + fastcgi, lighttpd + fastcgi, ...). I have compiled and installed the latest mod_wsgi. I'll see how that goes.

Re: How to query ManyToManyFields

2008-02-21 Thread Brett Hoerner
On Thu, Feb 21, 2008 at 5:06 PM, Albert Hopkins <[EMAIL PROTECTED]> wrote: > I have a model with a M2M field and I want to filter based on the field > being empty. How do I do this? I tried > MyModel.objects.filter(m2mfield=[]) but that raises a (MySQL) exception. Is this what you want?

How to query ManyToManyFields

2008-02-21 Thread Albert Hopkins
I have a model with a M2M field and I want to filter based on the field being empty. How do I do this? I tried MyModel.objects.filter(m2mfield=[]) but that raises a (MySQL) exception. -a --~--~-~--~~~---~--~~ You received this message because you are

Re: Transient ViewDoesNotExist errors

2008-02-21 Thread Malcolm Tredinnick
On Thu, 2008-02-21 at 14:48 -0800, Richard Jones wrote: > On Feb 12, 11:03 am, Richard Jones <[EMAIL PROTECTED]> wrote: > > On Feb 9, 5:19 pm, Richard Jones <[EMAIL PROTECTED]> wrote: > > > > > I'm still getting thetransienterrors mentioned in my OP though. > > > > Anyone? I'd be happy to

Re: Transient ViewDoesNotExist errors

2008-02-21 Thread Richard Jones
On Feb 12, 11:03 am, Richard Jones <[EMAIL PROTECTED]> wrote: > On Feb 9, 5:19 pm, Richard Jones <[EMAIL PROTECTED]> wrote: > > > I'm still getting thetransienterrors mentioned in my OP though. > > Anyone? I'd be happy to provide more detail if there was any that > might help? Still getting

Re: Changes in views don't have effect

2008-02-21 Thread Graham Dumpleton
On Feb 21, 2:37 am, Richard Dahl <[EMAIL PROTECTED]> wrote: > If you are using Apache or other web server on the external site, > changes will not propagate until you restart the web server. Depending on the web server hosting solution you may not have to restart the web server. If using

Django for xml api based sites

2008-02-21 Thread [EMAIL PROTECTED]
Hello, We have an opportunity to switch over from Java to something easier for a series of sites that we will be doing. They will be small simple sites but with a reasonable amount of traffic so performance will be important. If this was a database based app I'd go into this meeting suggesting

Re: Javascript, Access Radio Button Elements

2008-02-21 Thread Michael Newman
Your right, I looked too quickly and saw the for instead of the id. Thanks for the correction. On Feb 21, 3:54 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On 21 Feb, 18:57, Little_Grungy <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > I have a form definition for two radio buttons named

Assigning Dates to DateField instances

2008-02-21 Thread Tim Sawyer
I'm not sure I understand what I'm doing here. I'm trying to create an Event object from the data in a form (a simple html form, not a django form). I want to do this: lDay = int(request.POST['DayNo']) lMonth = int(request.POST['MonthNo']) lYear = int(request.POST['YearNo'])

Re: Javascript, Access Radio Button Elements

2008-02-21 Thread Daniel Roseman
On 21 Feb, 18:57, Little_Grungy <[EMAIL PROTECTED]> wrote: > Hi, > > I have a form definition for two radio buttons named choices. I want > to loop through the radio buttons to perform a check with javascript > in the rendered html page, however due to the radio button _id's that > are rendered

Re: Need to change newform label from within view

2008-02-21 Thread csmith87
Actually, it looks like I can use a formfield callback. Not sure exactly how to do it yet, but they are described in the djangoproject newforms library doc. On Feb 21, 2:51 pm, Michael Newman <[EMAIL PROTECTED]> wrote: > not in the views per se, but you can certainly take care of this in > the

Re: Need to change newform label from within view

2008-02-21 Thread Michael Newman
not in the views per se, but you can certainly take care of this in the templates, just manually define each of the fields. On Feb 21, 1:23 pm, csmith87 <[EMAIL PROTECTED]> wrote: > Hello, > > Newbie django user > > Is it possible to change a newform label (from the one in the model) > to

Re: Javascript, Access Radio Button Elements

2008-02-21 Thread Michael Newman
Hmm this is interesting because django is rendering out poor html if your example is correct. IDs in the DOM should be unique. I don't imagine that this would validate the way you want it to either. Why not just have 2 form.BooleanField objects and in the def clean make sure that one is taken

Re: inline editing?

2008-02-21 Thread Almir Karic
ok, thanks /me goes in the corner RTFM :-) -- error: one bad user found in front of screen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: How to stop validations duplications in forms and models?

2008-02-21 Thread Malcolm Tredinnick
On Thu, 2008-02-21 at 08:54 -0800, shabda wrote: > I have some models, and some forms to write data to them. The > attributes in models need to have soem validations, (For example, name > must be alpha numeric, price must be less that 1000 etc). SO I write > the validations in model.save() and

Re: Converting relational data to hiechical data

2008-02-21 Thread Ramiro Morales
On Thu, Feb 21, 2008 at 10:22 AM, shabda <[EMAIL PROTECTED]> wrote: > > I have a model like > > class Task(models.Model): > name = Models.CharField(max_length = 100) > parent = models.ForeignKey('Task', null = True) > > Using this model say I have got a table like, > > Task > --- >

Re: inline editing?

2008-02-21 Thread Michael Newman
As Karen said, You didn't set up the inline right. Read through the docs she pointed you to and fix your errors and the big error will go away. On Feb 21, 1:31 pm, "Almir Karic" <[EMAIL PROTECTED]> wrote: > On Thu, Feb 21, 2008 at 3:02 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > > On Thu, Feb

Re: Authentication not applied in base template

2008-02-21 Thread quizkiwi
That worked great for the base template. But how do I pass database values to a view in an app? I have a a view that should have all the records available for a template so that I can loop through each record and display on the screen. I cannot figure out how to give the template access to the

Re: Converting relational data to hiechical data

2008-02-21 Thread shabda
That would help once I get the relational data to a hierarchical list, and that is the difficult part! On Feb 21, 10:59 pm, Brian Luft <[EMAIL PROTECTED]> wrote: > http://www.djangoproject.com/documentation/templates/#unordered-list > > On Feb 21, 4:22 am, shabda <[EMAIL PROTECTED]> wrote: > > >

Javascript, Access Radio Button Elements

2008-02-21 Thread Little_Grungy
Hi, I have a form definition for two radio buttons named choices. I want to loop through the radio buttons to perform a check with javascript in the rendered html page, however due to the radio button _id's that are rendered by the template, I cannot access them with javascript using

Re: [newforms-admin] inline editing?

2008-02-21 Thread Almir Karic
On Thu, Feb 21, 2008 at 3:02 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Thu, Feb 21, 2008 at 3:55 AM, Almir Karic <[EMAIL PROTECTED]> wrote: > > > > > from django.db import models > > from django.contrib import admin > > > > > > # Create your models here. > > > > class

Need to change newform label from within view

2008-02-21 Thread csmith87
Hello, Newbie django user Is it possible to change a newform label (from the one in the model) to one set in the view ? (i.e. I want the tags lefttag, righttag) in the view below to appear in the generated form as the label, not the model label. Thanks in advance ... Here is my model

Re: Weighted Random Sample

2008-02-21 Thread ringemup
Oh, duh, that's so much simpler. (Now I feel like a nitwit.) Should I be concerned about the performance issues with frequent selects of that type? The table size is on the order of hundreds of thousands (not tens of thousands) of rows. --~--~-~--~~~---~--~~ You

Re: wordpress hooks and actions system in django?

2008-02-21 Thread Marty Alchin
While not exactly Django-specific, I wrote up an article[1] last month, describing an easy way to enable plugins in any Python application. I don't know if that's what you're looking for, but it's probably worth a look, anyway. -Gul [1]

Re: wordpress hooks and actions system in django?

2008-02-21 Thread Dj Gilcrease
On Thu, Feb 21, 2008 at 9:13 AM, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > I was looking at that before, but... aren't django signals mostly for > one-sided communication? I.e. I signal something, someone else catches > it and does something. > > In wordpress it's very much 2-sided

Re: Converting relational data to hiechical data

2008-02-21 Thread Brian Luft
http://www.djangoproject.com/documentation/templates/#unordered-list On Feb 21, 4:22 am, shabda <[EMAIL PROTECTED]> wrote: > I have a model like > > class Task(models.Model): > name = Models.CharField(max_length = 100) > parent = models.ForeignKey('Task', null = True) > > Using this model

Re: self referential manytomany

2008-02-21 Thread Michael Newman
validation meaning python manage.py validate and python manage.py syncdb. I really don't know what is messing up other than the fact that module has a circular load. I have no idea to fix this one. Thanks Evert for your help. Anyone else? On Feb 21, 12:44 pm, Evert Rol <[EMAIL PROTECTED]> wrote:

Re: Evaluating/stepping through sliced QuerySets

2008-02-21 Thread Evert Rol
> There is a threaded comments app http://code.google.com/p/django- > threadedcomments/ > , Now that I think about it, they surely would be doing this > conversion from relational to hierarchical format. I will read the > code and let you know if I can find something useful. While I had been

Re: self referential manytomany

2008-02-21 Thread Evert Rol
> That would be true if I defined both models in the same models.py, and > Profile was trying to use Bookmark before it was loaded in the file. > Because this is an import the quotes won't work. That being said this > in one model works when I don't need to put a import statement in it. > So: > >

Re: Evaluating/stepping through sliced QuerySets

2008-02-21 Thread shabda
There is a threaded comments app http://code.google.com/p/django-threadedcomments/ , Now that I think about it, they surely would be doing this conversion from relational to hierarchical format. I will read the code and let you know if I can find something useful. On Feb 20, 7:10 pm, Evert Rol

Re: self referential manytomany

2008-02-21 Thread Michael Newman
That would be true if I defined both models in the same models.py, and Profile was trying to use Bookmark before it was loaded in the file. Because this is an import the quotes won't work. That being said this in one model works when I don't need to put a import statement in it. So:

Re: wordpress hooks and actions system in django?

2008-02-21 Thread Bram - Smartelectronix
Dj Gilcrease wrote: > On Thu, Feb 21, 2008 at 6:23 AM, Bram - Smartelectronix > <[EMAIL PROTECTED]> wrote: >> Basically plugins can register with the host app and say "I want to be >> plugged in here or there" (the hook). The host app in various places has >> calls which "apply" whatever is

Re: Converting relational data to hiechical data

2008-02-21 Thread Evert Rol
> I have a model like > > class Task(models.Model): > name = Models.CharField(max_length = 100) > parent = models.ForeignKey('Task', null = True) > > Using this model say I have got a table like, > > Task > --- > ID Name Parent_id > 1 Foo null > 2 Bar 1 > 3 Baz1 > 4

Re: self referential manytomany

2008-02-21 Thread Evert Rol
On 21 Feb 2008, at 16:44 , Michael Newman wrote: > > I am a bit confused as to why it is that this gives me an error. I > hope someone could explain it to me. > > Let's say I have users with Profiles that can be connected to the one > Web page that they can author. The other Users can bookmark

How to stop validations duplications in forms and models?

2008-02-21 Thread shabda
I have some models, and some forms to write data to them. The attributes in models need to have soem validations, (For example, name must be alpha numeric, price must be less that 1000 etc). SO I write the validations in model.save() and raise Exceptions, when a validation fails. I also need to

self referential manytomany

2008-02-21 Thread Michael Newman
I am a bit confused as to why it is that this gives me an error. I hope someone could explain it to me. Let's say I have users with Profiles that can be connected to the one Web page that they can author. The other Users can bookmark that page. So my models look like this: profiles.models.py

Re: Issues with IE7 and {% for %} {% endfor %} tag

2008-02-21 Thread merric
It was a cookie issue. I had looked over this... but missed it on first glance. My apologies MerMer On Feb 21, 4:17 pm, merric <[EMAIL PROTECTED]> wrote: > I've commented out all the HTML on the template, so my template now > reads as follows > > {% for i in prizes %} {{i.id }} {%

Re: Issues with IE7 and {% for %} {% endfor %} tag

2008-02-21 Thread merric
I've commented out all the HTML on the template, so my template now reads as follows {% for i in prizes %} {{i.id }} {% endfor %} There is nothing else on the page except the commented out HTML. In firefox this displays without any problem, in IE7 I get a blank page, even when looking at

Re: managers vs static/class methods ?

2008-02-21 Thread James Bennett
On Thu, Feb 21, 2008 at 9:35 AM, glopglop <[EMAIL PROTECTED]> wrote: > Not trying to be slow-witted, but couldn't you do > > objects = MyModel.unfiltered() if request.user.is_admin else > MyModel.filtered() > (where objects is a queryset) > > is there a functionnal difference or is it more

Re: Issues with IE7 and {% for %} {% endfor %} tag

2008-02-21 Thread Jonathan Buchanan
On Thu, Feb 21, 2008 at 8:26 AM, merric <[EMAIL PROTECTED]> wrote: > > I have a template that uses {% for i in prize %} {{ i.description }} > {% endfor %} > > This iterates fine in Firefox, but in IE7 it keeps coming up blank. > I can't see any html issues. I am working off my localhost.

Re: Issues with IE7 and {% for %} {% endfor %} tag

2008-02-21 Thread kevinski
> This iterates fine in Firefox, but in IE7 it keeps coming up blank. > I can't see any html issues.  I am working off my localhost.   Is this > a IE7 security issue or something else I have not thought of? I had a the similar problem once with IE7. It ended up being due to CSS incompatibility

Re: managers vs static/class methods ?

2008-02-21 Thread glopglop
On 20 fév, 17:07, Michael Elsdörfer <[EMAIL PROTECTED]> wrote: > > I understand you could also reuse it from model to model, but in my > > code I have rarely found reusing those methods between different > > models, except some ways that would generally be better solved with > > model

Re: Multiple ForeignKey Relationship

2008-02-21 Thread paul
Hi Michael, Thanks a lot. That query made me realize I've got to re-think this. http://groups.google.com/group/django-users/browse_thread/thread/477915b60c5d160e/ff677bbbf87ea9b3?lnk=gst=django+edit+inline#ff677bbbf87ea9b3 On Feb 21, 8:21 am, Michael Newman <[EMAIL PROTECTED]> wrote: >

Re: managers vs static/class methods ?

2008-02-21 Thread glopglop
Fine, it's clearer for me now (with the added smart examples). "The distinguishing factor between manager methods and class or static methods should be the database. Managers handle table-wide operations ; Python- level operations don't know anything about a database at all." Maybe a sentence

Re: Multiple ForeignKey Relationship

2008-02-21 Thread Michael Newman
http://www.djangoproject.com/documentation/model-api/#many-to-one-relationships look at the edit inline option. The blogosphere is also nice enough to have posted hundreds of examples and test cases that might meet your purposes. Google django edit inline for these examples. On Feb 21, 9:56 am,

Re: Issues with IE7 and {% for %} {% endfor %} tag

2008-02-21 Thread Michael Newman
If that isn't the issue make sure to look at the source HTML. If it is rendering the code then there is something wrong with your styles that IE is hiding your content (Most likely a position:relative float thing). Or you might want to kick apache, sometimes it loads old settings. Last thing that

Re: Informix

2008-02-21 Thread Justin Bronn
Mateusz, Even though we corresponded on IRC, I'd like to respond for the benefit of the community. First, there is no dedicated GeoDjango list (yet) -- but we do have a dedicated channel on freenode (#geodjango). There are no Django database backends for Informix and DB2. GeoDjango requires

Multiple ForeignKey Relationship

2008-02-21 Thread paul
I'm trying to work out how I'm going to setup a model structure a video section of my website. Say I have this scenario. - Each video belongs to a set of 4-5 videos. - Depending on the set the video belongs too, certain information will need to be attached to that video (ie> recipe/chef

Re: Issues with IE7 and {% for %} {% endfor %} tag

2008-02-21 Thread David Marquis
Malcom is right, this has absolutely nothing to do with the {% for %} tag. My guess is that your IE7 might be more restrictive on cookies and not allowing the server to create a session cookie. If your view code assumes that there is a session and you fetch "prize" from the session, then

Re: wordpress hooks and actions system in django?

2008-02-21 Thread Dj Gilcrease
On Thu, Feb 21, 2008 at 6:23 AM, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > Basically plugins can register with the host app and say "I want to be > plugged in here or there" (the hook). The host app in various places has > calls which "apply" whatever is hooked into that location. >

wordpress hooks and actions system in django?

2008-02-21 Thread Bram - Smartelectronix
hey guys, I've been asked to write a wordpress-like system in django, with hooks and action-hooks for plugin-creation alla wordpress. Now the question is - how would you guys handle this? I was thinking that hooks could be represented by template tags which pass the context to whatever

Re: [newforms-admin] inline editing?

2008-02-21 Thread Karen Tracey
On Thu, Feb 21, 2008 at 3:55 AM, Almir Karic <[EMAIL PROTECTED]> wrote: > > from django.db import models > from django.contrib import admin > > > # Create your models here. > > class Category(models.Model): >name = models.CharField(max_length=50) > >def __str__(self): >

A coffe break

2008-02-21 Thread deia
Do you like milk coffe ? http://www.mediaportal.ro/play.php?pid=6560%20cu%20lapte!%20natural(a) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Using HttpResponse as a file - 'HttpResponse' object has no attribute 'seek' error

2008-02-21 Thread kip
Thanks Ned, I had misunderstood the concept of "file-like" and you've explained it admirably, exactly what I needed to know. Though Malcolm's tip regarding the unsuitability of HttpResponse as a flotation device will be a life-saver for many, I'm sure. This is what works for me: import

Re: Issues with IE7 and {% for %} {% endfor %} tag

2008-02-21 Thread Malcolm Tredinnick
On Thu, 2008-02-21 at 05:26 -0800, merric wrote: > I have a template that uses {% for i in prize %} {{ i.description }} > {% endfor %} > > This iterates fine in Firefox, but in IE7 it keeps coming up blank. > I can't see any html issues. I am working off my localhost. Is this > a IE7

Issues with IE7 and {% for %} {% endfor %} tag

2008-02-21 Thread merric
I have a template that uses {% for i in prize %} {{ i.description }} {% endfor %} This iterates fine in Firefox, but in IE7 it keeps coming up blank. I can't see any html issues. I am working off my localhost. Is this a IE7 security issue or something else I have not thought of? Cheers

Re: Sqlite permissions problem - Help :(

2008-02-21 Thread Shadow
:O Well that was stupid of me... I think I assumed it worked since the testing server worked. :P Thanks! All fixed --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Using HttpResponse as a file - 'HttpResponse' object has no attribute 'seek' error

2008-02-21 Thread Ned Batchelder
In Python, there is a loose concept of a "file-like" object. This means that the object behaves like a file under duck-typing, meaning it has the right methods to be treated just as if it were a file. But the concept is only loosely defined, and different file-like objects implement

Converting relational data to hiechical data

2008-02-21 Thread shabda
I have a model like class Task(models.Model): name = Models.CharField(max_length = 100) parent = models.ForeignKey('Task', null = True) Using this model say I have got a table like, Task --- ID Name Parent_id 1 Foo null 2 Bar 1 3 Baz1 4 Bax2 I want to

Re: cycle tag doesn't cycle?

2008-02-21 Thread itpaul
I didn't understand the docs. Apologies to those who do. On Feb 19, 11:23 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-02-19 at 14:35 -0800, itpaul wrote: > > [...] > > > this also means that the documentation > > (http://www.djangoproject.com/documentation/templates/#cycle

Re: Using HttpResponse as a file - 'HttpResponse' object has no attribute 'seek' error

2008-02-21 Thread Malcolm Tredinnick
On Thu, 2008-02-21 at 03:41 -0800, kip wrote: > I thought I would be able to use an HttpResponse object as the file > argument for ZipFile, like this: > > response = HttpResponse(mimetype='application/zip') > response['Content-Disposition'] = 'attachment; filename=zipfile.zip' > file =

Re: Django Sendmail

2008-02-21 Thread [EMAIL PROTECTED]
Thanks Brian On Feb 20, 9:03 pm, Brian Morton <[EMAIL PROTECTED]> wrote: > By default, Django assumes that the SMTP server is running locally. > If you don't have one running locally, you need to set EMAIL_HOST and > EMAIL_PORT in your settings.py file to a valid SMTP server. > > On Feb 20,

Using HttpResponse as a file - 'HttpResponse' object has no attribute 'seek' error

2008-02-21 Thread kip
I thought I would be able to use an HttpResponse object as the file argument for ZipFile, like this: response = HttpResponse(mimetype='application/zip') response['Content-Disposition'] = 'attachment; filename=zipfile.zip' file = zipfile.ZipFile(response, "w") but as soon as I try to write to it

Re: Phantom Query

2008-02-21 Thread Malcolm Tredinnick
On Thu, 2008-02-21 at 00:37 -0800, Dave Fowler wrote: > I have a phantom query that is just killing my database. I have a > model named Stats and django is executing the equivalent to > Link.objects.all() in my Stats app. > > # Query_time: 20 Lock_time: 0 Rows_sent: 659528 Rows_examined:

Re: Checkboxes in newforms

2008-02-21 Thread Eamon
Thanks Malcolm, I'd over-egged the html pudding Regards, Eamon Carron On Feb 20, 5:18 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2008-02-20 at 05:28 -0800,Eamonwrote: > > Hi All, > > > I am a newbie and I can't seem to get my checkbox code working using > > newforms. > > >

Re: problem with django tagging application

2008-02-21 Thread Francesco Davide Calabrese
See the changes listed here: http://code.google.com/p/django-tagging/wiki/BackwardsIncompatibleChanges you may be able to give directly the queryset rather than the model On Thu, Feb 21, 2008 at 1:25 AM, cesco <[EMAIL PROTECTED]> wrote: > Hi, > > I'm using the latest version of the django

Re: problem with django tagging application

2008-02-21 Thread cesco
Hi, > Any chance you were using django-tagging previously and recently > updated to trunk? There are backwards incompatible changes - the > relation names have > changed:http://code.google.com/p/django-tagging/wiki/BackwardsIncompatibleCha... I was actually getting the same error before and

Re: problem with django tagging application

2008-02-21 Thread cesco
Hi > So the SQL that is being constructed by the joined queryset isn't valid. > I'm almost certain the answer to this is "it's fixed in > queryset-refactor, so will one day be fixed in trunk." Thanks for the work you are doing:-) > Pull the results back into Python and merge them manually.

Re: Django hosting service running Os C

2008-02-21 Thread geert
I have a dedicated macmini for around 75 euro's a month, At cqhosting.nl. On Feb 18, 12:12 am, Flavio Curella <[EMAIL PROTECTED]> wrote: > Hi, > > I developed a small application using django and CoreGraphics library > as a school project. I'm wondering to put it online and I googled > around

Re: newforms-admin: howto define custom ModelForm for usage in admin interface

2008-02-21 Thread lowshoe
thanks! a subclass of newforms.BaseForm did the job! lowshoe On Feb 20, 11:35 pm, presclark <[EMAIL PROTECTED]> wrote: > Hello, I was having a similar, but slightly different problem. > > My hangup was that the form_change form wasn't being populated. It > seems that the optional 'form'

[newforms-admin] inline editing?

2008-02-21 Thread Almir Karic
from django.db import models from django.contrib import admin # Create your models here. class Category(models.Model): name = models.CharField(max_length=50) def __str__(self): return self.name class Forum(models.Model): cat =

Re: Django hosting service running Os C

2008-02-21 Thread Jon Atkinson
If it's for school project, and you just need to demo it, why not host it on your own machine and use one of the free dynamic DNS services and host it on the development machine? --Jon > > On Feb 17, 2008 3:12 PM, Flavio Curella <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > > > >

Re: Phantom Query

2008-02-21 Thread dave fowler
yes, i've taken them all out, even the ones that shouldn't have gotten close to my stats_link table 2008/2/21 Jarek Zgoda <[EMAIL PROTECTED]>: > > Dave Fowler napisał(a): > > > I have a phantom query that is just killing my database. I have a > > model named Stats and django is executing the

Re: Phantom Query

2008-02-21 Thread Jarek Zgoda
Dave Fowler napisał(a): > I have a phantom query that is just killing my database. I have a > model named Stats and django is executing the equivalent to > Link.objects.all() in my Stats app. > > # Query_time: 20 Lock_time: 0 Rows_sent: 659528 Rows_examined: 659528 > SELECT >

Phantom Query

2008-02-21 Thread Dave Fowler
I have a phantom query that is just killing my database. I have a model named Stats and django is executing the equivalent to Link.objects.all() in my Stats app. # Query_time: 20 Lock_time: 0 Rows_sent: 659528 Rows_examined: 659528 SELECT