项目作者: Austerius

项目描述 :
script for automating initialization of virtualenv+django project on Windows machine
高级语言: Python
项目地址: git://github.com/Austerius/win-virtualenv-django-startup.git
创建时间: 2017-07-28T08:30:42Z
项目社区:https://github.com/Austerius/win-virtualenv-django-startup

开源协议:BSD 3-Clause "New" or "Revised" License

下载


win-virtualenv-django-startup

This script was written to help automate creation of “virtualenv” environment for Django project on Windows computer.

So, what, exactly, this script do:

  • creating new virtualenv environment with selected name in your default virtualenv folder(%HOMEDRIVE%%HOMEPATH%\Envs)
  • downloading and installing latest version of Django into
    created in previous step ‘virtualenv’ environment(Note: internet connection needed)
  • creating new Django project with selected name in selected directory
    (Note: name of the Django project is the same as a name of created earlier virtualenv environment)
  • Binding virtualenv with Django project folder(newly created one)

  • To start - just run this script from your command prompt(cmd.exe). During the execution(will take about 2-3 min),
    you’ll be asked to input two parameters: name of the project(it is also a name for your virtualenv instance)
    and Windows path to the directory, where you want to create new Django project with selected name.
    Note: virtualenv does not support parameter name with spaces!
    Also, before you start, you need to have python, pip, virtualenv, virtualenvwrapper-win already installed onto your system.

    After installation is finished, script would wrote details
    (name of the project and its folder path) into a .txt file
    named “virtualenv_django_startup.txt” located at %HOMEDRIVE%%HOMEPATH%\Envs if it’s possible.


    To bind your Django project with “intelliJ IDEA community edition”,
    you need to open a project within intelliJ IDEA and select “new…” project SDK in “project structure” menu(Ctrl+Alt+Shift+S).
    Then, chose a path to your python installation inside of the virtualenv directory
    (Usually looks like this: C:\Users\some_user_name\Envs\my_project_name\Scripts\python.exe).


    Executed commands:

  • mkvirtualenv

  • pip install django

  • django-admin startproject

  • setprojectdir