D
D
Dmitry Filatov2014-08-22 10:46:48
Django
Dmitry Filatov, 2014-08-22 10:46:48

How to setup Django runserver fast start?

Hello.
I often (and really like) use Django.
Used:
Win 7
Sublime 3
virtualenv + virtualenvwrapper
Now the dev server is launched like this:
1. I open CMD
2. CD to the folder with anage.py
3. I activate the project environment
4. python manage.py runserver
I didn’t notice before, but now I feel that tired of doing the same thing over and over. I would like to set something up once, and then let it go by pressing one button.
Advise convenient options, ideally with a brief info or a link to such info.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sim3x, 2014-08-22
@i_dozi

add to the end of ~/.virtualenvs/PROJECTNAME/bin/postactivate
there may be a bat file, xs how it is there in Windows

cd  <к папке с manage.py>
python manage.py runserver

workon PROJECTNAME

M
maxaon, 2014-08-22
@maxaon

Write a batch file or something. If you don't want a batch file, write a Python script and make an association to py files.

R
Rrooom, 2014-08-22
@Rrooom

Switch to nix-like OS, the console is always open, there are fewer actions.
Pycharm automatically picks up venv, one-button launch.
You can write bat scripts to run.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question