Closed geekpradd closed 9 years ago
Thanks for contribution. I'll go over it this week. I might requirest some changes in code style. Hope you don't mind.
@squ1b3r .. No problem. Just tell me what changes you need and I'll deliver. I've been dying for a new open source project to contribute to.
Hmm, I don't think that doing all this through a python code is actually a good idea. Wouldn't it be better to just call a django-admin.py startproject
command directly using python's subprocess.call
and let it handle the rest?
You could ask a user for a name and destination and go from there. Otherwise, it's just really messy.
And btw, I would suggest reading about pep8 and install something that checks your code styles accordingly.
I've improved the code. It's PEP8 based now. And using django-admin.py is a viable idea but I wanted everything to be done from Sublime Text itself. I won't call it messy now (the earlier commit was) and it should work as long as django does not incur a drastic update.
Also using 'django_admin.py' can be problematic on Windows especially if multiple Python installations are present. It would work on Linux but in my opinion this is better.
Do let me know whether you want to merge or not.
Thanks. This does look better. Though, upper case names for functions is nowhere near to pep8 :)
I like the idea, but I don't really like the implementation. It's unreliable in case if something changes in Django and the format of Django settings has changed quite a bit for the last few years and there is no way to understand what version of those this plugin would create. I also don't really like the idea of redoing something that Django does way better, which is the basic violation of DRY.
Most of us out there uses virtualenv for working with Django so this is might be a way to go. Ask a user for path to Django in virtualenv or in the system and use that to call django-admin.py startproject
.
Probably it would be nice to integrate into ST's project files and add some project related setting like path to virtualenv or to a local installation of Django and project Python interpreter.
I really thankful for your contribution but I cannot accept this in its current implementation. This will do more hard than good and I don't want to struggle with this in the future. I already have a few contribution where people added something and disappeared and I now need to deal with all those issues that popped up.
So, I'm closing this for now. I'll try to find some time to work on this and maybe will come up with something. You are more than welcome to help. We can discuss this in issues or somewhere else if you want.
Well, firstly this plugin is awesome and very helpful whenever I'm coding Django Sites. One thing about Django that sucked (well to me) that to create a project, I have to use django_admin.py to create and config all the files. Well the Plugin that I've created (and added to this fork) minimizes all of that and does most of the grunt work (setting up the files) itself. Creating Django project from Sublime Text itself.
It's compatible with both ST3 and ST2. Hope you merge my fork. I'm using this fork on my local machine and it's working nicely.