filtering by related object causes query to grind to a halt

2010-05-23 Thread Chris Withers
I added the: queryset = queryset.filter(ticket__event=event) ...line, evaluating the queryset grinds to a halt. Why is that? How can I make it fast? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -- You received t

Re: more complex queries

2010-05-20 Thread Chris Withers
... Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -- 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...@googlegroups.com.

more complex queries

2010-05-20 Thread Chris Withers
Hi All, I have a Transaction model with a DecimalField called "amount" and a CharField called "action". How do I sum all the transactions, multipling the amount by -1 when the action is REFUND? cheers, Chris -- Simplistix - Content Management, Batch Processing

Django reversion, AuditTrail, MySQL MyISAM

2010-05-20 Thread Chris Allen
mention of Django 1.2 compatibility. Django-audit-log appears to be abandoned. Is anyone aware of any functional alternatives or solutions to the blockers for using the above? Thank you for reading, :) --- Chris -- You received this message because you are subscribed to the Google Groups "Dj

Re: Hi guys, compatibility issues between django 1.1.1, satchmo 0.9 and postgresql 8.4?

2010-05-11 Thread Chris Moffitt
Rafael, You should probably direct your question to the satchmo-user's list to get more responses. I'm not aware of any Postgresql specific issues so if you can provide more details on the satchmo list, we'll try to help. -Chris On Tue, May 11, 2010 at 5:35 PM, Rafael Pineda wr

customizing emailed error messages

2010-05-06 Thread Chris Curvey
When I get an unexpected error in my mod_wsgi/Django application, I'm emailed a very nice error message with a stack trace and all the HTTP environment variables (GET, POST, META, etc.) That's great, but it does not include the name of the logged-in user. Is there a way for me to add that informat

where can I find good unit test examples?

2010-05-06 Thread Chris Withers
Hi All, Where can I find good examples of django unit tests? I currently just want to test my models and some helper functions, but they will do a .save() on a bunch of model instances. Any help gratefully recieved! Chris -- You received this message because you are subscribed to the

Re: newbie problem -- cant import library

2010-04-30 Thread Chris Czub
Oh... Actually looking at the error that was spit out, it looks like you made a typo. Your error says you typed 'from mysite.blog import BlogPost'. On Apr 30, 2010, at 5:44 PM, Mark Serva wrote: from mysite.blog import BlogPost -- You received this message because you are subscribed to

Re: newbie problem -- cant import library

2010-04-30 Thread Chris Czub
Are you running that command from the interactive shell invoked by running 'python manage.py shell'? Invoking the interactive shell that way should set up all your python library settings properly for your Django app. On Apr 30, 2010, at 5:44 PM, Mark Serva wrote: I am running django 1.

Re: Protecting Static Media from Unauthorized Users

2010-04-14 Thread Chris Moffitt
chmo_store/shop/views/download.py#cl-58 -Chris On Wed, Apr 14, 2010 at 7:06 PM, Dilan wrote: > Hi, > > I know this isn't a completely django-based question but I thought > someone might have an idea, whether it uses Django or not. > > I am currently using what seems to be

Admin creating duplicate inlines

2010-04-08 Thread Chris Amico
Hi folks, I have a model with generically-related Link inline objects, and the admin seems to be trying to overwrite attributes on the first inline object with those of the second. This causes an error when trying to save. Here's what the models look like: class Person(models.Model): first_na

Re: using "id" as a field name in ModelForm.

2010-04-01 Thread Chris Curvey
On Apr 1, 1:51 pm, Nick Arnett wrote: > On Thu, Apr 1, 2010 at 10:34 AM, Chris Curvey wrote: > > > class FoobarForm(ModelForm): > >  foo = forms.FloatField(label = '$') > >  id = forms.HiddenField() > > If you're using newforms, there's no su

using "id" as a field name in ModelForm.

2010-04-01 Thread Chris Curvey
this has got to be FAQ, but I can't find it for the life of me. I have an ordinary Django model class, which has been automatically been given a field called "id". Great. Now I want to use this field as a hidden value in a ModelForm, but whenever I add "id" to the list of fields in the form, I g

Changing transaction isolation level for a particular view function

2010-03-30 Thread Chris Young
s here Obviously, this is suboptimal for a number of reasons. If I simply try to set transaction isolation level without ending the transaction and beginning a new one, I will get an error that it can't be applied after any other select statement (see select version() above). Cheers, Chris

Re: Uploading CSV file via ModelForm and then getting info and storing in a different model

2010-03-26 Thread Chris McComas
So I resolved the previous issue, not i'm getting this error, newline in string. http://dpaste.com/176429/ Any idea? I'm thinking for some reason I need to change something in reader = csv.reader(file, delimiter=',', quotechar='"') On Mar 26, 10:2

Re: Uploading CSV file via ModelForm and then getting info and storing in a different model

2010-03-26 Thread Chris McComas
derek, thanks, that's a bit much for what we need. i setup this in my views: http://dpaste.com/176380/ I'm getting this error: http://dpaste.com/176382/ How can I get it to open the file that was just uploaded and saved? On Mar 26, 9:27 am, derek wrote: > On Mar 26, 1:54 pm,

Uploading CSV file via ModelForm and then getting info and storing in a different model

2010-03-26 Thread Chris McComas
I have to models, one is just a timestamp field and a file, the other has some information. I need to create a view that'll allow our staff to upload a CSV and then it'll automatically take that info and save it into the second model. I found this http://blog.2theleft.la/2010/02/9/importing-csv-fil

Re: Hostmonster shared hosting and django tinymce

2010-03-17 Thread chris hendrix
ok thanks for pointing me in the right direction. doesn't sound too hard. On Wed, Mar 17, 2010 at 8:59 AM, Omer Barlas wrote: > tchendrix @ 17-03-2010 14:31: > > do you by chance have instructions on how to get that installed with >> django so it works properly? They don't say anything in th

inspectdb Traceback occurring immediately after interruption

2010-03-10 Thread Chris Young
her.py", line 86, in connect argspec = inspect.getargspec(receiver) AttributeError: 'module' object has no attribute 'getargspec' Would you mind letting me know how to fix it or what I should read up on to try to fix it myself? Is there any other information needed? Cheers,

Seeking Django developer (Boston, MA)

2010-03-05 Thread Chris B
Senior Web Developer (Python/Django) - Joslin Diabetes Center, Boston MA Job Description: The Senior Web Developer position is responsible for leading the design, development, support and management of internal and external database driven web applications for the Research community at the Joslin

Re: Django and Online Payment Systems

2010-03-04 Thread Chris Moffitt
. -Chris On Thu, Mar 4, 2010 at 4:50 PM, MauroCam wrote: > Hi, > > has anyone got any pointers on good - preferably localisable - > integrations between a Django web-site and online payment system? > > Thanks > > -- > You received this message because you are subs

Re: Help with Date Functions

2010-03-02 Thread Chris McComas
One more question...I'm trying in my view to say if the deadline has passed to make that field as True, if not False I have this view: http://dpaste.com/166951/ This is the error I get: http://dpaste.com/166952/ On Mar 2, 10:12 am, Chris McComas wrote: > Crap my bad, just under the gu

Re: Help with Date Functions

2010-03-02 Thread Chris McComas
Crap my bad, just under the gun to get this done and I overlook easy stuff. Sorry guys, thanks so much for your help! On Mar 2, 10:11 am, raj wrote: > Now that's a pure python typo. You must add(+) datetime.timedelta to > read_receipt. > > On Mar 2, 8:01 pm, Chris McComas w

Re: Help with Date Functions

2010-03-02 Thread Chris McComas
I tried this: new_admit.read_receipt.datetime.timedelta(days=7) and I got this error: http://dpaste.com/166919/ On Mar 2, 9:51 am, Masklinn wrote: > On 2 Mar 2010, at 15:45 , Chris McComas wrote: > > > > > These are my models:http://dpaste.com/166906/ > > > I have

Help with Date Functions

2010-03-02 Thread Chris McComas
to be 7 days from that date. Here's my basic view: http://dpaste.com/166907/ How can I do that? I'm not really up to speed with the time/datetime functions in Python. Thanks, Chris -- You received this message because you are subscribed to the Google Groups "Django users&quo

Storing API Passwords

2010-03-01 Thread Chris
Hello, When working with photo API's such as twitpic, what is the best way of storing the password? Since the password needs to be sent in its natural form, hashing is not an option. I read recently heard that a company was held accountable (sued) for not encrypting their user's API passwords and

Re: what is the name of your super class?

2010-02-24 Thread Chris Hunter
Using 2.6, what I saw was that I had to ask for __bases__ from the __class__ attribute of my object. So given your example, I'd check: c.__class__.__bases__[0].__name__ And for the immediate superclass, this also seems to work: c.__class__.__base__ Chris Hunter chun...@wondertwinpowers.ne

Index Error with empty queries

2010-02-18 Thread Chris McComas
I have this in my views, if there lor1 and lor2 are both there it works fine, but if one or two of them are missing then it gives me this error. views.py - http://dpaste.com/161124/ error - http://dpaste.com/161128/ Some applicants have two LORs, some have one LOR, and obviously some don't have

Feedback on Models setup

2010-02-09 Thread Chris McComas
I have a Course Management System I've developed here at work. Faculty can login and upload lectures, course resources, etc to classes they teach, along with general course information. Students can login to view their courses, download lectures, resources, get announcements from their faculty memb

Re: satchmo customization experiences? customizing existing e-com vs. roll-your-own

2010-02-09 Thread Chris Moffitt
from but I don't see that much that you'll gain at this point. If you do decide to continue with Satchmo, let us know, I'm sure folks would be interested in hearing how it goes but I do want to make sure you go in with your eyes wide open. -Chris On Mon, Feb 8, 2010 at 11:32 AM, s

Re: satchmo customization experiences? customizing existing e-com vs. roll-your-own

2010-02-06 Thread Chris Moffitt
lative difficulty of getting them done. -Chris On Sat, Feb 6, 2010 at 12:57 PM, snfctech wrote: > I'm building an order entry and tracking system for a Food Co-op for > their case and special orders. We don't need the system to be on-line > (at the moment), but many of t

Re: If query field equals text...

2010-02-03 Thread Chris McComas
not right and threw a bad syntax error. The field rating_recommendation is a CharField in my model/db. On Feb 3, 2:58 pm, Shawn Milochik wrote: > On Feb 3, 2010, at 2:52 PM, Chris McComas wrote: > > > I'm trying to run this IF in my views, it's throwing an index out of > > ran

If query field equals text...

2010-02-03 Thread Chris McComas
I'm trying to run this IF in my views, it's throwing an index out of range error. http://dpaste.com/154249/ What have I done wrong? -- 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...@googlegroups.

Help with math functions...

2010-02-03 Thread Chris McComas
This is kinda of a general and kind of a specific question. I have this in my view: http://dpaste.com/154208/ The first line adds up perfectly, but the second one doesn't and throws an index out of range error. What is the problem? cog.interview_score and cog.interview_score_conv are both Decim

Re: help with Django model and 'choices'

2010-02-03 Thread Chris McComas
Javier, WORKED PERFECT! THANK YOU ALL SO MUCH! :) On Feb 3, 9:50 am, Javier Rivera wrote: > Chris McComas wrote: > > I tried this, but no luck: > > > new_green.hp_coursepoints = Decimal(new_green.hp_grade) * > > hp_credithours > > Decimal can't directly

Re: help with Django model and 'choices'

2010-02-03 Thread Chris McComas
is a DecimalField hp_grade is a FloatField hp_credithours is a DecimalField I tried this, but no luck: new_green.hp_coursepoints = Decimal(new_green.hp_grade) * hp_credithours On Feb 2, 2:27 pm, Chris McComas wrote: > Gleber, > > I'll try that as well. If I can just figure out how to

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Gleber, I'll try that as well. If I can just figure out how to multiply total = = new_green.hp_grade * hp_credithours Where hp_grade is a FloatField (double in the MySQL db) with hp_credithours which is a DecimalField (decimal in the MySQL db) I think they'd solve the problem. On Feb 2, 2:25 pm

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Again, this is my view: http://dpaste.com/153735/ I'm thinking the error is in someway related to this line: new_green.hp_coursepoints = new_green.hp_grade * hp_credithours The only thing I changed was changed hp_grade from a DecimalField to FloatField On Feb 2, 1:14 pm, Chris Mc

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
h. Ha On Feb 2, 1:03 pm, Chris McComas wrote: > Nope. I dropped the table completely and started from scratch. I'm > still testing it out, so there hasn't been any real data entered so I > can play around with it. I dropped the table, uploaded my new models, > syncdb, and

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
t the form and it's still not showing anything as for ha_grade or hp_grade. The drop-down for each still lists the value as 4.33 or 4.0 or 3.67 etc? On Feb 2, 12:51 pm, Shawn Milochik wrote: > On Feb 2, 2010, at 12:48 PM, Chris McComas wrote: > > > Like this? > > &g

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Like this? http://dpaste.com/153790/ On Feb 2, 12:19 pm, Shawn Milochik wrote: > On Feb 2, 2010, at 11:49 AM, Chris McComas wrote: > > > Shawn -> thnx for your help, that "hacky" fix isn't working tho... > > Sorry 'bout that. I didn't really test

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Shawn -> thnx for your help, that "hacky" fix isn't working tho... On Feb 2, 11:09 am, Chris McComas wrote: > Thnx. The reason the grade values are 4.33, 4. 3.67 etc is because > that value is multiplied by the value entered for ha_credithours and > hp_credithours. If

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
in my views that'd be fine as well... On Feb 2, 10:56 am, Shawn Milochik wrote: > On Feb 2, 2010, at 10:40 AM, Chris McComas wrote: > > > Here's my view: > > >http://dpaste.com/153735/ > > > One thing I just thought of, is it a problem that the data for >

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Here's the view... http://dpaste.com/153735/ Could it possibly be that the grade is saved in the db as 4.3300 or 4. or 3.6700 but when I view source the select on the form looks like this: - A+ A A- B+ B B- C+ C C- CR On Feb 2, 10:32 am, Shawn Milochik wrote: > Okay. Sorry, I don

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Here's my view: http://dpaste.com/153735/ One thing I just thought of, is it a problem that the data for ha_grade and hp_grade are saved in the db as 4.3300 or 4. or 3.6700 but in the on my form they're like this: 4.33 or 4.0 or 3.67 ??? On Feb 2, 10:32 am, Shawn Milochik wrote: > Okay.

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Here's my model form: http://dpaste.com/153728/ The info isn't being saved as an empty value. When I view my db with phpmyadmin, the correct values are in the ha_grade and hp_grade field in the db, the drop-down list on the forms is just not displaying them as being 'selected'. On Feb 2, 10:09

help with Django model and 'choices'

2010-02-02 Thread Chris McComas
I have this model http://dpaste.com/153722/ and I have a ModelForm for it on my site. When I complete the form it saves everything as it should and displays just a detail page for each entry with all of the correct information from the Model. When I go back to edit the form, or I view it in the CR

Re: Division with Python/Django

2010-01-29 Thread Chris McComas
Hey everyone, here's all of the information: Here's the models: http://dpaste.com/152277/ Here's my view: http://dpaste.com/152061/ Here's the full error message: http://dpaste.com/152060/ On Jan 29, 9:13 am, Chris McComas wrote: > The form is a ModelForm, where the

Re: Division with Python/Django

2010-01-29 Thread Chris McComas
The form is a ModelForm, where the fields involved, all of them are DecimalField() On Jan 29, 9:03 am, Chris McComas wrote: > Changed my view to this: > > http://dpaste.com/152061/ > > This is the full error message: > > http://dpaste.com/152060/ > > The first t

Re: Division with Python/Django

2010-01-29 Thread Chris McComas
numbers like 40 or 4 On Jan 29, 8:43 am, rebus_ wrote: > On 29 January 2010 14:40, Chris McComas wrote:> I > have this view with my form:http://dpaste.com/152046/when I try to > > submit the form I'm getting this error: unsupported operand type(s) > > for //: 'unicode

Division with Python/Django

2010-01-29 Thread Chris McComas
I have this view with my form: http://dpaste.com/152046/ when I try to submit the form I'm getting this error: unsupported operand type(s) for //: 'unicode' and 'int' what did I do wrong? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post t

Re: 1.2 alpha, multiple databases, and raw SQL

2010-01-28 Thread Chris Curvey
> > from django.db import connections > > cursor = connections['mydb'].cursor() > cursor.execute('INSERT ') > > That is, the 'db.connection' object has been replaced with an index > called 'db.connections', keyed by database alias. Each of those > connections behaves as the single connection di

1.2 alpha, multiple databases, and raw SQL

2010-01-27 Thread Chris Curvey
Is there a way to use raw SQL with multiple databases? I thought it might be something like: from django.db import connection cursor = connection.cursor(using="mydb") but that complains about an unexpected keyword arg. -- You received this message because you are subscribed to the Google Group

Re: Send and Receive SMS from a django app

2010-01-22 Thread Chris Withers
rying to rack up a load of cell phones and writing to them... Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: deploying on apache as 'raw cgi' due to checkmate from mod_python etc

2010-01-20 Thread Chris Lee-Messer
Yes, it is possible to serve django via cgi see http://code.djangoproject.com/wiki/ServerArrangements However, I would think that you would be better off one of several alternatives that use a second server to run django persistently. As one example, If you can use mod_rewrite on apache, you co

Easy database modeling question

2010-01-20 Thread Chris
This is my first Django experience and I'm having trouble figuring out the right answer to the right relationship to have. (brain fart maybe.. ) I have a site that users have profiles and can message each other. So my model looks like: class User(models.Model): username = models.CharField(max_

Re: Can I wrap the "extends" tag in an "if" tag?

2010-01-20 Thread Chris P. Vigelius
s: def view(request): ... if show_header: base_template = 'with_header.html' else: base_template = 'without_header.html' ... hth, chris -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: wsgi - apache/nginx - why use nginx?

2010-01-20 Thread Chris Czub
>1. my apache server on port 80 serves both a normal site (php) and the >django files. i would like to keep my normal site on port 80. is there >a way to keep it that way? as far as i understand the two servers must >be running on different ports. Look into what is called a "reverse proxy" e.g. Sq

Re: Send and Receive SMS from a django app

2010-01-17 Thread Chris Withers
Alessandro Ronchi wrote: I cannot use an SMS gateway for my app (I must use a SIM and an hardware modem). Why? This is not a sane requirement for a web app... Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk --

Re: Table with 4 Milions of rows

2010-01-12 Thread Chris Czub
at 3:20 PM, nameless wrote: > The table is queried from ajax using an autocomplete field with this > query in the views.py: > > books.objects.filter(book_title__istartswith=request.GET['q'])[:100] > > > > > --- > > On Jan 12, 8:47 pm, C

Re: Table with 4 Milions of rows

2010-01-12 Thread Chris Czub
It really depends on how you're selecting the data from the database. If you're doing something that necessitates a full table scan(like in-DB ORDER BY) it will slow you down considerably. If you're selecting one row from the database by an indexed column, then the performance will be very fast and

Re: {% url admin:index %} generating wrong urls

2010-01-12 Thread Chris Withers
davathar wrote: Unfortunately adding the rewrite rule mentioned as a work around hasn't worked for me. Please post the relevant section of your Apache config (including your wsgi *and* rewrite lines), there's no reason the rewrite rule workaround shouldn't work for

Re: Why there are so few open-source business applications in django?

2010-01-07 Thread Chris Moffitt
Well, I don't know the answer to your original question, but if you want to help out with Satchmo (http://www.satchmoproject.com) feel free to. It's an ecommerce framework not an HR or warehouse mgmt but maybe it will meet your needs. -Chris On Thu, Jan 7, 2010 at 4:35 PM, Mohammad Tay

Help with Django and Apache

2010-01-05 Thread Chris McComas
I have a site built with Django, we're switching things up and will be running ExpressionEngine as our main CMS for the "front-end" / marketing piece of our site. We will have two Django apps running elsewhere on the site, one is a Course Management Software we built in house, the other is an onlin

Re: Photo + thumbnail

2010-01-02 Thread Chris Moffitt
You'll probably want to use one of Django's thumbnail apps. Here's the one I recommend: http://code.google.com/p/sorl-thumbnail/* -*Chris On Sat, Jan 2, 2010 at 9:48 AM, nameless wrote: > Hi everyone I have a simple question. > This is my model: > > > class

Re: local variable 'delta' referenced before assignment

2009-12-29 Thread Chris Withers
neridaj wrote: > File "/Users/jasonnerida/django-apps/blog/models.py" in > moderate_comment > 142. if delta.days > 30: Okay, now the line numbered code for the whole of the moderate_comment function... Also, check you're not mixing tabs and spaces in th

Re: {% url admin:index %} generating wrong urls

2009-12-29 Thread Chris Withers
ch directly covered this issue so submitted a new one: http://code.djangoproject.com/ticket/12464 Sadly, Trac ate the indentation :-( cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -- You received

Re: local variable 'delta' referenced before assignment

2009-12-29 Thread Chris Withers
if isinstance(content, Tweet): > delta = datetime.datetime.now() - content.pub_time > else: > delta = datetime.datetime.now() - content.pub_date > if delta.days > 30: #failure > > > local variable 'delta' referenced b

Re: Is it ok to use double quotes instead of single quotes in Field.choices?

2009-12-27 Thread Chris Withers
Continuation wrote: > Now if I change the single quotes to double quotes, it seems to work: > (1, "I'm looking for..."), Double quotes are absolutely fine and a lot nicer to look at than 'I\'m hard to read'. cheers, Chris -- Simplistix - Content M

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
have mod_rewrite enabled. I don't think so, I've checked with the rewrite engine's logging and all the urls in question are being passed straight through. Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
uot;root url without the slash" case. I have to admit, I can't see why the script name would ever need to be trimmed like that. Graham, perhaps you might be able to shed some light with your greater wsgi experience? Chris -- Simplistix - Content Management, Batch Processing & Pytho

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
Karen Tracey wrote: > On Sat, Dec 26, 2009 at 5:32 PM, Chris Withers <mailto:ch...@simplistix.co.uk>> wrote: > > > If anyone can tell me how to do "httpd -X" on a debian or ubuntu host > I'd be very grateful... > > > /usr/sbin/apach

running "httpd -X" on debian/ubuntu

2009-12-26 Thread Chris Withers
Chris Withers wrote: > Graham Dumpleton wrote: >>> How can I step through execution from the django.wsgi file and see where >>> I get to? I'm guessing putting an "import pdb; pdb.set_trace()" in the >>> django.wsgi file won't do what I want? >&g

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
un Apache in single process mode. See > further down in same document on debugging. > > > http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Python_Interactive_Debugger If anyone can tell me how to do "httpd -X" on a debian or ubuntu host I'd be very grateful

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
lias*'s... How can I step through execution from the django.wsgi file and see where I get to? I'm guessing putting an "import pdb; pdb.set_trace()" in the django.wsgi file won't do what I want? cheers, Chris -- Simplistix - Content Management, Batch Processing &

Re: {% url admin:index %} generating wrong urls

2009-12-26 Thread Chris Withers
(although I did trace through the django.wsgi file and all the work is still done by django.core.handlers.wsgi.WSGIHandler - A workaround which solves the problem for me is to precede the WSGIScriptAlias in the apache config with: RewriteRule ^/studio$ /studio/ [R] cheers, Chris PS: I never

Re: admin interface, foreign keys and subclasses

2009-12-24 Thread Chris Curvey
one a pattern like this? (One-to-Many, where the "Many" side can be a series of subclasses?) On Dec 23, 8:58 am, Chris Curvey wrote: > this may be beyond the current abilities of the Django auto-generated > admin interface, but I thought I'd ask... > > I have a class called

{% url admin:index %} generating wrong urls

2009-12-24 Thread Chris Withers
5.2-3 Django 1.1.1 mod_wsgi 2.5-1~lenny1 apache2 2.2.9-10+lenny6 Can anyone tell me what I'm doing wrong? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk -- You received this message because you are sub

admin interface, foreign keys and subclasses

2009-12-23 Thread Chris Curvey
this may be beyond the current abilities of the Django auto-generated admin interface, but I thought I'd ask... I have a class called "Customer" which has a one-to-many relationship with "ServiceRequest". I've got that all working through the admin interface and it's working fine, like this: cla

Does Django support sockets of type SOCK_STREAM for full-duplex communication with a client?

2009-12-21 Thread Chris
'something' ) ... Could you advice on possible approaches to come up with a Django implementation of a backend that can work with such client, please? Thank you, Chris -- You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: TemplateSyntaxError: 'property' object is not iterable

2009-12-18 Thread Chris Curvey
Never mind. Me am a moron. Had a totally different programming error elsewhere. It works as is it should. On Dec 17, 4:12 pm, Chris Curvey wrote: > I have my class definition that looks like > > class Foo: >    def get_bars(self): >       bars = [] >        # do someth

TemplateSyntaxError: 'property' object is not iterable

2009-12-17 Thread Chris Curvey
I have my class definition that looks like class Foo: def get_bars(self): bars = [] # do something to collect bar instances return bars bars = property(get_bars) in my template, I'd like to do something like this: {% for bar in foo.bars %} {{bar.snafu}} {% endfor %}

Re: Format fields in list, but keep sortable?

2009-12-08 Thread Chris Lawlor
You could add a field to store the calculated size, and override the model's save method to perform the necessary calculation. Something like: def save(self, force_insert=False, force_update=False): self.size_formatted = self.width * self.height // or whatever your calculation actually is

Re: How to show site down for maintenance page

2009-12-05 Thread Chris Moffitt
Try this - http://code.google.com/p/django-maintenancemode/ -Chris On Sat, Dec 5, 2009 at 6:54 PM, zweb wrote: > What is the best way to show site down for maintenance page ? > > -- > > You received this message because you are subscribed to the Google Groups > "Django

Re: Django and Authorize.net

2009-12-02 Thread Chris Moffitt
/labs -Chris On Wed, Dec 2, 2009 at 7:17 AM, Chris McComas wrote: > Greetings, > > We have an application for our school online, just recently the > university controller and business office finally gave us clearance to > accept our application fee online, and they setup an account

Django and Authorize.net

2009-12-02 Thread Chris McComas
I was curious if anyone had done any one-off payments with Django/ authorize.net, or if there were and pluggable apps out there (I know Satchmo, that's my backup plan). Thanks, Chris -- You received this message because you are subscribed to the Google Groups "Django users" gr

Re: Request POST String

2009-11-26 Thread Chris
Awesome, that looks like it. Thanks. On Nov 26, 4:01 pm, Masklinn wrote: > On 26 Nov 2009, at 16:55 , Chris wrote: > > > Hi all, > > > Sorry for bothering you with something that is probably fairly > > straight forward but I cant seem to find the solution myself. >

Re: Request POST String

2009-11-26 Thread Chris
d to get at POST before Django tries to interpret it. Thanks. On Nov 26, 4:05 pm, Daniel Roseman wrote: > On Nov 26, 3:55 pm, Chris wrote: > > > Hi all, > > > Sorry for bothering you with something that is probably fairly > > straight forward but I cant seem to fi

Request POST String

2009-11-26 Thread Chris
Hi all, Sorry for bothering you with something that is probably fairly straight forward but I cant seem to find the solution myself. I am using Google Checkout on my site. It calls one of my pages after processing an order. It posts XML. Django seems to evaluate the XML into a QueryDict, with rat

Re: QuerySet Question

2009-11-14 Thread Chris
id and user_id='+str(user.id)}) in the view. Does anyone know if there is a way to achieve this? I tried but it didn't seem to work. Any other suggestions would be much appreciated. On Nov 13, 10:19 pm, Matt Schinckel wrote: > On Nov 14, 1:01 am, Chris wrote: > > > >

Re: QuerySet Question

2009-11-13 Thread Chris
track model (owned) that checks if the track is owned by the user in the request and then returns a bool. Thanks again. On Nov 12, 8:12 pm, Tomasz Zieliński wrote: > On 12 Lis, 16:12, Chris wrote: > > > Is there a way of getting a model function to access user details so > > th

QuerySet Question

2009-11-12 Thread Chris
Hi all, I am new to Django and I am having a little trouble. The situation: I am setting up a music selling website (similar to iTunes) for a uni project. There are Tracks, Albums and Artists as well as users via Django auth. A user can own a track. This is accomplished with a many to many field

domains vs sub-domains

2009-11-09 Thread Chris
I've recently been in discussion about which is better to have. http://media.example.com OR http://example.com/media/ 1) The first method, I've been told, allows you to make more requests. IE for example can only make like 4 requests at a given time on a given domain. but, if you use sub-domains

why deliver .csv when you want to be delivering .xls?

2009-11-03 Thread Chris Withers
). ...or you could just use xlwt and deliver the real deal ;-) http://www.python-excel.org/ That said, I'd be surprised if the templating is the problem here, it'll be the interaction with the database that's taking the time... Chris -- Simplistix - Content Management, Batc

Re: Remote developer opportunity

2009-11-02 Thread Chris Withers
the way it sets the Reply-To header to the list address... Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: Unit testing form validation issue

2009-10-27 Thread Chris Allen
Ended up populating the test database with fixtures via .json dumps. Thank you very much for your help. --- Chris On Oct 26, 6:19 pm, Karen Tracey wrote: > On Mon, Oct 26, 2009 at 4:12 PM, Chris Allen wrote: > > > Anyone have any experience with forms (ModelMultipleChoic

Re: efficiently deleting content based on how old it is

2009-10-27 Thread Chris Withers
st. The legacy database was ZODB, which was the problem. The data took up about 14GB on disk in ZODB. About 1GB in Postgres Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk --~--~-~--~~~-

Unit testing form validation issue

2009-10-26 Thread Chris Allen
a the debugger. Using a data dict instead of the actual request object. the is_valid() fails for two different forms on three fields (1 for one, 2 for the other). All three fields are choice fields. Dump of various relevant info is below. I appreciate any help anyone can offer. Thanks for your time,

ANN - Satchmo 0.9 Released

2009-10-25 Thread Chris Moffitt
ttp://www.satchmoproject.com/docs/svn/quickstart.html Thank you to everyone that has contributed to Satchmo and I look forward to finalizing a 1.0 release. -Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djan

Re: efficiently deleting content based on how old it is

2009-10-20 Thread Chris Withers
o an > objects.filter(), Well, cascading deletes do happen automatically with Django, so no problem there... cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk --~--~-~--~~~---~--~

<    2   3   4   5   6   7   8   9   10   11   >