Website for the Statistics Undergraduate Student Association at Berkeley.
- Install Homebrew
- Type commands in
Terminal
- Install WSL
- Type commands in
Bash on Ubuntu on Windows
- Install
python3
- macOS:
brew install python3
- Windows/Linux:
sudo apt-get install python3
- macOS:
- Install
git
- macOS:
brew install git
- Windows/Linux:
sudo apt-get install git
- macOS:
git clone https://github.com/SUSA-org/usa-website
to clone the repopip install -r requirements.txt
(orpip3 install -r requirements.txt
) to install requirementsgit checkout -b my_name
to create your own branch (replacemy_name
with your name)git pull origin master
to bring in latest changes- To run a local version of your website, type
python manage.py runserver
(orpython3 manage.py runserver
) into the folder that contains themanage.py
file (should be the same one as the current folder) - Visit the local URL in your browser (should look like
http://127.0.0.1:8000/
) - If you are able to see the website, pat yourself on the back!
- You can check what branch you're on by typing
git branch
orgit status
git branch
will show you a list of all the branches that you can access
- Start local test environment:
python manage.py runserver
(orpython3 manage.py runserver
) - Make changes, refresh test site
- If everything looks good:
git add -A
git commit -m 'Enter commit message here'
git push origin BRANCH_NAME
- Then visit the repository on your browser, click on "Pull requests" at the top of the page, then click "New pull request". Keep the base-branch as
master
, but change the compare-branch toBRANCH_NAME
. Then, click "Create pull request". Now wait for someone else to look through the edits to make sure nothing broke! Typos are a scary thing.
usa_website/
contains all relevant code.- HTML files are in
usa_website/templates/usa_website/
- Static files (images, css, etc) are in
usa_website/static/usa_website