{"id":19617359,"url":"https://github.com/allcaps/django-scaffold","last_synced_at":"2026-03-03T01:41:42.224Z","repository":{"id":98372106,"uuid":"73486972","full_name":"allcaps/django-scaffold","owner":"allcaps","description":"Django build command to generate your app","archived":false,"fork":false,"pushed_at":"2019-04-27T22:59:01.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-09T10:46:02.510Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/allcaps.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.txt","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":"2016-11-11T15:03:59.000Z","updated_at":"2019-04-27T22:59:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"eb3f527f-600c-4259-aecf-bd20658ac6a8","html_url":"https://github.com/allcaps/django-scaffold","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allcaps%2Fdjango-scaffold","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allcaps%2Fdjango-scaffold/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allcaps%2Fdjango-scaffold/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allcaps%2Fdjango-scaffold/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allcaps","download_url":"https://codeload.github.com/allcaps/django-scaffold/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240907854,"owners_count":19876691,"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":[],"created_at":"2024-11-11T11:03:28.237Z","updated_at":"2026-03-03T01:41:37.179Z","avatar_url":"https://github.com/allcaps.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"Django Scaffold\n===============\n\nDjango Scaffold provides a build command to inspect models and generate views, urls, templates, admin etc.\n\nInstall\n-------\n\n    env/bin/pip install -e git+git@github.com:allcaps/django-scaffold.git#egg=django-scaffold\n\n\nUsage\n-----\n\nDjango Scaffold does introspection of `models.py`. Create a your webapp and compose your models.\nAlternatively you can inspect an existing database with the\n[inspectdb command](https://docs.djangoproject.com/en/1.10/howto/legacy-databases/).\n\nMake sure both your app and `scaffold` are in `INSTALLED_APPS`:\n\n    INSTALLED_APPS = [\n        'your_app',\n        'scaffold',\n        ...\n    ]\n\n\nThe `build` command generates admin, views, urls, templates and writes them to your app:\n\n    python manage.py build your_app\n\n\nAfter the build\n---------------\n\n# settings.py\n\n    SITE_ID = 1\n\n    TEMPLATES[0]['OPTIONS']['context_processors'] += ['webapp.context_processors.base']\n\n    STATIC_URL = '/static/'\n    STATIC_ROOT = os.path.join(BASE_DIR, 'static/')\n    MEDIA_URL = '/media/'\n    MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')\n\n    INSTALLED_APPS += ['django.contrib.sites']\n\n# models.py\n\n    from model_mixins import BaseMixin\n\n    # For each model in models add BaseMixin:\n    class Foo(BaseMixin, models.Model):\n\n\nCreating your own scaffold\n--------------------------\n\nMake sure your app comes before `scaffold`. This makes Django find your template overrides first.\n\nCopy the scaffold template to your_app/templates/scaffold to customise them:\n\n    cp path/to/site-packages/scaffold/templates/scaffold your_app/templates/\n\n\nSome ideas\n----------\n\n - Override the django template processor to make a second template language to make 'template tempelates' more readable.\n - Create settings for Single and Multiple generator template names. So it is easy to customize the template sets.\n - Template packages (minimal, Bootstrap, REST API, CRUD, Wagtail).\n - Add get_admin_url and add admin edit buttons on page when user has access to admin.\n - Add instructions.html template to display in terminal.\n - Add rollback option or alternatively warn when project is not a clean checkout.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallcaps%2Fdjango-scaffold","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallcaps%2Fdjango-scaffold","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallcaps%2Fdjango-scaffold/lists"}