{"id":24932356,"url":"https://github.com/enamhasan/django-cheat-sheet","last_synced_at":"2026-05-19T06:01:47.934Z","repository":{"id":158439307,"uuid":"634043439","full_name":"enamhasan/Django-Cheat-Sheet","owner":"enamhasan","description":"Django Cheat Sheet for Python Developers","archived":false,"fork":false,"pushed_at":"2023-11-02T15:54:05.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T14:25:39.596Z","etag":null,"topics":["django","django-admin","django-channels","django-framework","django-rest-framework","python","python3","web","web-development"],"latest_commit_sha":null,"homepage":"","language":null,"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/enamhasan.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}},"created_at":"2023-04-28T22:18:27.000Z","updated_at":"2023-08-15T20:15:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"d60712c7-306c-4ee5-a50f-80434a8a2dde","html_url":"https://github.com/enamhasan/Django-Cheat-Sheet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/enamhasan/Django-Cheat-Sheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enamhasan%2FDjango-Cheat-Sheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enamhasan%2FDjango-Cheat-Sheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enamhasan%2FDjango-Cheat-Sheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enamhasan%2FDjango-Cheat-Sheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enamhasan","download_url":"https://codeload.github.com/enamhasan/Django-Cheat-Sheet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enamhasan%2FDjango-Cheat-Sheet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266706530,"owners_count":23971900,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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","django-admin","django-channels","django-framework","django-rest-framework","python","python3","web","web-development"],"created_at":"2025-02-02T14:38:47.704Z","updated_at":"2026-05-19T06:01:47.878Z","avatar_url":"https://github.com/enamhasan.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django-Cheat-Sheet\nDjango Cheat Sheet Python Developers\n\n# Setup environment for a new Django project\n- Create a new Project folder and navigate to it with $ cd \u003cProject\u003e\n- Create Python virtual env $ python3 -m venv my_venv\n- Activate virtual env $ source my_venv/bin/activate\n- To deactivate virtual env $ deactivate (In case you need)\n- Install django $ pip install django\n- Install other package dependencies with $ pip install \u003cpackage_name\u003e. The best way to install all necessary packages is to create a requirements.txt file and list\n  all the packages and run $ pip install -r requirements.txt\n\n# Start a new Django project\n\n   ### Activate the virtual environment first then\n```\n    (env) $ django-admin startproject \u003cprojectname\u003e .\n```\nNote: If you want to avoid creating the additional top-level project folder, you can add a dot (.) at the end of the django-admin startproject command. The dot skips the top-level project folder and creates your management app and the manage.py file right inside your current working directory\n \n ### Create an app\n```\n   (env) $  python manage.py startapp \u003cyour_app_name\u003e\n```\n# Django in Production with Apache mod_wsgi.\n  \n# Django in Production with Nginx Gunicorn.\n\n# Integrate django-summer note editor with Django Project.\n\n```\n# Step 1: install the Summernote package\n  pip install django-summernote\n\n# Step 2: settings.py\n\nINSTALLED_APPS = (\n    'django_summernote',\n)\nMEDIA_URL = '/media/'\nMEDIA_ROOT = os.path.join(BASE_DIR, 'media/')\nX_FRAME_OPTIONS = 'SAMEORIGIN'\n\nif settings.DEBUG:\n    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) \n    \n# Step 3: urls.py\n\nurlpatterns = [\n    path('summernote/', include('django_summernote.urls')),\n]\n\n# Step 2: admin.py\nfrom django_summernote.admin import SummernoteModelAdmin\nfrom .models import Post\n\nclass PostAdmin(SummernoteModelAdmin):\n    summernote_fields = ('content',)\n\nadmin.site.register(Post, PostAdmin)\n```\n\nCheck the Post model content field in Django admin. \n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenamhasan%2Fdjango-cheat-sheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenamhasan%2Fdjango-cheat-sheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenamhasan%2Fdjango-cheat-sheet/lists"}