{"id":24401684,"url":"https://github.com/Devgametools/django-practice","last_synced_at":"2025-03-13T06:43:42.166Z","repository":{"id":272618772,"uuid":"917260013","full_name":"Devgametools/django-practice","owner":"Devgametools","description":"DJANGO PRACTICE","archived":false,"fork":false,"pushed_at":"2025-01-17T15:25:31.000Z","size":13735,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T15:58:08.758Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Devgametools.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":"2025-01-15T16:51:08.000Z","updated_at":"2025-01-17T15:25:33.000Z","dependencies_parsed_at":"2025-01-15T17:08:07.401Z","dependency_job_id":"86bb18af-df38-43c2-a112-0bb4a77f96f4","html_url":"https://github.com/Devgametools/django-practice","commit_stats":null,"previous_names":["robertbass/django-practice","devgametools/django-practice"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devgametools%2Fdjango-practice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devgametools%2Fdjango-practice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devgametools%2Fdjango-practice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devgametools%2Fdjango-practice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Devgametools","download_url":"https://codeload.github.com/Devgametools/django-practice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243358212,"owners_count":20277991,"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":"2025-01-20T00:46:02.319Z","updated_at":"2025-03-13T06:43:42.141Z","avatar_url":"https://github.com/Devgametools.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#Django Practice\n## Create virtual environment\n```bash\n# Create virtual environment\npython3 -m venv path_and_name_of_virtual_environment\n# Activate virtual environment\nsource path_and_name_of_virtual_environment/bin/activate\n\n# Install django\npip install django\npip freeze \u003e requirements.txt\n\n# Start django project\ndjango-admin startproject name_of_project .\n\n# Create app\npython manage.py startapp name_of_app\n\n# Run server\npython manage.py runserver\n\n# Create migration\npython manage.py makemigrations\npython manage.py migrate\n```\n## Sqlite shell\n```bash\n# Sqlite is installed by default with django\n./manage.py dbshell\n```\n\n# Samples\n```bash\nfrom django_app.models import Book, Author, Publisher\n\n# create Publisher\npublisher = Publisher(name=\"Penguin\")\npublisher.save()\n\n# create Authors\nauthor = Author(name=\"Author Name\")\nauthor.save()\nanother_author = Author(name=\"Another Author Name\")\nanother_author.save()\n\n#Create Book\nbook = Book(title=\"Book Title\",  publisher=publisher, publication_date=\"2020-07-16\")\nbook.save()\n\n#Add Authors to Book\nbook.authors.set([author, another_author])\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDevgametools%2Fdjango-practice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDevgametools%2Fdjango-practice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDevgametools%2Fdjango-practice/lists"}