开发者

django app using amazon aws s3 storage in stead of DB?

I'm looking at django for a rapid proto开发者_运维技巧type to a photo sharing app with an amazon aws s3 storage back end.

However, as far as I can tell, Django is tailored toward the typical database MVC type of pattern. is there a way to for example provide a custom Django model implementation that talks to s3 in stead of a DB? a custom DB engine? would either of these be practical, or am I looking in the wrong direction?


S3 is best used for storing binaries, and databases are best for storing text (although, of course, exceptions exist). My recommendation is to store the filenames and version numbers in DB records, and keep the binaries in S3.

To answer your other question, you are free to rewrite Django's model layer (as done by django-nonrel and, more relevant to AWS, django-simpledb), or not to use it at all, although the latter would make me question whether Django was really necessary in the first place. After all, if you're just using it for routing and serving up templates, you could use something lighter like web.py or DENIED.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜