Closed if1live closed 10 years ago
I find this very interesting. Let me play with it a bit. Never used flask-blueprint before.
I think that it would be more interesting to integrate better django apps with importd, not having its own method of extension.
I sort of agree with @santagada. I would prefer importd projects to be as close, conceptually, to vanilla django projects as possible.
I want to use namespace that feature of django. But, current importd doesn't support it. It is hard to manage many url with importd. So, I suggest blueprint.
Question 1. Do you agree concept of blueprint?
Question 2. If below code is possible, is it acceptable?
d(
...
mounts={
"app2": "/app2/",
"app3": {
'url_prefix': 'app3/',
'blueprint': 'app3.views.bp',
}
}
)
Hmm.
importd indeed places a limitation which is not there in vanilla django projects: https://github.com/amitu/importd/issues/37#issuecomment-59171155.
I think I like blueprint too. I am confused.
Can you, please, merge master into it and I will merge it.
Also, if possible, please add some docs in README, ChangeLog and in docs :-). A tutorial would be most helpful as many people in django would not know about blueprint, and we can not really refer them to flask/blueprint docs as that could be confusing/incompatible.
Hey @if1live,
Please merge my master into this branch. I can not auto merge it, and tho I can manually fix it, I would much rather have the change come from you as you did the hard work and I want git to reflect that.
Could you wait 4-5 day? I'm on midterm-exam.
Sure, no problems. Best of luck for exams :-)
Writing document with english is hard to me. And writing document will consume long time.
If you suggest some good interface to integrate blueprint into importd, I will apply it.
Thanks a lot for fixing the pull request.
Regarding 1: I would prefer if you updated docs folder instead of wiki, so everything can remain in git.
There is one problem with this approach. In django one can typically use the same app more than once on different URLs.
Can "blueprint" apps too be used more than once?
Though its a thin useless I still want to be sure.
This pull request is #37.
I make something like flask blueprint. concept: Lazy adding view.