{"id":13533576,"url":"https://github.com/nfletton/bvspca","last_synced_at":"2026-02-14T13:12:10.649Z","repository":{"id":34237490,"uuid":"98236678","full_name":"nfletton/bvspca","owner":"nfletton","description":"Wagtail/Django based website of the Bow Valley SPCA","archived":false,"fork":false,"pushed_at":"2024-05-22T19:22:06.000Z","size":3288,"stargazers_count":10,"open_issues_count":9,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-02T20:33:19.239Z","etag":null,"topics":["animals","django","spca","wagtail"],"latest_commit_sha":null,"homepage":"https://www.bowvalleyspca.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nfletton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-24T21:31:29.000Z","updated_at":"2024-08-19T15:56:55.000Z","dependencies_parsed_at":"2024-11-02T20:31:51.184Z","dependency_job_id":"d6358b59-20e7-44db-bd4a-afc756eb095e","html_url":"https://github.com/nfletton/bvspca","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfletton%2Fbvspca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfletton%2Fbvspca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfletton%2Fbvspca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfletton%2Fbvspca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nfletton","download_url":"https://codeload.github.com/nfletton/bvspca/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246713476,"owners_count":20821894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animals","django","spca","wagtail"],"created_at":"2024-08-01T07:01:21.145Z","updated_at":"2026-02-14T13:12:10.644Z","avatar_url":"https://github.com/nfletton.png","language":"Python","funding_links":[],"categories":["Open-source sites"],"sub_categories":["Package lists"],"readme":"# Bow Valley SPCA Website\n\nThe Bow Valley SPCA's mission is to provide the community with an \nadoption centre following a no kill, no cage philosophy to shelter, \ncare for and re-home stray and abandoned dogs and cats and promote \nhumane attitudes and responsible pet companionship through educational \nprograms and community leadership.\n\nSponsorship of the website build has been provided by the\n[Calgary Foundation](https://calgaryfoundation.org/) and \n[Blue Hut](https://www.thebluehut.com/). Read more \n[here](https://www.bowvalleyspca.org/credits/)\n\nThe code for the website is open source and other SPCAs, in particular,\nare encouraged to make use of the code as they see fit.\n\n## Key Website Features\n\n* Easy to use content editing interface\n* Supports news, events, team and general content management for the\n  centre\n* Integrates with [PetPoint](http://www.petpoint.com/) \n  data management system for a feed of adoptable animals at the centre \n* Animal data retrieved from PetPoint is stored locally to the website\n  to allow:\n    - end-users to interact with animal information directly\n      on the website\n    - improved social interactions with the website via Facebook and email marketing\n    - improved SEO\n    - ability to allow additional content to be associated with animals\n      that is not supported by PetPoint\n* Automated posting of new and recently adopted animals to Facebook\n* Automated regular email listing new arrivals and recently adopted \n  animals\n\n## Technical Overview\n\nThe website is built with [Wagtail](https://wagtail.io/) and \n[Django](https://www.djangoproject.com/).\n\nExperience with either Django or Wagtail will be required to make use\nof this code.\n\nCode structure based on \n[cookiecutter-django](https://github.com/pydanny/cookiecutter-django)\n\n\n## Django Apps\n\n### core\n\n### animals\nThe animals app provides the main functionality for displaying animals\navailable for adoption. The app is based around using \nPetPoint (http://www.petpoint.com/) for managing animal data. It\nprovides a Django [management command](#cronjobs) to synchronize \ncurrent adoptable animals in the PetPoint data management system \nwith an 'Animal' Wagtail page model.\n\nA PETPOINT_AUTH_KEY [environment variable](#venv) needs to be set to\nenable access to the PetPoint SOAP API.\n\nPhoto galleries on the animal details page use\n[Featherlight](https://github.com/noelboss/featherlight/) jQuery \nlightbox plugin.\n\nThe animals app can easily be modified for rescue centres\nthat do not use PetPoint by modifying the Wagtail Animal page model\nto suit their specific requirements.\n\n\n### newsletter\nThe newsletter app provides a [management command](#cronjobs) to \nconstruct and send a weekly newsletter listing recently arrived and \nadopten animals. The newsletter is published via MailChimp.\n\nThe newsletter includes:\n\n* animals arrived in the last 14 days\n* animals adopted in the last 14 days\n\n### social\n\nThe social app provides a simple queue where pages can be appended for\nlater posting to social media. A [management command](#cronjobs) is run\nto dequeue items and post them to Facebook.\n\nPages implementing the SocialMediaPostable abstract class can be added \nto the queue. Currently only the Animal page model implements this.\n\n## Deployment\n### \u003ca name=\"venv\"/\u003eEvironment Variables\nThe following environment variables need to be available in production and local environments. They\ncan be made available in `.env.production` and `.env.local` files in the project root where they are read\nat startup in `config/settings/base.py`.\n\n| Name                                 | App | Example                         | Note                                                       |\n|--------------------------------------|---|---------------------------------|------------------------------------------------------------|\n| HOME                                 | | home/bvspca                     | Project root                                               |\n| DJANGO_SECRET_KEY                    | |                                 |                                                            |\n| DJANGO_SETTINGS_MODULE               | | config.settings.production      |                                                            |\n| DJANGO_ADMIN_URL                     | | r'my-secret-django-admin-path'  | Defaults to 'djadmin' in development                       |\n| DATABASE_URL                         | |                                 |                                                            |\n| PATH                                 | | $PATH:/home/bvspca/BVSPCA/bin   | Python virtual environment                                 |\n| WAGTAIL_ADMIN_URL                    | | r'my-secret-wagtail-admin-path' | Defaults to 'admin' in development                         |\n| RECAPTCHA_SITE_KEY                   | |                                 | Google Recaptcha                                           |\n| RECAPTCHA_SECRET_KEY                 | |                                 | Google Recaptcha                                           |\n| GOOGLE_ANALYTICS_ID                  | core |                                 |                                                            |\n| ADDTHIS_PUB_ID                       | core |                                 |                                                            |\n| MAILCHIMP_USERNAME                   | newsletter |                                 | Required by 'newsletter' app                               |\n| MAILCHIMP_SECRET_KEY                 | newsletter |                                 | Required by 'newsletter' app                               |\n| MAILCHIMP_LIST_ID                    | newsletter | 83c4276af1                      | MailChimp list ID that newsletter will be distributed to   |\n| MAILCHIMP_TEMPLATE_ID                | newsletter | 351313                          | MailChimp template ID that newsletter will be created with |\n| MAILCHIMP_SUBJECT                    | newsletter |                                 | Subject line of email                                      |\n| MAILCHIMP_FROM_NAME                  | newsletter |                                 | From name of email                                         |\n| MAILCHIMP_REPLY_TO                   | newsletter |                                 | Reply to address of email                                  |\n| PETPOINT_AUTH_KEY                    | animals |                                 | PetPoint Authorization Key                                 |\n| WAGTAILADMIN_NOTIFICATION_FROM_EMAIL | |                                 | Admin From email                                           |\n| FACEBOOK_PAGE_ACCESS_TOKEN           | social |                                 | Facebook page access token                                 |\n| FACEBOOK_PAGE_ID                     | social |                                 | Facebook page id                                           |\n| FB_PIXEL_ID                          | core |                                 |                                                            |\n\n## Development Commands\n\n### Code Style Checks\n\n```sh\n  $ flake8 bvspca\n```\n\n### Tests\n\n```sh\n  $ pytest bvspca\n  $ pytest bvspca --reuse-db       # reuses the existing test db\n  $ pytest bvspca --create-db      # forces the test db to be recreated\n  $ pytest bvspca -f               # watches for changes if pytest-xdist installed\n```\n\n### Live reloading, Sass compilation and JS bundling\n\n```sh\n  $ npm start\n```\n\n### Production Sass compilation and JS bundling\n\n```sh\n  $ npm run build\n```\n\n## \u003ca name=\"cronjobs\"/\u003eManage.py Cron Jobs Summary\n\n| Command | Required by |Suggested Frequency | Note |\n|---|---|---|---|\n| clearsessions | django | daily | |\n| publish_scheduled_pages | wagtail | every hour | |\n| sync_petpoint_data | animals app | every 30 minutes | |\n| send_newsletter | newsletter app | weekly | |\n| post_social_media | social app | daily | |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfletton%2Fbvspca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnfletton%2Fbvspca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfletton%2Fbvspca/lists"}