-
Notifications
You must be signed in to change notification settings - Fork 13
Getting PawPrints
The following guide will outline steps to deploy and use PawPrints for your school or organization. This guide assumes that you have a machine to deploy to and are using nginx.
Follow the installation guide
As mentioned in the installation guide, after you get the code you must copy template.env
to .env
. This file specifies many of the configurations needed to run the app.
SECRET_KEY
: This is used by the Django framework, make sure you generate a long key and do not share it.
SERVER_ENV
: This is used to configure the app for a specific environment. The three options are prod, stage, and local. If you are testing locally set it to local, it will enable displaying the stacktrace if an error is encountered. Otherwise set it to prod to prevent leaking credentials.
DB_XYZ
: These are used for setting the db credentials. Using the default values is fine.
EMAIL_XYZ
: These credentials are used by the app to send emails to users when a petition gets a response, approval, ...etc
GOOGLE_ANALYTICS
: If you plan to use Google analytics, place your analytics property id
All other variables can be left as their default value.
PawPrints is designed to use Shibboleth SSO for authentication. You will have to modify both saml/advanced_settings.json
and saml/settings.json
to use your organizations idp. You will then have to modify auth/auth_backend.py
to use the correct attribute values for your organization and correctly store the Django user object with the correct data.
Metadata is located at the /saml
endpoint.
Currently there is no support for any other authentication method, but since PawPrints is heavily coupled with Django User authentication, it would be straightforward to implement a custom authentication backend and add it to the application.
The config.yml
file contains configurations for text and images that are used throughout the app. Change all of these to fit your organizations requirements.
All images should be stored in static/images
. When using this app make sure you generate all the necessary icons and files (browserconfig.xml
, manifest.json
). Ensure config.yml
is updated with the correct names for the images.
petitions/templates/about.html
will have to be changed for your organization. In the Vue.js wrapper code, there will be a section that looks like the following
{
title: "About",
body: [
"<h3>HISTORY</h3>",
"Student Government President Ashley Carrington and Vice President Tyler Pierce (2014-2015) sought to improve engagement of RIT Students through a Petition site. The site creates a place for the RIT community to converse on important issues.",
"To remain transparent, this site is an open source project available on <a class='text-underline text-highlight' target='_blank' href='https://github.com/ritstudentgovernment/PawPrints'>GitHub.</a>"
],
style:"white-background",
active: false
}
These should be modified or removed for your organization.
In config.yml
you will either want to remove the small top nav or keep it. If you would like to keep the top nav you will have to create your own. The nav code should be put in the petitions/templates/header.html
file, in-between the {% if generate_top_nav %}
and {% endif %}
lines.
Once you have all of the following setup, you can run the app. Simply run docker-compose up -d
which should bring up the application in the background. For more details information, see installation and the FAQs.
Once you have the app running, you will want to generate the tags that you defined in config.yml
. To generate the tags, simply run docker exec -it pawprints_web_1 python manage.py createtags
. This will put the tags into the database.
You will want to create an admin so that you can add other staff and admins from inside the app. You will first have to log into the app with the account you would like to become admin. After logging in, run docker exec -it pawprints_web_1 python manage.py createadmin <email_address>
. This will set that user as an admin. From this point on, you can add admins and staff members from within the app in the Admin Panel located at https://yoururl.com/profile/manage/staff
Nginx is used as the reverse proxy for the app. You will need it to serve the static assets located in the static
directory. If you would like social media sites to pick up petition descriptions, you will also need to point crawlers/bots to the bots/<petition_id>
endpoint.
Since PawPrints is student run, we do not have much time to support other organizations with issues, but feel free to send an email to [email protected]
if you have any questions.