-
Notifications
You must be signed in to change notification settings - Fork 1
October 2017
The task for today was to get everyone up and running with Django.
- Install Python 3.
- Install
pip, the Python package manager. - Make sure
pythonandpipare on your PATH. Mac/Linux users may have to usepython3andpip3. - Install
virtualenvby entering the commandpip install virtualenv. For this and other commands in this section, you might need to run usingsudo. - Create a virtual environment for your Django installation:
- Navigate to the folder where you want your Django virtual environment to be saved.
- Create a new virtual environment:
virtualenv hackenv - To activate the virtual environment, type
source hackenv/bin/activate(on Mac/Linux) orhackenv\Scripts\activate(on Windows). Your terminal prompt should change to reflect the fact that you are now in a virtualenv. (Note: You can deactivate the virtual environment at any time by typingdeactivate.) - Check which packages are installed in the virtualenv by typing
pip freeze. There shouldn't be any listed right now. - Install Django with
pip install django.
- Make sure you are in your virtualenv. Start a new Django project with
django-admin startproject hack_test. This will create a new folder calledhack_testin the current directory. -
cdinto thehack_testdirectory. - Start the development server with
python manage.py runserver. Point your browser athttp://127.0.0.1:8000to see if it worked!
Open up the hack_test folder in the editor/browser of your choice.
- Your
hack_testdirectory should have anotherhack_testdirectory inside of it. Inside of this folder, create yet another subfolder calledtemplates. - Inside the
templatesfolder, put a basic HTML page, sayindex.html. - Go to
settings.pyand add the following:- Add
'hack_test'to theINSTALLED_APPSlist. - Add the following variable:
TEMPLATE_DIRS = (os.path.join(BASE_DIR, 'templates/'),)
- Add
## Meeting Minutes [October 2017](https://github.com/HackMichiana/Organization/wiki/October-2017)
[September 2017](https://github.com/HackMichiana/Organization/wiki/September-2017)
[January 2018](https://github.com/HackMichiana/Organization/wiki/January-2018)
[February 2018](https://github.com/HackMichiana/Organization/wiki/February-2018)
[March 2018](https://github.com/HackMichiana/Organization/wiki/March-2018)
[April 2018](https://github.com/HackMichiana/Organization/wiki/April-2018)
[May 2018](https://github.com/HackMichiana/Organization/wiki/May-2018)
[June 2018](https://github.com/HackMichiana/Organization/wiki/June-2018)
[July 2018](https://github.com/HackMichiana/Organization/wiki/July-2018)
[March 2019](https://github.com/HackMichiana/Organization/wiki/March-2019)
[April 2019](https://github.com/HackMichiana/Organization/wiki/April-2019)
[June 2019](https://github.com/HackMichiana/Organization/wiki/June-2019)
[July 2019](https://github.com/HackMichiana/Organization/wiki/July-2019)
[August 2019](https://github.com/HackMichiana/Organization/wiki/August-2019)