On Wed, Sep 24, 2014 at 03:43:23PM -0400, Adam Stein wrote: > On Wed, 2014-09-24 at 12:03 -0700, John Schmitt wrote: > > > On Wed, Sep 24, 2014 at 07:40:51AM -0400, Adam Stein wrote: > > > Not sure what you are looking for in terms of Django template support. > > > The only difference between pycharm community (free) and commercial in > > > terms of Django support that I've noticed is that Django's development > > > web server won't restart automatically when code changes in the > > > community edition. Haven't used community edition since last year, but > > > I seem to recall, I was still able to have a task to start Django's dev > > > web server (in debug mode so I can trace through my code as you'd > > > expect), so as long as I restarted that after making changes, things > > > were fine. > > > > I've been hearing about pycharm lately, sounds great. I'm a command line > > guy so I normally ssh to my server where I fire up my editor and hack away. > > > > What do you do with a GUI IDE like pycharm? That is, how does your > > edit/run/debug cycle work with a pycharm et al? Can you still edit the > > 'live' files for your django project? > > > > My imagination says that I would sshfs mount the server's file system and > > then pretend that the files I'm editing are local. Do I still need to ssh > > to the server and manually restart httpd or launch manage.py as needed? > > > > John > > > > > Is your server your production machine? By that, I mean, do you install > your files somewhere else once you are done making changes to another > server where it's "officially" used? I ask because you really don't > want to be editing live files where "live" means what your customers (or > yourself) are really using. > > I develop locally, then deploy to a remove server only when changes are > done and tested. Therefore, my edit/run/debug cycle with PyCharm > consists of running Django's web server (./manage.py runserver) on my > local machine through PyCharm's debugger so that I can step through the > code. I also have PyCharm set up to run various unit tests (also useful > if I need to step through unit test code). I don't restart httpd, > because that is running on the remove server and only needs restarting > when my code is deployed. In the case of restarting Django's web > server, PyCharm's professional version ($$$) has the ability to restart > it for you if you have it running within PyCharm. For the community > version, you have to restart it yourself which is as simple as clicking > a "restart" button. > > If your files live somewhere else, you can mount the file system as > you've mentioned. Performance might be better if the files were local, > but that's true anytime you go across a mounted file system.
I appreciate what you said about deploying and not editing "live" files directly. However, I have several projects in various stages of development and when I first start a project, I don't have anything to deploy, I edit everything "live". When it's in production and users are counting on it being up, then I would rather not touch the running machine. When I'm creating a dummy project to test my apache configuration and/or my management commands, or trying to assemble a complicated query, I do it "live" on the VM on which I created the playground project. Another use-case I have is that my workstation is sometimes far removed from my development machine. My workstation is either a Linux machine or sometimes a laptop via VPN over wireless. Tmux and vim/emacs are glorious workhorses for this scenario and I have a hard time envisioning that same level of convenience from an IDE. I guess I was hoping that someone had found something magical that was at least this convenient. In case it isn't obvious, I'm a django nub and probably do not know about many best practices. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20140924213058.GF26562%40mediapc.snapdragonfly.net. For more options, visit https://groups.google.com/d/optout.