|
| 1 | +# Contributing |
| 2 | +We maintain tags on [our issues](https://github.com/classy-python/ccbv/issues/) to make it easy to find ones that might suit newcomers to the project. |
| 3 | +The [Low-hanging fruit tag](https://github.com/classy-python/ccbv/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22Low-hanging%20fruit%22) is a good place to start if you're unfamiliar with the project. |
| 4 | + |
| 5 | +> [!NOTE] |
| 6 | +> TLDR: The project is currently undergoing an overhaul behind the scenes with the goal of removing the need to use Django to serve pages. |
| 7 | +> Check that your changes are still relevant with that in mind! |
| 8 | +> |
| 9 | +> CCBV runs as a Django site, pulling data from a database. |
| 10 | +> This made it very fast to get up and running, and easy to maintain for the Django-using developers, but it has been a thorn in the side of the project for years. |
| 11 | +> The dataset is entirely fixed. |
| 12 | +> Any changes to the GCBVs only happen in a release of Django. |
| 13 | +> We do not need to dynamically construct templates from the data on every request. |
| 14 | +> We can write out some HTML and never touch it again (unless we feel like changing the site's styles!) |
| 15 | +> The inspection code is tightly coupled to Django's GCBVs. |
| 16 | +> There have been sites for other Django-specific class hierarchies using forks of CCBV for years. |
| 17 | +> Other class hierarchies exist in Python. |
| 18 | +> Work has been ongoing to reduce the coupling of the site to Django, with the goal of eventually completely removing it. |
| 19 | +> This will help both this project and any related ones to more quickly update after Django or library releases, and also open up opportunities for other projects to grow. |
| 20 | +
|
| 21 | +## Installation |
| 22 | +Set up a virtualenv and run: |
| 23 | + |
| 24 | + make build |
| 25 | + |
| 26 | +This will install the requirements, collect static files, migrate the database, and finally load all the existing fixtures into your database. |
| 27 | + |
| 28 | +## Updating requirements |
| 29 | +Add or remove the dependency from either `requirements.prod.in` or `requirements.dev.in` as appropriate. |
| 30 | + |
| 31 | +Run `make compile` and appropriate txt file will be updated. |
| 32 | + |
| 33 | +## Add data for new versions of Django |
| 34 | +1. Update the `requirements.prod.in` file to pin the required version of Django |
| 35 | +2. Run `make compile` to compile this change to `requirements.prod.txt`. |
| 36 | +4. Update the project's code to run under the target version of Django, if necessary |
| 37 | +5. Run `python manage.py populate_cbv` to introspect the running Django and populate the required objects in the database |
| 38 | +6. Run `python manage.py fetch_docs_urls` to update the records in the database with the latest links to the Django documentation |
| 39 | +7. Export the new Django version into a fixture with: `python manage.py cbv_dumpversion x.xx > cbv/fixtures/x.xx.json` |
| 40 | + |
| 41 | +## Testing |
| 42 | +Run `make test` to run the full test suite with coverage. |
| 43 | + |
0 commit comments