Re: memcached

2008-07-10 Thread Tye
It could be that IE cached the 500 page, whereas Firefox didn't. Try: in IE. It force-refreshes the page by dumping the browser's cache for said page :) Sent from my iPhone On Jul 9, 2008, at 20:09, gt7658b <[EMAIL PROTECTED]> wrote: > > The previous information was not accurate. Actua

Re: from .views import * VS from views import *

2008-07-10 Thread Antoine De Groote
Hey, ok that's a good answer. I'll just go on until I really need to worry about these small things. That's probably the best way. Thanks a lot! Regards, antoine On 10 juil, 08:56, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2008-07-09 at 23:11 -0700, Antoine De Groote wrote: > > Th

Re: Calculating on generic view

2008-07-10 Thread rocco_s
Oh, ist so easy: i do all the calculation in the model. 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

Re: Generic delete view.

2008-07-10 Thread William
Thanks, that was the issue. I looked back at the generic view tutorial, and saw the code was structured slightly differently, which allowed them to put the view in a string. I also found this post in django-dev, which might be the one that you saw earlier referencing generic views+newforms: http:/

Re: Server config

2008-07-10 Thread mccomas . chris
Thanks for the input. I think we're going with Ubuntu. On Jul 9, 11:01 pm, elithrar <[EMAIL PROTECTED]> wrote: > On Jul 10, 2:08 am, [EMAIL PROTECTED] wrote: > > > What does everyone recommend? FreeBSD, RedHat, or Ubuntu? > > Go with what you're most comfortable with - most of my experience has

Authenticate against Active Directory

2008-07-10 Thread mccomas . chris
Has anyone dealt with authentication against Active Directory? I found the Django snippet online (http://www.djangosnippets.org/snippets/ 501/). Right now we have the University network, a web manager, online forums, and online testing software, which the latter three aren't running against AD, so

Re: Too many values to unpack error

2008-07-10 Thread Fernando Rodríguez
El mié, 09-07-2008 a las 09:35 -0500, Arien escribió: > > TOPIC_CHOICES = ( ('general', 'General enquiry'), > > ('bug', 'Bug report'), > > ('suggestion' 'Suggestion'), > > ) > > You're missing a comma in the last-but-one line. (It evaluates to

Re: Authenticate against Active Directory

2008-07-10 Thread Tim Chase
> Any issues with running auth against AD? For the most part, AD is just LDAP in disguise (with MS extensions). I've been able to use LDAP to authenticate a number of Python apps against our AD at work. Thus, any "Django LDAP authentication" module/code (which I've stumbled across several t

multiple managers in admin for same model

2008-07-10 Thread Alon Levy
Hi All, I've grepped this in this group and couldn't find any answer to this question: I have a single model with two different managers, the default manager and another custom manager: class MyManager(models.Manager): def get_query_set(self): return AModel.objects.filter(id=1) class AModel

Django and DateBase refresh

2008-07-10 Thread maria
I am really new in Django but I really want to know what should I do to build web application, which would be reload automatically because datebase would be changing continuously. Could somebody help me? plx --~--~-~--~~~---~--~~ You received this message because y

Re: list_display a Many to Many field

2008-07-10 Thread Fernando Rodríguez
El mié, 09-07-2008 a las 06:40 -0700, urukay escribió: > > this should work: > > def get_authors(self): > return self.authors.all() Thanks Radovan. Shouldn't it be self.authors.objects.all()? --~--~-~--~~~---~--~~ You received this message because you are

Re: list_display a Many to Many field

2008-07-10 Thread [EMAIL PROTECTED]
No, authors is the related manager, so it's all method returns a QuerySet with all the relevant items. On Jul 10, 8:25 am, Fernando Rodríguez <[EMAIL PROTECTED]> wrote: > El mié, 09-07-2008 a las 06:40 -0700, urukay escribió: > > > > > this should work: > > > def get_authors(self): > >     return

Re: Authenticate against Active Directory

2008-07-10 Thread mccomas . chris
Thanks tim. Got it setup, but when I try to login to the admin with our dummy acct on AD, I get the error ImproperlyConfigured at /admin/ Error importing authentication backend project.app.auth: "No module named ldap" Running the latest development version of Django with Python2.5 On Jul 10, 8:

hot to get session inside models

2008-07-10 Thread Vladimir
hi! i'am doing a particular application that requires multiple language from django.db import models from django.contrib import admin from django.utils import translation class MultiName(models.Model): for i in LANGUAGES: exec "name_%s = models.CharField(max_length = 255)" % i[0]

Re: Authenticate against Active Directory

2008-07-10 Thread Tim Chase
> Got it setup, but when I try to login to the admin with our dummy acct > on AD, I get the error ImproperlyConfigured at /admin/ > Error importing authentication backend project.app.auth: "No module > named ldap" > > Running the latest development version of Django with Python2.5 Hmm...forgot t

foreign key not being defined in admin interface

2008-07-10 Thread allisongardner
Sorry about obscure title...don't know what the problem is let alone its name. I am inputting protein names into one table, these are the primary key. When I add a field and save it states: The Protein "Protein object" was added successfully. Obviously it should state the the name of the protein

Re: foreign key not being defined in admin interface

2008-07-10 Thread Richard Dahl
do you have a __unicode__() function for the Protein Model ala: def __unicocde__(self): return ('%s' % (self.name)) -richard On 7/10/08, allisongardner <[EMAIL PROTECTED]> wrote: > > > Sorry about obscure title...don't know what the problem is let alone > its name. > I am inputting protein

Re: Authenticate against Active Directory

2008-07-10 Thread mccomas . chris
Thanks, got it. Thought it was already on the box so that was confusing me :) Now got other errors to worry about, ugh. On Jul 10, 10:23 am, Tim Chase <[EMAIL PROTECTED]> wrote: > > Got it setup, but when I try to login to the admin with our dummy acct > > on AD, I get the error ImproperlyConfig

Re: foreign key not being defined in admin interface

2008-07-10 Thread allisongardner
Well yes I think so, I have : def __unicode__(self): return self.prot_name With prot_name being the primary key field. Is that wrong? Allison ps. wow you're quick to respond..thank you On Jul 10, 4:56 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote: > do you have a __unicode__() function

Re: foreign key not being defined in admin interface

2008-07-10 Thread allisongardner
Tried the version you gave me but still no joy On Jul 10, 5:03 pm, allisongardner <[EMAIL PROTECTED]> wrote: > Well yes I think so, I have : > >  def __unicode__(self): >        return self.prot_name > > With prot_name being the primary key field. Is that wrong? > > Allison > ps. wow you're quick

Accessing SQL result by column name

2008-07-10 Thread Michael Burton
Hi everyone, I'd like to use column names rather than positions to access the results of my Django SQL queries. For example, > cursor = connection.cursor() > cursor.execute('select a, b, c from foo') > rows = cursor.fetchall() > print rows['a'] The above code gives me an error

RE: Django and DateBase refresh

2008-07-10 Thread Emily Rodgers
> -Original Message- > From: django-users@googlegroups.com > [mailto:[EMAIL PROTECTED] On Behalf Of maria > Sent: 10 July 2008 12:41 > To: Django users > Subject: Django and DateBase refresh > > > I am really new in Django but I really want to know what > should I do to build web ap

Re: foreign key not being defined in admin interface

2008-07-10 Thread allisongardner
Changed it to def __str__(self): return self.prot_name Now it works but surely I should use unicode...why won't that work? I have import os, sys from django.db import models at the start of my models.py file, should I import something else? Regards again, Allison On Jul 10, 5:07 pm, al

XML and django

2008-07-10 Thread Ahmad Akkaoui
Hello everyone, I would like to know how to I would go about parsing an xml string in Django. Is there a built in XML library or am I going to have to rely on external parsers. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: foreign key not being defined in admin interface

2008-07-10 Thread Richard Dahl
Are you using trunk? I know that a few months ago there were significant changes to the handling of unicode. I suspect you are on a previous rev. -richard On 7/10/08, allisongardner <[EMAIL PROTECTED]> wrote: > > > Changed it to > def __str__(self): > return self.prot_name > > Now it wor

Re: XML and django

2008-07-10 Thread Jeff Anderson
Ahmad Akkaoui wrote: Hello everyone, I would like to know how to I would go about parsing an xml string in Django. Is there a built in XML library or am I going to have to rely on external parsers. There are plenty of options to parse XML. Just pick your favorite Python XML parsing library a

Setting up Django

2008-07-10 Thread Greg Lindstrom
Hi Everyone- I am in the process of putting up my first Django site and am to the point of getting it off my laptop and onto a hosted service. The company I am doing this for has an existing relationship with web.com and wants to stay there, if possible. What do I need to know or ask as we get

Re: XML and django

2008-07-10 Thread Horst Gutmann
Since Python 2.5 ElementTree is part of the core library and resides in the xml.etree package :-) http://docs.python.org/lib/module-xml.etree.ElementTree.html -- Horst On Thu, Jul 10, 2008 at 5:18 PM, Ahmad Akkaoui <[EMAIL PROTECTED]> wrote: > Hello everyone, > > I would like to know how to I w

Re: foreign key not being defined in admin interface

2008-07-10 Thread allisongardner
Okay, will update (thought I had done but obviously I am lagging behind). Thanks for help. On Jul 10, 5:23 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote: > Are you using trunk?  I know that a few months ago there were significant > changes to the handling of unicode.  I suspect you are on a previo

RE: XML and django

2008-07-10 Thread Emily Rodgers
> -Original Message- > From: django-users@googlegroups.com > [mailto:[EMAIL PROTECTED] On Behalf Of Ahmad Akkaoui > Sent: 10 July 2008 16:19 > To: django-users@googlegroups.com > Subject: XML and django > > > Hello everyone, > > I would like to know how to I would go about parsing an x

Re: Setting up Django

2008-07-10 Thread Brian Jackson
On Thursday 10 July 2008 10:28:30 am Greg Lindstrom wrote: > Hi Everyone- > > I am in the process of putting up my first Django site and am to the > point of getting it off my laptop and onto a hosted service. The > company I am doing this for has an existing relationship with web.com > and wan

Re: Setting up Django

2008-07-10 Thread Kenneth Gonsalves
On 10-Jul-08, at 8:58 PM, Greg Lindstrom wrote: > as we get the service up? In particular, do I need to have shell > access in order to create the project and the models, or can I just > ftp the files to the server after I create the database? Now that I > think of it, I really need to run syn

problem serving image [ERROR: Page not found: /usr/lib/python2.5/site-packages/djangotrunk/django/contrib/admin/media/amazon.gif]

2008-07-10 Thread reyjexter
I tried following the documentation but I cant seem to serve an image. I'm getting this error: ERROR: Page not found: /usr/lib/python2.5/site-packages/djangotrunk/ django/contrib/admin/media/amazon.gif when trying to browse http://localhost:8080/amazon.gif I run the server using this: ./manage

RE: problem serving image [ERROR: Page not found: /usr/lib/python2.5/site-packages/djangotrunk/django/contrib/admin/media/amazon.gif]

2008-07-10 Thread Emily Rodgers
Try changing your directory (and paths) to something like myapp_media instead of media. Media is used by the admin interface for the css / js files there, which is why it is getting confused. Em > -Original Message- > From: django-users@googlegroups.com > [mailto:[EMAIL PROTECTED] On B

sessionid

2008-07-10 Thread Bobby Roberts
i'm trying to get the sessionid and print it to the screen as follows: {{ request.session.sessionid }} but nothing is getting returned. i've also tried .id with no results. can someone let me know how to do this? --~--~-~--~~~---~--~~ You received this message b

how does {% url %} work?

2008-07-10 Thread Viktor Nagy
Hi 5! I have the following files myproject/urls.py with a line (r'^$', include('coosci.webapp.urls')), then I have myproject/coosci/urls.py with a line (r'^projects/join/(?P\d+)/$', 'join_project'), and finally in my template {% url webapp.views.join_project project_id=project.project.id %} a

Re: sessionid

2008-07-10 Thread Bobby Roberts
disregard... figured it out. --~--~-~--~~~---~--~~ 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 [EMAI

RE: how does {% url %} work?

2008-07-10 Thread Emily Rodgers
I think that you need to do (r'^coosci/$', include('coosci.webapp.urls')), In your myproject/urls.py file for that to work (but I could be wrong!). > -Original Message- > From: django-users@googlegroups.com > [mailto:[EMAIL PROTECTED] On Behalf Of Viktor Nagy > Sent: 10 July 2008 17:

Postgres, cursors and querysets

2008-07-10 Thread [EMAIL PROTECTED]
I have been reading about this error on the django trac site and django-developers. This appears to be a psycopg2 Programming Error. I am getting this when I try and drop into a cursor to create a bunch of rows. Sometimes as few as 3 rows...

Re: Markup languages vs HTML

2008-07-10 Thread Matic Žgur
Thanks for your opinions. I've just discovered this: http://wmd-editor.com . WYSIWYG Markdown editor. Quite an interesting thing. I think, I'll play around with this for a while and then decide for the appropriate markup language, whether Markdown or HTML. On Tue, Jul 8, 2008 at 10:23 PM, bruno

Re: Accessing SQL result by column name

2008-07-10 Thread Norman Harman
Michael Burton wrote: > For example, > > cursor = connection.cursor() > > cursor.execute('select a, b, c from foo') > > rows = cursor.fetchall() > > print rows['a'] > Is there a db-independent way (or any way at all for users of postres) > to use column names in SQL queries instead

Re: sessionid

2008-07-10 Thread Randy Barlow
Bobby Roberts wrote: > disregard... figured it out. Hey Bobby! Just a note - it's generally a good idea to post the solution to your problem when you get it, so that when people search the archives who might have the same question as you, they can find it more easily. Glad you got it though! -

Alpha Chars in dynamic url?

2008-07-10 Thread lukeqsee
Can you use alpha characters in the urls? like mysite.com/people/ [name]/ Is this possible? Haven't found anything in the documentation relating to it. Thanks, Luke --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: sessionid

2008-07-10 Thread Bobby Roberts
> Hey Bobby!  Just a note - it's generally a good idea to post the > solution to your problem when you get it, so that when people search the > archives who might have the same question as you, they can find it more > easily.  Glad you got it though! > oops... pardon the noobism! {{ request.sess

Re: Alpha Chars in dynamic url?

2008-07-10 Thread lukeqsee
Sorry I didn't my last post clear what I want is mysite.com/people/ {dynamic url ie. name)/ On Jul 10, 1:34 pm, lukeqsee <[EMAIL PROTECTED]> wrote: > Can you use alpha characters in the urls? like mysite.com/people/ > [name]/ > > Is this possible? Haven't found anything in the documentation relat

Re: Alpha Chars in dynamic url?

2008-07-10 Thread Scott Moonen
Luke, this should work. Here's an example I use: *urls.py:* url('^user/(?P\w+)/$', user.view) *views/user.py: *def view(request, user_id) : user = get_object_or_404(User, username = user_id) Hope that helps, -- Scott On Thu, Jul 10, 2008 at 1:42 PM, lukeqsee <[EMAIL PROTECTED]> wrote: >

Re: Alpha Chars in dynamic url?

2008-07-10 Thread lukeqsee
Thanks, it worked. On Jul 10, 1:48 pm, "Scott Moonen" <[EMAIL PROTECTED]> wrote: > Luke, this should work.  Here's an example I use: > > *urls.py:* > url('^user/(?P\w+)/$', user.view) > > *views/user.py: > *def view(request, user_id) : >   user = get_object_or_404(User, username = user_id) > > Ho

Not quite sure how to model the data structure

2008-07-10 Thread m3scalito
Hi I'm quite new to django, and I've found it fantastic to work with, but I'm having trouble modelling the following structure: I have many Guests, each Guest can be related to another Guest, e.g A Parent could have 3 children, all of whom are guests. This was my attempt, but it just doesn't f

CSV updater, 2 saves in one function. Problem?

2008-07-10 Thread Frantisek Malina
Hi all? I am trying to update stock in my django shopping cart from the CSV feed. I am doing this regularly so I need to zero the stock first and loop trough the CSV to update. The problem is that the following code will only zero the stock and will not update. How to get around it? Is there a pro

Re: "ImportError No module named django"

2008-07-10 Thread MadMax007
Great! and I just want to say thank you to everyone that helped me with this problem, it is very much appreciated. On Jul 9, 6:03 pm, "Peter Herndon" <[EMAIL PROTECTED]> wrote: > Yes, the install worked.  If you can import a module without error, > it's installed successfully. > > Mostly. ;)  Yo

Re: Not quite sure how to model the data structure

2008-07-10 Thread Richard Dahl
how about: class Guest(models.Model): first_name = models.CharField(maxlength=30) last_name = models.CharField(maxlength=30) relations = models.ManyToManyField(Relation, related_name = 'guest_relationship') class Relation(models.Model): guest = models.Foreignkey(Guest) relationship

Anyone used USAEpay to process credit cards in django?

2008-07-10 Thread Bobby Roberts
I really need help here. Has anyone used this company's soap api in django to process credit cards? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us

Re: Not Django related, but would love your opinions

2008-07-10 Thread Dan Ellis
It is absolutely a legitimate concern. --~--~-~--~~~---~--~~ 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 ema

Two edit_inlines between the same two models?

2008-07-10 Thread Aaron
Is it impossible to have two edit_inline s in a model which refer to the same other model? I've been trying to do this, and get a "KeyError" The situation is: I'm writing an app to keep track of cave exploration data. I have trip objects and QM objects. QMs are leads in the cave- passages that ha

Re: CSV updater, 2 saves in one function. Problem?

2008-07-10 Thread Frantisek Malina
Hey gang, Please help. What's wrong with the above code? --~--~-~--~~~---~--~~ 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 thi

Re: Accessing SQL result by column name

2008-07-10 Thread Jonathan Buchanan
Michael Burton wrote: > Hi everyone, > > I'd like to use column names rather than positions to access the > results of my Django SQL queries. > > For example, > > > cursor = connection.cursor() > > cursor.execute('select a, b, c from foo') > > rows = cursor.fetchall() > > print

Re: Not quite sure how to model the data structure

2008-07-10 Thread m3scalito
nice one richard, that's exactly what I was looking for :-) I decided to use your second example because of it's simplicity and the fact that it more accurately expresses the relationship I'm trying to create. thanks! --~--~-~--~~~---~--~~ You received this messag

Re: Two edit_inlines between the same two models?

2008-07-10 Thread Richard Dahl
While I am not much of a spelunker... why not an attribute of the QM that displays the status (found, killed, etc..)? class Trip(): blah ... qms = models.ManyToMany(QM) class QM(): blah ... status = models.Charfield(max = 30, choices = (('found', 'found'), ('killed', 'killed'))) hth,

Automatic Image Resizing upon Upload

2008-07-10 Thread TheBoff
To jump straight in to the question: I'm wrinting a website using the automatic admin interface, and am wondering if there's any way to create a thumbnail automatically upon the upload of the image. I know I could set it as a property, and use PIL to do it on the fly (well I assume I could, I ha

Advice on on a flatpage menu

2008-07-10 Thread Oscar Carlsson
Hello everyone! I wrote a simple flatpage menu the other day (as a template tag), but I'm not sure if this is a optimal solution - it feels a bit hackish. Here's the code: http://dpaste.com/hold/62194/ This is how the tag is used in a template: {% load flatpage_menu %}{% get_flatpage_menu reques

Re: how does {% url %} work?

2008-07-10 Thread bruno desthuilliers
On 10 juil, 18:27, "Emily Rodgers" <[EMAIL PROTECTED]> wrote: > I think that you need to do > > (r'^coosci/$', include('coosci.webapp.urls')), > > In your myproject/urls.py file for that to work (but I could be wrong!). You're right. --~--~-~--~~~---~--~~ You rec

Re: how does {% url %} work?

2008-07-10 Thread bruno desthuilliers
On 10 juil, 18:09, "Viktor Nagy" <[EMAIL PROTECTED]> wrote: > Hi 5! > > I have the following files > myproject/urls.py with a line > > (r'^$', include('coosci.webapp.urls')), > > then I have > myproject/coosci/urls.py with a line > (r'^projects/join/(?P\d+)/$', 'join_project'), > > and finally i

Re: CSV updater, 2 saves in one function. Problem?

2008-07-10 Thread Frantisek Malina
Please help. Dpaste here: http://dpaste.com/hold/62198/ --~--~-~--~~~---~--~~ 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 thi

Re: Alpha Chars in dynamic url?

2008-07-10 Thread Norman Harman
lukeqsee wrote: > Thanks, it worked. > > On Jul 10, 1:48 pm, "Scott Moonen" <[EMAIL PROTECTED]> wrote: >> Luke, this should work. Here's an example I use: >> >> *urls.py:* >> url('^user/(?P\w+)/$', user.view) Not sure what you meant by "alpha chars" but \w+ matches more than just [A-Za-z]+ s

Re: Advice on on a flatpage menu

2008-07-10 Thread Frantisek Malina
This works fine for me. I just had to strip down the blog part. Thank you for sharing. Would you mind having a look at this my little problem? http://groups.google.com/group/django-users/browse_thread/thread/62fdb184c5592988 Dpaste here: http://dpaste.com/hold/62198/ On 10. Júl, 22:05 h., "Oscar

Re: Advice on on a flatpage menu

2008-07-10 Thread James Punteney
I used an inclusion template tag to do the same basic functionality. It's a bit simpler and it keeps the html in the templates for easier customizing. You can see the template tag here: http://code.google.com/p/django-simplepages/source/browse/trunk/simplepages/templatetags/page_tags.py The templ

URLS outside of the actual site but on the same domain

2008-07-10 Thread RavenJade2006
I am extremely knew at this and recently had a site built in Django. Now I am having to add a URL to a subdirectory on the same domain. The forums link actually goes to a subdirectory that holds all the files for that forum, so I know it can be done. I just cant seem to find the right spot I am s

Re: Not Django related, but would love your opinions

2008-07-10 Thread Rajesh Dhawan
On Jul 10, 2:40 pm, blis102 <[EMAIL PROTECTED]> wrote: > Hey everyone, > > This is not at all Django related but I know there are a lot of people > in this list that are smart fellas, so is this real or another one of > Google's April fools jokes: > > http://www.google.com/help/netneutrality_let

Re: CSV updater, 2 saves in one function. Problem?

2008-07-10 Thread Daniel Roseman
On Jul 10, 7:47 pm, Frantisek Malina <[EMAIL PROTECTED]> wrote: > Hi all? > I am trying to update stock in my django shopping cart from the CSV > feed. > I am doing this regularly so I need to zero the stock first and loop > trough the CSV to update. > The problem is that the following code will o

Re: URLS outside of the actual site but on the same domain

2008-07-10 Thread Rajesh Dhawan
Hi, RavenJade2006 wrote: > I am extremely knew at this and recently had a site built in Django. > Now I am having to add a URL to a subdirectory on the same domain. > The forums link actually goes to a subdirectory that holds all the > files for that forum, so I know it can be done. I just cant

Re: URLS outside of the actual site but on the same domain

2008-07-10 Thread Daniel Roseman
On Jul 10, 9:29 pm, RavenJade2006 <[EMAIL PROTECTED]> wrote: > I am extremely knew at this and recently had a site built in Django. > Now I am having to add a URL to a subdirectory on the same domain. > The forums link actually goes to a subdirectory that holds all the > files for that forum, so I

Re: Not Django related, but would love your opinions

2008-07-10 Thread Roger Lancefield
> Hey everyone, > > This is not at all Django related but I know there are a lot of people > in this list that are smart fellas, so is this real or another one of > Google's April fools jokes: > > http://www.google.com/help/netneutrality_letter.html Just to worry you further, you might want to ta

Error when I run db commands without manage.py

2008-07-10 Thread Ryan Nowakowski
Hey Folks, I'm using trunk. When I run this using python (without manage.py)... card = Card(serial='0749FT266F') ...I get this error: Traceback (most recent call last): File "./control.py", line 68, in card = Card(serial='0749FT266F') File "/usr/lib/python2.5/site-packages/django/db/

Re: Black Box Testing Framework for Django

2008-07-10 Thread bob84123
I've been successfully using selenium with django for some time now; have a look at http://cms.studstudy.com/Testing_web_applications_with_Selenium__Python_and_Django/ (disclaimer: I wrote this. Also, one thing I haven't got around to mentioning is that the way I connect selenium and django

Re: [SOLVED] Error when I run db commands without manage.py

2008-07-10 Thread Ryan Nowakowski
On Thu, Jul 10, 2008 at 04:07:47PM -0500, Ryan Nowakowski wrote: > > Hey Folks, > > I'm using trunk. When I run this using python (without manage.py)... > > card = Card(serial='0749FT266F') > > ...I get this error: > > Traceback (most recent call last): > File "./control.py", line 68, in

Behavior of add(obj1...) and remove(obj1...)

2008-07-10 Thread Beetle B.
Hi, If I do some_object.users.add(user), it won't complain if the user was already in some_object. Likewise, if I do some_object.users.remove(user), it won't complain if the user was never there. Can I rely on this behavior in the future? I currently do explicit checks: I create a list of all

Re: URLS outside of the actual site but on the same domain

2008-07-10 Thread Dan Ellis
On Jul 10, 9:52 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > http://www.djangoproject.com/documentation/static_files/ This isn't going to work. A forum is a dynamic site, so some of it will be served by, for example, CGI. --~--~-~--~~~---~--~~ You received this

extension of generic views...

2008-07-10 Thread mccomas . chris
what's the best way with django to remember a page and redirect to that page. so if you're at www.mysite.com/entries/2008/jul/04/this-is-my-entry and you click a link that stores something in a different db field that once it goes through that view and enters the info it redirects you to the url

newforms - display only one radio button of a group?

2008-07-10 Thread J Meier
Hi folks. I'm building a form for entry of addresses. Users will have the option of using a structured st of input fields (appartment, street number, street name, etc.) or using a freeform input (one large input field for things like "Smith Acreage, RR5, 20 mins South of city"). They chose between

Re: CSV updater, 2 saves in one function. Problem?

2008-07-10 Thread Frantisek Malina
I am sorry for being a bad guy, it's 1AM in my timezone and I've just went through a couple of python beginner headaches. So I took the-baby- crying-most-will-get-served-first approach. Never again, I promise. I updated the code to use Excel instead of CSV to save some heavy lifting. http://dpast

Re: CSV updater, 2 saves in one function. Problem?

2008-07-10 Thread Frantisek Malina
Hooray, I've got the exception to work. Although the stock is still all zeros. If I remove lines... for product in products: product.items_in_stock = 0 product.save() ...updating works. However I need to zero all the stock before I update, because my feed does not contain SK

Re: dreaded FieldError (used to be KeyError) can only replicate on production, ugh!

2008-07-10 Thread Milan Andric
On Tue, Jul 8, 2008 at 4:30 PM, Milan Andric <[EMAIL PROTECTED]> wrote: > > > > On Jun 30, 3:01 pm, Milan Andric <[EMAIL PROTECTED]> wrote: >> I've been wresting with this one for a couple hours now trying to >> track it down, but no luck. I'm recently updated to django trunk and >> getting very

Re: Strange cookie problem

2008-07-10 Thread Ahmad Al-Ibrahim
I have the same issue but with the cookie key name I'm trying to set a cookie with name usercookie[username], but it seems using square brackets in the cookie key name makes a problem here, is there any work around for this problem? >>> SimpleCookie('usercookie[username]=speedy; path=/; domain=my

Re: Not Django related, but would love your opinions

2008-07-10 Thread Frantisek Malina
http://vizualbod.com/articles/usnetworkneutrality Just to worry you less, I’ll start running a couple huge proxies in central Europe for all of you American friends if this happens. It's been done in China, where CISCO blocked a lot of stuff and Proxies work fine for China's underground. On 10.

Re: multiple managers in admin for same model

2008-07-10 Thread Malcolm Tredinnick
On Thu, 2008-07-10 at 04:32 -0700, Alon Levy wrote: [...] > So does anyone know of a simple way to get two different manager views > in admin? The question doesn't really make sense, since the manager is primarily to determine the default query set to display. Pretty much by definition, there ca

Re: CSV updater, 2 saves in one function. Problem?

2008-07-10 Thread Frantisek Malina
Can I make this work somehow with signals? --~--~-~--~~~---~--~~ 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: CSV updater, 2 saves in one function. Problem?

2008-07-10 Thread Steve Potter
> > print update_sku, update_stock > #Returned the whole feed > 2817312 130 > 2842300 22 > 2846762 50 > 2859391 22 > BPC60SS 22 > BPC70SS 2 > BPC90SS 2 > BPS60SS 22 > BPS70SS 22 > BPS90SS 22 > BTD600 22 > BWC150SS 80 > BWC300SS 22 > > print p.sku, p.items_in_stock > #Returned only the last line >

multiple selection checkboxes in a html table

2008-07-10 Thread James Beard
Hi all. I have a HTML table of data that I'd like to be able to select multiple rows of and perform some sort of group action. Think "Select all" then "Mark as read" in gmail. So, in the view I can get a list of model objects (e.g. mail messages), and dynamically add a checkbox field to the form

Re: Automatic Image Resizing upon Upload

2008-07-10 Thread Eric Abrahamsen
It's intensive, but not prohibitively so. I've used a few setups where large image files were uploaded and, depending on the options, two or even three different versions of the image are created in the save() method. The server has yet to explode. Try poking through some of these snippets

Re: multiple selection checkboxes in a html table

2008-07-10 Thread Malcolm Tredinnick
On Thu, 2008-07-10 at 19:08 -0700, James Beard wrote: > Hi all. > > I have a HTML table of data that I'd like to be able to select > multiple rows of and perform some sort of group action. Think "Select > all" then "Mark as read" in gmail. > > So, in the view I can get a list of model objects (

Re: CSV updater, 2 saves in one function. Problem?

2008-07-10 Thread Eric Abrahamsen
>> print p.sku, p.items_in_stock >> #Returned only the last line >> BWC300SS 22 >> >> I don't get it why it didn't return the full excel feed again. When in doubt, throw more print statement in! Try putting one after this line: p = Product.objects.get(sku=update_sku) To make sure you're actua

post method does not work

2008-07-10 Thread Venkat Rao
Hello, I'm new to django and I might have made a simple mistake that I need help with. I'm writing a todo list application using google app engine and I'm having trouble with using the post method. I'm going to post my code below but I can also email it to you as a zip file. Here is my index