-
Notifications
You must be signed in to change notification settings - Fork 6
Development Guide
This page contains instructions for setting up the Penn Clubs development environment for Windows. For best results, ensure that you are using Windows 10.
First, follow the instructions on the README. Read the instructions below and the troubleshooting section before starting that guide.
This repository contains several symlinks. If you are using Windows, you will need to perform additional steps to ensure they are properly reproduced in your development environment. No action is necessary for MacOS and Linux.
- You will need to enable Developer Mode by following this guide.
- You will have to enable symlinks on your repository. You can either:
-
(Recommended) Enable symlinks globally by running
git config --global core.symlinks true
. This will not update your repository if you have already cloned it, so run this before you clone Penn Clubs. -
Enable symlinks only for this repo by cloning with the
-c core.symlinks=true
flag, like so:git clone -c core.symlinks=true [email protected]:pennlabs/penn-clubs.git
-
If you have already cloned the repository, you can open the
.git/config
file, changesymlinks = false
tosymlinks = true
, and switch branches to apply your changes.
-
First, follow the instructions on the README. Read the instructions below and the troubleshooting section before starting that guide.
- Don't worry if you get the error
ERROR: Couldn't install package: mysqlclient
. Just continue on, it doesn't hurt or break anything. - If you're getting errors when first installing, try this order:
cd backend
-
$ pipenv install to install
Python dependencies. This may take a few minutes. $ pipenv install --dev
$ pipenv shell
$ ./manage.py migrate
$ ./manage.py populate
Then, to run the server locally,
$ ./manage.py runserver
We recommend using VSCode as the preferred IDE when developing on Windows. There is a penn-clubs.code-workspace
file that you can open to setup your development environment. Open this file by going to File > Open Workspace...
and selecting this code workspace file.
When you open the workspace for the first time, it will prompt you to install recommended extensions. Be sure to accept this prompt. This will install Python and Javascript code formatting tools that conform to the Penn Clubs code style guide. Some features of this workspace include:
- Proper configuration of line endings
- Proper configuration of tab widths
- Automatically format your Python and Javascript code on save
- Typescript support
- Task shortcuts to launch Penn Clubs servers
You can start the frontend and backend server using VSCode tasks. Simply go to Terminal > Run Task > Run Penn Clubs
to start up the frontend and backend server. Note that this will not install the required dependencies for you, you must first get the server running the normal way (with terminals) before using this feature. After you have successfully run both servers once, you can use this method in the future.
- It is normal to see
uwsgi
fail to install when runningpipenv install
on Windows. This package is only compatible with MacOS and Linux.pipenv
will attempt to install all other packages anyways, so this will not affect anything. - If the rich text editor is broken on the club edit page, you most likely have incorrectly configured your repository symbolic links. See this post for details on how to fix this. When the text editor is working, it is supposed to look something like this: