Re: WebServices datasource

2006-09-06 Thread Bill de hÓra
Marc Fargas wrote: > Hi, > In reference to [1], what would be the best way to provide a > datasource for a model that is backed on a WebService ? > > Image you have a webservice that returns "customer objects", then I'd > like to have a model called Customer on which to use .objects.all() > and s

Re: How do I parse XML in a Django view?

2006-08-18 Thread Bill de hÓra
Mike wrote: > Yes to both. I'm assuming the url configuration is correct because if I > attempt to use regular file reading and writing everything works fine > and if I change the name of the file I'm parsing to something that > doesn't exist, the page throws an error. The file is readable and > w

Re: Invalid character error using Oracle backed

2006-08-08 Thread Bill de hÓra
Malcolm Tredinnick wrote: > For now, if you want to hack on the source for your initial > testing/debugging, have a look in django/core/management.py around line > 206. There's a line that says > > r_name = '%s_refs_%s_%x' % (r_col, col, abs(hash((r_table, > table > > (it's

Re: Protecting files

2006-08-02 Thread Bill de hÓra
Todd O'Bryan wrote: > Part of my webapp will include a place for users to upload files that > they can save on the server. I teach high school, and this is mostly > designed as a way for students to quickly upload files so that they > can transfer them from home to school and vice versa. >

Re: hiding fields in admin

2006-07-27 Thread Bill de hÓra
Tamara D. Snyder wrote: > I don't know. My slug field looks like this: > > slug = models.SlugField( >'Slug', >prepopulate_from=("title",), >help_text='Automatically built from the title - do > not fill in yourself.', >

Re: hiding fields in admin

2006-07-27 Thread Bill de hÓra
Tamara D. Snyder wrote: > It just makes the field not editable. Actually, it looks like you > can edit the field - type in new stuff, etc. - but when you hit save, > that field is not saved. This is fine with me, because what I > *really* wanted was to keep knuckleheads from changing the s

Re: Not failing silently on undefined variables in the template system?

2006-07-26 Thread Bill de hÓra
the template, thus duplicating the information and rendering my code > harder to maintain. > > Guillaume > > Le mercredi 26 juillet 2006 14:10, Bill de hÓra a écrit : >> I'd say verify the variable set in the view before you emit and fail at >> that point. Failing at t

Re: Not failing silently on undefined variables in the template system?

2006-07-26 Thread Bill de hÓra
Guillaume Pratte wrote: > In http://www.djangoproject.com/documentation/templates_python/ you can read : > >In Django 0.91, if a variable doesn't exist, the template system fails >silently. The variable is replaced with an empty string. > > This is controlled with the silent_variable_fa

Re: Search Engine for Python and Django

2006-07-25 Thread Bill de hÓra
Wade Leftwich wrote: > Solr does look good. I'm checking it out along with NXLucene > (http://www.cps-project.org/sections/projects/nxlucene) , which is a > similar architecture (search server with an XML API), built with > pyLucene and Twisted. From A Zope World Perspective NXLucene looks good

Re: Django, I am almost ready to make the jump, here some doubts ?

2006-07-12 Thread Bill de hÓra
Iván Alemán wrote: > I mean that actually we're using LAMP environment plus other goodies > like Dojo, so the refined question (hopefully) is, can I integrate any > django project to my actual PHP/MySQL environment with minimum effort > so later (after publishing) we can start worrying about movi

Re: POST to view loses POST data

2006-06-18 Thread Bill de hÓra
Bill de hÓra wrote: > Luke Plant wrote: >> Long version: >> request.POST is (essentially) a dictionary of post variables. As such, >> if it is empty, it evaluates to False, even if the request method is >> 'POST'. > > That's a bug, imo. Nev

Re: POST to view loses POST data

2006-06-18 Thread Bill de hÓra
Luke Plant wrote: > > Long version: > request.POST is (essentially) a dictionary of post variables. As such, > if it is empty, it evaluates to False, even if the request method is > 'POST'. That's a bug, imo. cheers Bill --~--~-~--~~~---~--~~ You received th

Re: Presenting information from an external system

2006-06-10 Thread Bill de hÓra
[EMAIL PROTECTED] wrote: > Hi, > > I understand the suggestion and it does make sense, as do the other > that have been suggested. However, I am thinking about the following > issues: > > 1. The data that I am consuming (XML) is a pretty complex structure. I > want to convert it to a Python stru

Re: Post data for multi step form

2006-05-24 Thread Bill de hÓra
tomass wrote: > Hi Folks, > > I'm sure there's a better solution for this, just not sure what it > is... > > I have a 4 step form and I'm currently capturing all posted data > between each step and then re-posting it through hidden input fields > and recapturing it at each successive step. URL r

Re: How fix the "feature" of not serving static files?

2006-05-24 Thread Bill de hÓra
[EMAIL PROTECTED] wrote: > For example, the "feature" of not serve static files. The worst? I > don't can relly in the available workarounds to this "feature" (yeah I > put "feature" for be sarcasting... I understand the reason, the why, > but be patiente: I have a deadline too and this experimen

Re: Best practice for separating Model and Control?

2006-05-16 Thread Bill de hÓra
lcaamano wrote: > We're not using Django yet but I think I have a good idea of how we'd > use it in our framework. I'll try to summarize that in a few > paragraphs, which hopefully will give you another idea of how to deal > with the problem you present. > > We use two modules per table, one has

Re: passing values into form templates

2006-05-15 Thread Bill de hÓra
Bill de hÓra wrote: > So after catching the source URL off the POST request, and before > forwarding to the template, I seem to have two choices: > > - write the link into the FormWrapper/AddManipulator configuration's > data. > > - pass the link along as ano

Re: add the same fields to all my models: inheritance?

2006-05-15 Thread Bill de hÓra
gabor wrote: > so, is everyone just cut&paste-ing all this stuff into every model? I am :) I do it a lot for date based stuff (created/modified) to support admin/generic views. But whenever it gets figured out all I'll have to do is change the superclass and delete some cruft - not so bad. Bt

passing values into form templates

2006-05-15 Thread Bill de hÓra
Hi, I have this forms contortion where a default value in the form varies based on the initial use choice, and I'm looking to see what's the sanest way to support it in django. It goes like this: User on any page can from a selection state a type of feedback ("this page", "this site", "other"

Re: Django without database

2006-05-14 Thread Bill de hÓra
Bill de hÓra wrote: > For models and admin usage your storage will need to meet the DBAPI > contract. I think it can be done, but with considerable effort. I think > I'd wonder why bother tho' - the main reason I cna think of is for the > CMS case where users can create

Re: Django without database

2006-05-14 Thread Bill de hÓra
Karl Fast wrote: > Can anyone point me to examples of django apps that either do not use > a database, or use it for only part of the app? Looking for source. > > I'm specifically interested in examples with models that use other > persistence backends (like a config file), and the associated > v

Re: Fate of 0.91 projects

2006-04-14 Thread Bill de hÓra
> On Thursday 13 Apr 2006 6:54 pm, Adrian Holovaty wrote: >> Depending on demand, we may release a final pre-magic-removal >> release of Django -- maybe 0.91.1 or something. Or maybe it'll be >> 0.92 and magic-removal will be 0.95, to signify it's a big leap. >> Thoughts? I think your next relea

Re: Django vs Rails

2006-04-13 Thread Bill de hÓra
tonemcd wrote: > I was surprised at how well Zope (Plone actually) comes out of it. I > guess he was using Archetypes to do the heavy lifting - I've found > plone to have a *very* steep learning curve. I think he used ArchGenXML. Archetypes are cool (they're a slightly higher abstraction/dsl th

how to process dictionaries in templates

2006-03-02 Thread Bill de hÓra
I'm trying to understand how dictionary lookups work in templates. To that end I'm passing in a dictionary of lists like this, allyears = {"2002":["a","b","c"], "2003":["a","b","c"]} return render_to_response('press/inthepress_index', "allyears":allyears,) into the template, ie in the w

Chuck Norris on Django

2006-01-28 Thread Bill de hÓra
Maniac wrote: > > Guido van Rossum: >> Django's templating language is rich and powerful, but it doesn't look > very Pythonic >> to me -- in fact, it's so rich and powerful that it might as well be PHP Django is so rich and powerful, Chuck Norris uses it. cheers Bill

Re: Comments on Ruby code slides from Snakes and Rubies?

2005-12-19 Thread Bill de hÓra
braver wrote: > I was reading > > http://www.loudthinking.com/arc/000545.html > > and it has an emphasis on Ruby's "beauty", and parsimony, as > demonstrated by the code excerpt (David: "I was more surprised to learn > that someone would actually prefer something like"): > > class Project(meta.

Re: approaches to deployment

2005-10-22 Thread Bill de hÓra
Brett Parker wrote: > Bill de hÓra <[EMAIL PROTECTED]> wrote: > >>>How are you guys managing Django deployments? I'm tending towards upload >>>to server and reset the symlink (a bit more if the DB is changed between >>> releases), and was wondering

approaches to deployment

2005-10-22 Thread Bill de hÓra
How are you guys managing Django deployments? I'm tending towards upload to server and reset the symlink (a bit more if the DB is changed between releases), and was wondering how other folks are doing this. cheers Bill