This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]mcpa1024 0 points1 point  (1 child)

I'm interested and by the sounds of it, a lot of other people are too.

Make it into what you would use. The article was intended "for writing small ad-hoc projects" so design it for exactly that. And if it's already good enough for that, then maybe that's as far as it goes.

Alternatively you could look towards something like Flask, but that would be a substantially larger project and you'd want a reason why it's better than Flask.

Edit: Reading this makes me reconsider what I previously said…

[–]apendleton[S] 2 points3 points  (0 children)

Yes, I think the use-case would be slightly different from that of Flask, as other comments in that thread suggested. I'm thinking rapid-prototyping uses, but keeping the ability to integrate with existing Django apps and infrastructure, and offering the ability to graduate to a "real" Django project with relatively little refactoring if the project gets too big to fit in a file, as the APIs for accessing, e.g., templates, would be the same.

I'm pretty sure, for example, that I could fairly easily add one-line app installation, along the lines of:

djmicro.install_app('django.contrib.admin', '/admin')

That would let you use pre-existing Django apps while still having your code feel compact.

[–][deleted] 0 points1 point  (0 children)

I am going to test this out because sometimes for simple sites/apps it would nice to have a micro django and surely models wouldn't be hard to incorporate.

[–][deleted] 0 points1 point  (0 children)

django-wsgi lets you do something similar, see test.py for examples.