From 00245f396e11e79448cce7305004ab6cfb816cb3 Mon Sep 17 00:00:00 2001 From: Brandon Rodriguez <brodriguez8774@gmail.com> Date: Fri, 9 Oct 2020 00:11:01 -0400 Subject: [PATCH] Update readme --- README | 110 ------------------------------------------------------ readme.md | 41 ++++++++++++++++++++ 2 files changed, 41 insertions(+), 110 deletions(-) delete mode 100644 README create mode 100644 readme.md diff --git a/README b/README deleted file mode 100644 index c98e4ea..0000000 --- a/README +++ /dev/null @@ -1,110 +0,0 @@ -### WINDOWS ONLY ### -Python does not play well with git bash, so only run python in command prompt -#################### - - -Our branches will be named sprint_# where # is 1-9. - --- Initial setup, once you clone the repo and change to sprint branch -- -1. Change to the repo root directory django_usta -2. Install requirements - $ python -m pip install -r requirements.txt -3. The database will not be synced by git (to avoid merge headaches) - Create the initial database with: - $ python manage.py migrate -4. Create an admin user to view/edit the site: - $ python manage.py createsuperuser -5. To run in development mode, create an empty file called DEBUG in the same - directory as manage.py -6. Run the server on http://localhost:8000 - $ python manage.py runserver - --- Testing -- -To run tests for all apps -$ python -Wall manage.py test - -To run tests for just one app, for example htmleditor -$ python -Wall manage.py test htmleditor - --- Virtual Environments -- -A virtual environment allows you to install modules without affecting other -python projects you may be working on. Everything is installed into the -environment folder. Be sure to install requirements as told above if you create -a virtual environment. - -To create a virtual environment for python, in the root directory run: -$ python -m venv .venv -To activate: -Linux: $ source .venv/bin/activate -Windows: > .venv\Scripts\activate.bat -To deactivate: -Linux: $ deactivate -Windows: > .venv\Scripts\deactivate.bat -For automatic activating, add the following to the bottom of .bashrc ---------------------------------- LINUX ONLY ----------------------------------- -# Auto Virtual Env (when directory has .venv) -# Does not deactivate when leaving directory -_virtualenv_auto_activate() { - if [ -e ".venv" ]; then - # Only Execute if .venv is owned by user - if [ `stat -c "%u" .venv` = `id -u` ]; then - # Check to see if already activated - if [ "$VIRTUAL_ENV" != "$(pwd -P)/.venv" ]; then - _VENV_NAME=$(basename `pwd`) - echo Activating virtualvenv \"$_VENV_NAME\"... - VIRTUAL_ENV_DISABLE_PROMPT=1 - source .venv/bin/activate - _OLD_VIRTUAL_PS1="$PS1" - PS1="($_VENV_NAME)$PS1" - export PS1 - fi - fi - fi -} - -PROMPT_COMMAND="_virtualenv_auto_activate; $PROMPT_COMMAND" --------------------------------------------------------------------------------- - --- Database Migrations -- -Read More: https://docs.djangoproject.com/en/1.8/topics/migrations/ -Migrations will be annoying when we work on models at the same time. -It may be easier to only have one person edit models - --- Building Documentation -- -To not build user documentation use 'no-user' and to not build tech -documentation use 'no-tech': -Linux $ make SPHINXOPTS='-t no-tech' latexpdf -Windows > set SPHINXOPTS='-t no-tech' -Windows > ./make.bat latexpdf - -################################################################################ -Useful git commands: -Read More: https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-clone - -Download repo (SSH authentication) -$ git clone git@bitbucket.org:cougarvalleystudios/django_usta.git - -View branches -$ git branch - -Change branches -$ git checkout sprint_# - -To push your branch changes -$ git push origin sprint_# - -Commit changes --a means to include all changed files -$ git commit -a -m "Added feature..." - -Update last commit (before you pushed it) -$ git commit --amend - -Update last commit with new message (before you pushed it) -$ git commit --amend -m "New commit message" - -Add files to commit individually/manually -$ git add FILE - -Pull other's changes -$ git pull --rebase origin sprint_# diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..213eef8 --- /dev/null +++ b/readme.md @@ -0,0 +1,41 @@ +# Django - USTA Boys Web Dev Group Project + + +## Description +A semester-long, end-of-degree group project for the USTA Boys Tennis organization. + +Intended to help us learn full-stack web development, as well as showcase how much we've grown as developers in the +course of attending KVCC. + + +## Project Setup +-- Initial setup, once you clone the repo and change to sprint branch -- +1. Change to the repo root directory django_usta +2. Install requirements + $ python -m pip install -r requirements.txt +3. The database will not be synced by git (to avoid merge headaches) + Create the initial database with: + $ python manage.py migrate +4. Create an admin user to view/edit the site: + $ python manage.py createsuperuser +5. To run in development mode, create an empty file called DEBUG in the same + directory as manage.py +6. Run the server on http://localhost:8000 + $ python manage.py runserver + + +## Running Tests +To run tests for all apps +$ python -Wall manage.py test + +To run tests for just one app, for example htmleditor +$ python -Wall manage.py test htmleditor + + +## Bulding Project Documentation +To skip user documentation, use `no-user` and to skip tech +documentation, use `no-tech`: +Linux $ make SPHINXOPTS='-t no-tech' latexpdf +Windows > set SPHINXOPTS='-t no-tech' +Windows > ./make.bat latexpdf + -- GitLab