Skip to content

Commit 1ed9580

Browse files
ghickmanmeshy
authored andcommitted
Rewrite the README to be clear and succinct
This modernises the project's README to match the current state of the project (ie dropping tools we should look at), tidies up the prose to be more succinct, and splits out contribution docs to CONTRIBUTING.md. The contributor docs have been streamlined to point to the `make` commands where possible. I've also added a section from #245 on where the project is going. It's a long piece of work so my hope is this sets expectations without making the maintainers feel bad when folks raise a PR for defunct or soon-to-be-removed code paths.
1 parent 97a83e9 commit 1ed9580

File tree

3 files changed

+53
-111
lines changed

3 files changed

+53
-111
lines changed

CONTRIBUTING.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+

README.markdown

-111
This file was deleted.

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# [Classy Class Based Views](https://ccbv.co.uk)
2+
3+
Django's Generic class-based views provide a lot of common functionality to users.
4+
However, they are made up of up to nine, at the time of writing, parent classes or mixins.
5+
Knowing what functionality comes from which parent class/mixin is a tricky proposition.
6+
7+
CCBV provides a breakdown of each view's inheritance hierarchy, methods, and attributes.
8+
This allows you to find this information without tracing through every file and base class.
9+
10+
Interested in helping out? Check out our [contributor docs](CONTRIBUTING.md)!

0 commit comments

Comments
 (0)