Re: Newb testing question

2008-11-04 Thread Dan Fairs
alid). This should invoke your clean_ method. Cheers, Dan -- Dan Fairs <[EMAIL PROTECTED]> | http://www.fezconsulting.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: xml web templating with python

2008-09-05 Thread Dan Fairs
template tags. http://www.djangoproject.com/documentation/templates/ Cheers, Dan -- Dan Fairs <[EMAIL PROTECTED]> | http://www.stereoplex.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djang

Re: What do you use as a build tool (like Ant or make)

2008-09-10 Thread Dan Fairs
> I haven't used any of them with Django, but for managing Zope, Plone > and Grok based web apps, zc.buildout is the current preferred tool. I use zc.buildout to manage my Django builds. Blog post coming soon (when the project's finished!) Cheers, Dan -- Dan Fairs <[EMAIL

Re: import twice when run test

2009-12-09 Thread Dan Fairs
Hi, > > > can't i put "from models import *" in the test code? what should i do? > > This happens if you import the same file using two different names. Eg, here > you are importing it as 'from models import *'. In some other part of your > code, you probably have 'from foo.models import *'. Pytho

Re: import twice when run test

2009-12-09 Thread Dan Fairs
Hi David, > models.signals.post_save.connect(flaggedentry_post_save, > sender=FlaggedEntry, dispatch_uid='mofin.store.models') Top tip - this worked perfectly. I see this is documented only on the wiki, I couldn't find it in the official docs. > I've found a useful place to put signal registrati

Limiting choices in an admin inline

2010-06-23 Thread Dan Fairs
Hi, I'm trying to limit choices in an admin inline foreign key dropdown. I have a models.py and admin.py roughly as follows: # models.py class Trip(object): title = models.CharField(max_length=50) class Departure(object): trip = models.ForeignKey('Trip') price_window = models.Foreig

Re: django session InvalidOperation

2010-12-09 Thread Dan Fairs
You'll need to post a longer stack trace, just a fragment isn't much use. Switch to the copy-and-paste view so you can copy-and-paste it :) Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are subscribed to the Google

Re: Calling a mssql stored procedure and displaying the result as a datagrid

2010-12-11 Thread Dan Fairs
? For very simple data browsing: http://docs.djangoproject.com/en/dev/ref/contrib/databrowse/ It won't cover everything you want above, though - you're probably better off writing your own view and template. If it's something you're going to reuse often, consider writi

TransactionMiddleware and 5xx responses

2010-03-03 Thread Dan Fairs
nMiddleware? Cheers, Dan -- Dan Fairs | http://www.fezconsulting.com/ -- 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. To unsubscribe from this group, send e

Re: Persistent data (other than sessions)

2008-02-01 Thread Dan Fairs
you'll need some locking around final_graph access to prevent race conditions. You might want to consider using a thread-local storage. You'll also need to unset this module-level variable (again with locking) if your underlying graph data changes. Cheers, Dan -- Dan Fairs <

Re: Start development: which branch?

2007-11-07 Thread Dan Fairs
> > Should I use trunk for development? Or is there any branch better for > development? (with regard to the introduction of newforms) I've had considerable success with trunk. YMMV :) Cheers, Dan -- Dan Fairs <[EMAIL PROTECTED]> --~--~-~--~~~

Re: Using auth in model

2007-11-08 Thread Dan Fairs
he profiles section, near the bottom. Cheers, Dan -- Dan Fairs <[EMAIL PROTECTED]> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: BdbQuit error

2007-02-07 Thread Dan Fairs
te(value='Noticias') > [0] > 39. tag.news_set.add(new) > 40. import pdb > 41. pdb.set_trace() > 42. tag.save() > Looks like your manipulators.py has a pdb.set_trace() in. That's causing

Re: Send email : from_email ignored

2010-12-14 Thread Dan Fairs
gmail) will only allow the From: header to be set to the owner of the account (myem...@gmail.com) as a spam prevention measure. I don't think this is a Django issue per se. Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are

Re: Mailing list service written in Django?

2010-12-14 Thread Dan Fairs
rward to connect Zope to a relational database - either with the built-in ZSQLMethods, or with SQLAlchemy. Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: server connection dropped? IO Error? What's going on?

2010-12-20 Thread Dan Fairs
7;/media/fonts/LeagueGothic/League_Gothic-webfont.woff') format('woff'), Now - I know precisely nothing about font embedding and all that malarky, but what are those 'funny' characters doing there - are they intentional? Could they be confusing the browser, and preven

Re: server connection dropped? IO Error? What's going on?

2010-12-21 Thread Dan Fairs
turn up debug logging on nginx? As Tom said, you might get more pointers (even if it does turn out to be Django which - to be honest - seems unlikely at this point) from the nginx list. Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because

Re: Complex serialization from models

2010-12-21 Thread Dan Fairs
Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/

Re: object appears twice after filtering by many to many field

2010-12-22 Thread Dan Fairs
side, and taking a wild stab at what your problem is without any actual code, I'd say the underlying JOIN is producing multiple rows, and you probably need a distinct() call somewhere on your queryset. Then again, that might not be the problem at all, because you haven&#

Re: object appears twice after filtering by many to many field

2010-12-22 Thread Dan Fairs
ngs are not 'slow' or 'fast' in isolation. They are either 'too slow', or 'fast enough'. Try it, it may be fast enough for you. If it's not, you'll need to find a faster solution. In particular, if the resultant filtered set is re

Re: CSRF verification failed. Request aborted.

2010-12-22 Thread Dan Fairs
iew you've got there, but as your views grow, this will become a problem. Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: TemplateSyntaxError at /admin/

2011-01-05 Thread Dan Fairs
u got this error even though you're fetching /admin/ as Django needs to load and resolve all the urls and views that they refer to. Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are subscribed to the Google Groups &q

Re: TemplateSyntaxError at /admin/

2011-01-05 Thread Dan Fairs
ich wasn't defined. Check through your code in views.py for any reference to 'form'. You'll also need to check any code you've written that's imported by your views.py for references to a 'form' that hasn't been defined - that will also cause views.py t

Re: Accessing the corresponding object for a form instance

2011-01-07 Thread Dan Fairs
> > the, in views.py: > form = PersonForm(request.POST) > form.save() # how to return person's id here? instance = form.save() print instance.id Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are subscribed to

Re: Help optimising database calls

2011-01-12 Thread Dan Fairs
k trace for each, indicating what caused the query to happen. You will also be able to see the effect of any select_related() calls you make. Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are subscribed to the Google Groups &q

Re: Thinking to change my db schema

2011-01-17 Thread Dan Fairs
e. You might find inspiration in its approach, even if you can't use it directly. Cheers, Dan -- Dan Fairs | dan.fa...@gmail.com | www.fezconsulting.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send