{"id":13367668,"url":"https://github.com/classy-python/ccbv","last_synced_at":"2025-03-12T20:30:50.095Z","repository":{"id":2439262,"uuid":"3409149","full_name":"classy-python/ccbv","owner":"classy-python","description":"A documentation tool for getting your head around Django's class based views.","archived":false,"fork":false,"pushed_at":"2024-06-16T18:43:45.000Z","size":2125,"stargazers_count":509,"open_issues_count":28,"forks_count":68,"subscribers_count":18,"default_branch":"main","last_synced_at":"2024-07-30T01:10:49.930Z","etag":null,"topics":["django","hacktoberfest","python"],"latest_commit_sha":null,"homepage":"https://ccbv.co.uk/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/classy-python.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"license.md","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":"2012-02-10T17:09:55.000Z","updated_at":"2024-07-30T01:10:55.022Z","dependencies_parsed_at":"2024-05-21T20:44:21.249Z","dependency_job_id":"e210d743-36d1-4d0e-933d-0eb9461a73de","html_url":"https://github.com/classy-python/ccbv","commit_stats":{"total_commits":893,"total_committers":24,"mean_commits":"37.208333333333336","dds":"0.24524076147816354","last_synced_commit":"6addc5099191cfcda64b61846490d082d12028e9"},"previous_names":["refreshoxford/django-cbv-inspector"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classy-python%2Fccbv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classy-python%2Fccbv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classy-python%2Fccbv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/classy-python%2Fccbv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/classy-python","download_url":"https://codeload.github.com/classy-python/ccbv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243290644,"owners_count":20267754,"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":["django","hacktoberfest","python"],"created_at":"2024-07-30T00:01:58.967Z","updated_at":"2025-03-12T20:30:49.667Z","avatar_url":"https://github.com/classy-python.png","language":"HTML","readme":"# Django Class Based Views Inspector\n\nUse the [Django Class Based Views Inspector](http://ccbv.co.uk/)\n\n## What's a class based view anyway?\n\nDjango 1.3 came with class based generic views. These are really awesome, and\nvery powerfully coded with mixins and base classes all over the shop. This\nmeans they're much more than just a couple of generic shortcuts, they also\nprovide utilities which can be mixed in the much more complex views that you\nwrite yourself.\n\n## Great! So what's the point of the inspector?\n\nAll of this power comes at the expense of simplicity. Trying to work out\nexactly which method you need to customise on your `UpdateView` can feel a\nlittle like wading through spaghetti - it has 8 separate ancestors (plus\n`object`) spread across 3 different files. So working out that you wanted to\ntweak `UpdateView.get_initial` and what it's keyword arguments are is a bit of\na faff.\n\nThat's where this comes in! Here's the manifesto:\n\n\u003e Provide an easy interface to learning the awesomeness of class based views.\n\u003e It should offer at least the ability to view the MRO of a generic view, all\n\u003e of the methods which are available on a particular class (including all\n\u003e inherited methods) complete with signature and docstrings. Ideally you should\n\u003e then be able to see where that method has come from, and any `super` calls\n\u003e it's making should be identified. Wrap this all up in a shiny front end!\n\n## Tools to consider\n\n* Python's built in [inspect](http://docs.python.org/library/inspect.html)\n  module to work out what's going on and put it in the database\n* [JQuery](http://jquery.com) for shinyness\n* [Backbone](http://documentcloud.github.com/backbone/) for JS structure\n* [Piston](https://bitbucket.org/jespern/django-piston/wiki/Home) for API\n* [SASS](http://sass-lang.com/)/LESS and/or\n  [Bootstrap](http://twitter.github.com/bootstrap/) to make CSS less painful\n\n## Installation\n\nFirst you should install some OS libraries required for some packages, this can vary with each OS, but if you're on Ubuntu 14.04, then this should do the trick for you:\n\n    sudo apt-get install python3-dev libmemcached-dev zlib1g-dev libpq-dev\n\nAfter this, install as you normally would a Django site (requirements files are provided).\n\ne.g. (inside your virtualenv or whatever)\n\n    [uv] pip install -r requirements.prod.txt -r requirements.dev.txt\n\nPrepare the database (assuming you've got required database)\n\n    python manage.py migrate cbv\n\nPopulate the database with fixtures, either all at once:\n\n    python manage.py load_all_django_versions\n\nor one at a time, for example:\n\n    python manage.py loaddata cbv/fixtures/1.8.json\n    python manage.py loaddata cbv/fixtures/1.9.json\n\nCollect static files (CSS \u0026 JS)\n\n    python manage.py collectstatic\n\nRun server and play around\n\n    python manage.py runserver\n\nIf you hope to contribute any code, please install `pre-commit` before committing.\n\n    pre-commit install\n\n\n## Updating Requirements\nAdd or remove the dependency from either `requirements.prod.in` or `requirements.dev.in` as appropriate.\n\nRun `make compile` and appropriate txt file will be updated.\n\n\n## Updating for New Versions of Django\n\nThe procedure for updating for a new version of Django is as simple as:\n\n1. Update the `requirements.in` file to pin the required version of Django;\n2. Use `pip-compile` to freshen requirements for the new version of Django;\n3. Use `pip-sync` to update your virtual environment to match the newly compiled\n   `requirements.txt` file;\n4. Update the project's code to run under the target version of Django, as\n   necessary;\n5. Use `python manage.py populate_cbv` to introspect the running Django\n   and populate the required objects in the database;\n6. Use `python manage.py fetch_docs_urls` to update the records in the\n   database with the latest links to the Django documentation;\n7. Export the new Django version into a fixture with: `python manage.py cbv_dumpversion x.xx \u003e cbv/fixtures/x.xx.json`;\n\n\n## Testing\n\nAll you should do is:\n\n    make test\n\n## License\n\nLicense is [BSD-2](http://opensource.org/licenses/BSD-2-Clause).\n\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclassy-python%2Fccbv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclassy-python%2Fccbv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclassy-python%2Fccbv/lists"}