-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Jim Laney edited this page Oct 17, 2019
·
9 revisions
Prerequisites
A Python installation (3.6 or greater)
pip or easy_install
git
Step-by-step
If you don't have it already, install virtualenv:
$ pip install virtualenv
if you don't have pip, you may be able to:
$ easy_install virtualenv
Checkout the master of the gradepage project:
$ git clone git@github.com:uw-it-aca/gradepage.git
OR https://github.com/uw-it-aca/gradepage.git
Turn gradepage/ into a virtualenv:
$ virtualenv -p python3 gradepage
Activate your virtualenv:
$ cd gradepage
$ source bin/activate
Install required Python packages with pip:
$ pip install .
Create a django project in the gradepage dir:
$ django-admin.py startproject project .
That '.' at the end is important!
Modify at least the following settings in project/settings.py:
Add to your INSTALLED_APPS:
'compressor',
'django_user_agents',
'supporttools',
'userservice',
'persistent_message',
'rc_django',
'grade_conversion_calculator',
'uw_saml',
'course_grader.apps.CourseGraderConfig',
Add to MIDDLEWARE:
'django.contrib.auth.middleware.PersistentRemoteUserMiddleware',
'userservice.user.UserServiceMiddleware',
'django_user_agents.middleware.UserAgentMiddleware',
Add to TEMPLATE_CONTEXT_PROCESSORS:
'course_grader.context_processors.user',
'course_grader.context_processors.has_less_compiled',
'course_grader.context_processors.debug_mode',
Map urls to the gradepage app by adding the following to urlpatterns in project/urls.py:
re_path(r'^', include('course_grader.urls')),
re_path(r'^saml/', include('uw_saml.urls')),
re_path(r'^support/?', include('userservice.urls')),
re_path(r'^restclients/', include('rc_django.urls')),
re_path(r'^persistent_message/', include('persistent_message.urls')),
re_path(r'^jsi18n/$', JavaScriptCatalog.as_view(packages=['grade_conversion_calculator', 'course_grader']), name='javascript-catalog'),
Create the gradepage database
$ python manage.py migrate
You should now be able to run your development server:
$ python manage.py runserver 0.0.0.0:<your port>