Initial Django Setup for itstock project
The following steps assume you’ve completed part 1 :http://www.davegernon.co.uk/techblog/django-setup-with-virtualenv-pycharm/
- Re-activate your virtual environment (where /code/env is the location you created the virtualenv)
<span class="gp">$</span> source ./code/env/bin/activate
- cd into the parent directory of the virtualenv (/code/) in this example:
<span class="gp">(env)$</span> cd ./code
- Create the django project named itstock:
(env)~/code/itstock$ django-admin startproject itstock
- Now setup Git on the ./code/itstock directory by:
(env)~/code/itstock$ git init ./ (env)~/code/itstock$ git add ./ (env)~/code/itstock$ git commit
- **Next setup connection to the Bitbucket remote repository via:** cd to the core directory of the project:
(env)~/code/itstock$ cd ./itstock
-
(env)~/code/itstock/itstock$ git remote add origin git@bitbucket.org:<username>/<name of repo> (env)~/code/itstock/itstock$ git push -u origin --all (env)~/code/itstock/itstock$ git push -u origin
-
**Integrate Bitbucket Git repo to Pycharm:**Launch pycharm and select the core directory [~/code/itstock/itstock in my case] as the location for the projectDownload the Bitbucket plugin from https://plugins.jetbrains.com/plugin/?pycharm&id=6207Within Pycharm click : File > Settings > Plugins > Install plugin from disk…
Then select the downloaded zip file and install.
I got a bit lost then, you need to add the Bitbucket repo in when you want to push, maybe start with a PULL request to define that and then work from there.
- Ensure the db is migrated:
Back in the terminal:(env)~/code/itstock$ python manage.py runserver <IP>:8080