{"id":15180652,"url":"https://github.com/adiletto64/django-hogwarts","last_synced_at":"2026-03-02T00:34:35.774Z","repository":{"id":186164292,"uuid":"657634825","full_name":"adiletto64/django-hogwarts","owner":"adiletto64","description":"Django CRUD codegenerator","archived":false,"fork":false,"pushed_at":"2023-12-23T09:18:23.000Z","size":606,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-20T03:18:55.232Z","etag":null,"topics":["devtools","django","django-development","django-framework"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adiletto64.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-06-23T13:43:38.000Z","updated_at":"2023-08-21T17:22:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"43da7f83-0e18-4631-80d1-77a4f692732e","html_url":"https://github.com/adiletto64/django-hogwarts","commit_stats":null,"previous_names":["adiletto64/django_hogwarts"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/adiletto64/django-hogwarts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adiletto64%2Fdjango-hogwarts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adiletto64%2Fdjango-hogwarts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adiletto64%2Fdjango-hogwarts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adiletto64%2Fdjango-hogwarts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adiletto64","download_url":"https://codeload.github.com/adiletto64/django-hogwarts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adiletto64%2Fdjango-hogwarts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29988054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T22:42:38.399Z","status":"ssl_error","status_checked_at":"2026-03-01T22:41:51.863Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["devtools","django","django-development","django-framework"],"created_at":"2024-09-27T16:40:43.938Z","updated_at":"2026-03-02T00:34:35.746Z","avatar_url":"https://github.com/adiletto64.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eDjango hogwarts 🧙‍♂️\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eManagement commands to generate views, urls and templates\u003c/h4\u003e\n\nUse CLI commands to generate:\n- basic create, update, list, detail views\n- urlpatterns from views with REST like path urls\n- form, table, detail templates (Bootstrap and django-crispy-forms by default)\n\n**all commands will respect (will not change) existing code**\n\n---\n\n## Installation\n```shell\n# pip\npip install django-hogwarts\n\n# poetry\npoetry add django-hogwarts\n```\n\nadd `hogwarts` to your `INSTALLED_APPS`:\n``` python\nINSTALLED_APPS = [\n    ...\n    \"hogwarts\"\n]\n```\n\n## Usage\n\u003e Check [this](./docs/conventions.md) to know what urls will be generated\n### Generate urls.py\nGenerates paths for views from views.py\n```\npython manage.py genurls \u003cyour-app-name\u003e\n```\n\nArguments:\n- `--force-app-name`, `fan` override app_name variable in urls.py \n- `--override`, `-o` fully overrides existing code in urls.py (previous code will be deleted)\n- `--single-import`, `-s` instead of importing individual view, imports just module`from . import views`\n\n### Generate views.py\nGenerates create, update, detail, list views for model.\nCheckout the [demo](./docs/gen_views_example.md)\n```\npython manage.py genviews \u003cyour-app-name\u003e \u003cmodel-name\u003e\n```\nArguments\n- `--smart-mode`, `-s` adds login required, sets user for CreateView and checks if client is owner of object in UpdateView\n- `--model-is-namespace`, `-mn` adds success_url with name model as [namespace](https://docs.djangoproject.com/en/4.2/topics/http/urls/#url-namespaces)\n- `--file`, `-f` specify view file (example: \"views/posts_view.py\" or \"new_views.py\") in your app\n\n### Generate tests.py\nIt generates tests from urls.py for CRUD generic views only\n``` \npython manage.py gentests \u003cyour-app-name\u003e\n```\n\n### Generate templates\nGenerates templates from `template_name`s from views from given app\n\n**[django-crispy-forms](https://github.com/django-crispy-forms/django-crispy-forms) and\n[crispy-bootstrap5](https://github.com/django-crispy-forms/crispy-bootstrap5) packages are required**\n\n``` \npython manage.py gentemplates \u003cyour-app-name\u003e\n```\n\nWant to create own scaffolding templates? \n1. create folder, copy and customize from [this templates](https://github.com/adiletto64/django-hogwarts/tree/master/hogwarts/scaffold)\n2. add that folder to setting `HOGWARTS_SCAFFOLD_FOLDER = \"\u003cyour-folder\u003e\"`\n\n### Scaffolding\n\nGenerates views, urls and templates for given app (every model in app)\n\n``` \npython manage.py scaffold \u003cyour-app-name\u003e\n```\n\n\n## Roadmap\n- tests generator\n- maybe rest-framework support (let me know in issues)\n\n## Development\nBefore all create config folder and copy everything from example_config \nto config folder\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadiletto64%2Fdjango-hogwarts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadiletto64%2Fdjango-hogwarts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadiletto64%2Fdjango-hogwarts/lists"}