[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 structure that I can pass to Django
> templates.
> 
> 2. If I convert data in just another format that still needs to be
> converted to Python structures I am somewhat more advanced but still
> not in a perfect situation.
> 
> 3. I would like my Python data to be available to Django on every web
> request without me having to check on the local disk if a file has
> changed, etc. This is why I have been thinking about another thread
> that would just update data when required and structures would be
> available to Django immediately.

[elsewhere]
 > However, I would like to stay away from a
 > database at this point. The information I need to
 > present comes from an existing database which I
 > have to access through the XML I was talking about.

I think you're making things complicated - you don't want to deal with a 
database but do want to pass marshaled python structures into django 
templates.  Don't do an end run around the framework. The way to go 
about this is to pull down the XML scheduled via cron or some other 
timed process, marshall it to an object and save() that object into a 
table. That way your django template/view code knows nothing about where 
the objects are coming from, how they are constructed, or how often they 
should check for freshness; and if this data is as complex as you say 
marshalling and storing in another process seems sensible.

cheers
Bill

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to