elpy icon indicating copy to clipboard operation
elpy copied to clipboard

Copy ideas for Django support

Open jorgenschaefer opened this issue 9 years ago • 8 comments

https://code.djangoproject.com/wiki/Emacs

jorgenschaefer avatar Dec 25 '14 20:12 jorgenschaefer

I think, - it's not a good idea to support frameworks in core of elpy. Maybe, separate package for it will be better.

ghost avatar Dec 25 '14 20:12 ghost

Could you elaborate a bit as to why you think so?

Support for frameworks like Django is rather common in IDEs, and Elpy already supports specific conventions and libraries like py.test/nosetests etc.

jorgenschaefer avatar Dec 25 '14 20:12 jorgenschaefer

Yes, django support is a good to grow in popularity. But a lot of code is difficult to maintain. You're not always going to have a lot of time. Eply - good product. And I do not want it to be enormous and difficult to maintain. Lots of good products was spoiled when they become enormous, and Django too. I prefer a KISS principle. I'm working with django every day for last 6 years. Elpy is excellent for Django currently. I'm not sure that elpy need a lot of extra and unnecessary code.

ghost avatar Dec 25 '14 20:12 ghost

elpy. blew. my. mind. it's the best package for python development.

However, elpy is NOT sufficient for django development.

Consider this

  1. running management commands
  2. django shell
  3. django snippets/template tags
  4. extending package for fabric/supervisor support and so on

@jorgenschaefer you could add django features in elpy itself & provide a way to turn on/off django features or as @emacsway-qarea said a new package should be developed for django.

ChillarAnand avatar Feb 05 '15 06:02 ChillarAnand

Thank you for the feedback!

However, elpy is NOT sufficient for django development.

I develop django applications with elpy all the time. :-)

  1. running management commands

Do you mean parsing django-admin.py output for possible commands and providing a menu to select which to run? If yes, how would you specify arguments? If not, what did you mean?

  1. django shell

You mean running django-admin.py shell for C-c C-z? Good idea.

  1. django snippets/template tags

Indeed.

  1. extending package for fabric/supervisor support and so on

Do you have specific ideas for this?

jorgenschaefer avatar Feb 05 '15 06:02 jorgenschaefer

Do you mean parsing django-admin.py output for possible commands and providing a menu to select which to run? If yes, how would you specify arguments?

We can specify arguments via a popup(like magit or dired)? Otherwise we can also have some specific management commands like pony-mode

Do you have specific ideas for this?

There is django-supervisor to inetgrate supervisor with django. So there should be some way to extend elpy to support such packages.

ChillarAnand avatar Feb 05 '15 07:02 ChillarAnand

Otherwise we can also have some specific management commands like pony-mode

pony-mode looks nice. Elpy could suggest it for Django users (no need to reinvent the wheel) – is there anything Elpy can do to make integration with pony-mode better?

So there should be some way to extend elpy to support such packages.

django-supervisor is pretty specific in the workflow requirement, I'm not sure that's something Elpy can or should prescribe to users. If you have specific ideas on what Elpy can do to make life easier to support, as opposed to prescribe, such a package, please do let us know!

jorgenschaefer avatar Feb 05 '15 07:02 jorgenschaefer

Need to provide support for templates.

When user is in a template(*.html), elpy should try to figure where the template is referenced and has to find out the context that has sent to the template.

By this we can have python code completion inside a template. Since we know the type of variables, we can have auto completion for django filters.

Also if user extends a template from another template and when he tries to create a new block, elpy should be able to provide auto completion for the block names(may be?).

ChillarAnand avatar Apr 30 '15 09:04 ChillarAnand