Malcolm Tredinnick <malc...@pointy-stick.com> writes:

> On Tue, 2009-01-27 at 17:13 -0500, Matthias Julius wrote:
>> I am trying to write a model for which the data can be represented as
>> a simple array of a fixed number of one byte integers.  To use a
>> SQL database for that would be very much overkill.  I would simply use
>> a file where I can seek to the index position and read or write that
>> byte.
>> 
>> While this in itself is not that hard to do I am wondering about how
>> to implement a model that integrates well into django (provides all
>> methods and attributes that are expected by other parts of django) but
>> does not use the database as backend but some other data source
>> instead.
>> 
>> Somehow I did not find a complete interface documentation for
>> models.Model and about the internal workings of django.  I didn't go
>> to the last resort (Read the Source!), yet.
>
> The source is the interface documentation. Python is sufficiently close
> to English that duplicating it is usually a great way not to add much
> value. What there isn't at the moment, however, is any overview document
> on what pieces do what.

The "problem" is that the source contains much more information than
just the interface documentation.  I was looking for a more condensed
version.

>
> However, I can short-circuit things a little bit: this is going to be a
> little fiddly to make it work transparently. You are either going to
> have to go down the route that Google App Engine does and provide
> replacements for the existing model fields you want to use, or write
> your own QuerySet replacement that knows how to talk to something like
> the Query class and doesn't talk to the database.

I guess I'll have to figure out how transparent it needs to be.  I
would like my app to be easily installable into another Django project
without much fiddling.  So I want things like manage.py syncdb to just
do the right thing, for example.

Thanks,

Matthias

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to