{"id":18469876,"url":"https://github.com/twknab/django_template","last_synced_at":"2026-04-24T16:02:47.571Z","repository":{"id":128421090,"uuid":"92891900","full_name":"twknab/django_template","owner":"twknab","description":"Django (1.11) CRUD template, with login, registration and some validations ready-to-go.","archived":false,"fork":false,"pushed_at":"2017-10-10T02:38:21.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T11:54:45.678Z","etag":null,"topics":["django-application","python-2-7"],"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/twknab.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":"2017-05-31T01:34:01.000Z","updated_at":"2017-10-10T02:39:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"6f84fec4-bf0f-479b-9cb8-3b5ffa3b80a3","html_url":"https://github.com/twknab/django_template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/twknab/django_template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twknab%2Fdjango_template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twknab%2Fdjango_template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twknab%2Fdjango_template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twknab%2Fdjango_template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twknab","download_url":"https://codeload.github.com/twknab/django_template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twknab%2Fdjango_template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32230421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"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":["django-application","python-2-7"],"created_at":"2024-11-06T10:11:58.402Z","updated_at":"2026-04-24T16:02:47.541Z","avatar_url":"https://github.com/twknab.png","language":"Python","readme":"# Django Template\n\nThis is a basic Django (1.11)  project and singular application, which includes login\nand registration features, along with validations. This is a useful django 1.11\ntemplate to build larger projects, with the basic login and validation features\nready to go.\n\n*Note: This project must be updated after being cloned. Instructions for updating\ncore Django files is listed below.* Any failures updating Django variables\nto your own project and application variables, will cause the application to break.\n\n## A Word on Updating this Project:\nJust to let you know there are about 30+ steps listed below on how to customize this\ntemplate and create a new project from it. You can definitely pursue customizing\nthis on your own, and may update variables by finding errors using the debugger and following\nthem to completion. If however, you get lost, you can use the steps below to see\nstep by step exactly, how to take this repo and turn it into a new project. It's\none of those things that on the surface is more intimidating than it actually is.\nEssentially, in a nut shell, we've got to update all old project and application\nvariable names to our new project.\n\n*Disclaimer:* It might even be faster to create a new Django project\nfrom scratch, and copy and paste in the basic routes or views.\n\n## Instructions:\n\n1. Clone this repository into a folder where you'd like it to live.\n2. Rename the `django_template` folder to your `{{project_name}}` of choice.\n*Note: {{variables}} will be used from now on to denote variables you must update.\nThe double curly brackets are not to be included*\n3. Open your now renamed project folder, and rename the containing `django_template` folder\n(whose path is now, `{{project_name}}\\django_template`), to the same `{{project_name}}` used previously. Your path to this folder should now be, `{{project_name}}\\{{project_name}}`.\n4. Open `manage.py` in the root of your project folder. The path should be:\n`{{project_name}}\\manage.py`.\n5. On line 6 in `manage.py`, rename the second parameter in `setdefault()` from:\n`django_template.settings` to `{{project_name}}.settings`. Save changes and close this file.\n6. In the root of your `{{project_name}}` folder, navigate into the `\\apps` folder\n(`{{project_name}}\\apps`). Rename the containing folder from `template` to the\nname of your app (usually a shorthand of your `{{project_name}}`). In this case,\nwe'll call it `{{app_name}}`. So, `{{project_name}}\\apps\\template` should now be\nnamed `{{project_name}}\\apps\\{{app_name}}`.\n7. Navigate into the newly renamed `{{app_name}}` folder.\n8. Open `apps.py` (`{{project_name}}\\apps\\{{app_name}}\\apps.py`). On line 7, rename `template` to your `{{app_name}}`. Save and close the file.\n9. Open `views.py` in the same folder (`{{project_name}}\\apps\\{{app_name}}\\views.py`).\n10. In the first method, `index()`, at the very bottom of the method, change the\nline `return render(request, \"template/index.html\")` to `return render(request, \"{{app_name}}/index.html\")`.\n11. In second to last method, `get_dashboard_data()`, at the very bottom of the `try`\nstatement, update the line `return render(request, \"template/dashboard.html\", dashboard_data)`\nto `return render(request, \"{{app_name}}/dashboard.html\", dashboard_data)`. Save the file\nand close it. *Note: Currently, the only dashboard data retreived is that of the current user.* This could be vastly added onto, and if not needed can be removed (be sure to remove the `from . import dashboard` if not needed).\n12. Open `\\template` folder inside of the `{{app_name}}` folder (`{{project_name}}\\apps\\{{app_name}}\\templates`).\n13. Rename the containing folder, `template` to `{{app_name}}`. This name\nmust be your app name.\n14. Navigate now into the newly renamed `{{app_name}}` folder (`{{project_name}}\\apps\\{{app_name}}\\templates\\{{app_name}}`).\n15. Once inside, open both `index.html` and `dashboard.html`. Edit the\n`\u003clink rel=\"stylesheet\"\u003e` lines from `\u003clink rel=\"stylesheet\" href=\"{% static 'template/css/style.css' %}\"\u003e` to `\u003clink rel=\"stylesheet\" href=\"{% static '{{app_name}}/css/style.css' %}\"\u003e`, replacing any references to `template` and\ninstead to your `{{app_name}}`.\n16. Also change the the `\u003ctitle\u003e` tags in each header, updating the name of the\npage to whatever your needs may be. Save and close both files.\n17. Navigate up a directory back to the `{{project_name}}\\apps\\{{app_name}}\\`.\n18. Navigate into `/static`, `{{project_name}}\\apps\\{{app_name}}\\static`.\n19. Change `template` to `{{app_name}}`. This should be the same name you used\nwhen you renamed your last folder. The previous folder `{{project_name}}\\apps\\{{app_name}}\\static\\template` should now be:\n`{{project_name}}\\apps\\{{app_name}}\\static\\{{app_name}}`.\n20. The folder structures have all been updated now. We've got to now update\nall of the Django settings, and make a few changes to a handful more files. Take\na breath and let's finish this up.\n21. Navigate back to the `{{project_name}}` folder (root of your project). Once\nin this folder, navigate into the `{{app_name}}` directory (not `apps`). You should\nnow be in `{{project_name}}\\{{app_name}}`.\n22. Open `urls.py` (`{{project_name}}\\{{app_name}}\\urls.py`), change the line:\n`url(r'^', include(\"apps.template.urls\"))`, to `url(r'^', include(\"apps.{{app_name}}.urls\")),`\nupdating your application name in the `include()` parameters. Close and save this file.\n23. Open `wsgi.py` in the same folder (`{{project_name}}\\{{app_name}}\\wsgi.py`). Change\nthe line `os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"django_template.settings\")`\nto `os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"{{project_name}}.settings\")`. We\nare changing the `django_template.settings` to our `{{project_name}}.settings` -- *this is not\nyour `{{app_name}}`, but `{{project_name}}`*\n24. Open `settings.py` file in the same folder (`{{project_name}}\\{{app_name}}\\settings.py`).\nOnce in this file, make the following changes:\n    - `SECRET_KEY` : Change the hash by changing 1 or 2 characters to different characters.\n    Do not change the character count, just change a few characters so that the hash is now\n    unique in comparison to the original file.\n    - `INSTALLED_APPS` : Change `'apps.template'` to `'apps.{{app_name}}'`. This\n    updates our settings.py file to point to our renamed app folder inside of `apps`.\n    - `ROOT_URLCONF` : Update `django_template.urls` to `{{project_name}}.urls`. This is\n    *not `{{app_name}}`*.\n    - `WSGI_APPLICATION` : Update `django_template.wsgi.application` to `{{project_name}}.wsgi.application`, updating the name to `{{project_name}}`,\n    *not `{{app_name}}`*\n    - `TIME_ZONE` : Note, this is currently set to `America/Los_Angeles`. You can\n    set this back to `UTC` if needed or adjust for your own timezone needs.\n    - Save all changes and close this file.\n25. Delete all `*.pyc` files in `{{project_name}}\\{{project_name}}` (should be ~4 files).\n26. Delete all `*.pyc` files in `{{project_name}}\\apps` (should be ~1 files).\n27. Delete all `*.pyc` files in `{{project_name}}\\apps\\{{app_name}}` (should be ~6 files).\n28. Delete all files **EXCEPT** `__init__.py` in `{{project_name}}\\apps\\{{app_name}}\\migrations`\n29. Save all changes to any files that may have not been saved. We are done editing files\nnow and we've essentially created a unique project, and a new database with the new project\nand app name dictating table nomenclature.\n30. Open terminal. Navigate to the `{{project_name}}` folder in terminal.\n31. Create a new `virtualenv` for this project. `pip install` all packages in `{{project_name}}\\requirements.txt`. If you do not create a new virtualenv and if\nyou do not install the pip packages, then the server will not start.\n32. Once inside the root of our project, and once all packages are installed,\n`makemigrations` via `python manage.py makemigrations` in terminal. This will generate `.pyc` files again and prepare our models for generation.\n33. Then `migrate` via `python manage.py migrate` to actually generate the models.\n34. Start the server: `python manage.py runserver`. Once the server attempts to run,\nany misnamed or missed variables from our updating process will break the application.\nIf the server runs, then all app variables should now be updated properly.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwknab%2Fdjango_template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwknab%2Fdjango_template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwknab%2Fdjango_template/lists"}