{"id":17172947,"url":"https://github.com/20tab/django-uwsgi-template-legacy","last_synced_at":"2025-08-08T07:08:08.947Z","repository":{"id":14602110,"uuid":"17319253","full_name":"20tab/django-uwsgi-template-legacy","owner":"20tab","description":"This is a Django project template using uWSGI as application server.","archived":false,"fork":false,"pushed_at":"2019-05-15T17:12:18.000Z","size":401,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-13T16:12:56.026Z","etag":null,"topics":["django","django-templates","python","uwsgi","virtualenv"],"latest_commit_sha":null,"homepage":"","language":"Python","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/20tab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-01T16:49:48.000Z","updated_at":"2020-07-16T09:34:15.000Z","dependencies_parsed_at":"2022-09-17T13:50:43.834Z","dependency_job_id":null,"html_url":"https://github.com/20tab/django-uwsgi-template-legacy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/20tab/django-uwsgi-template-legacy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Fdjango-uwsgi-template-legacy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Fdjango-uwsgi-template-legacy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Fdjango-uwsgi-template-legacy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Fdjango-uwsgi-template-legacy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/20tab","download_url":"https://codeload.github.com/20tab/django-uwsgi-template-legacy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Fdjango-uwsgi-template-legacy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269379389,"owners_count":24407409,"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-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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-templates","python","uwsgi","virtualenv"],"created_at":"2024-10-14T23:49:06.475Z","updated_at":"2025-08-08T07:08:08.919Z","avatar_url":"https://github.com/20tab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003c!-- {% comment %} --\u003eDjango uWSGI template\n\u003c!-- {% endcomment %}--\u003e {{project_name}}\n\nThis is a [Django](https://docs.djangoproject.com) project \u003c!-- {% comment %} --\u003etemplate\u003c!-- {% endcomment %}--\u003e using [uWSGI](https://uwsgi-docs.readthedocs.io) as application server.\n\n\u003e **NOTE**: for OSX check [uwsgi-emperor-mode](https://github.com/20tab/uwsgi-emperor-mode) to configure your own local server with emperor.\n\n## Documentation\n\n* [Conventions](#conventions)\n* [Workspace initialization](#workspace-initialization)\n    * [Virtual environment](#virtual-environment)\n    * [Basic requirements](#basic-requirements)\n\u003c!-- {% comment %} --\u003e\n* [Setup a new project](#setup-a-new-project)\n    * [Start Project](#start-project)\n    * [Git initialization](#git-initialization)\n    * [Initialization](#first-initialization)\n\u003c!-- {% endcomment %} --\u003e\n* [Clone and start the existing project](#clone-and-start-the-existing-project)\n    * [Clone Project](#clone-project)\n    * [Initialization](#initialization)\n* [Usage](#usage)\n    * [Database reset](#database-reset)\n    * [Superuser creation](#superuser-creation)\n    * [Add or Update libraries](#add-or-update-libraries)\n        * [List outdated libraries](#list-outdated-libraries)\n        * [Edit and Compile requirements files](#edit-and-compile-requirements-files)\n    * [Install libraries](#install-libraries)\n* [Testing](#testing)\n* [Frontend build](#frontend-build)\n* [Continuous Integration](#continuous-integration)\n* [Deploy](#deploy)\n\n## Conventions\n\n- replace `projects` with your actual projects directory\n\u003c!-- {% comment %} --\u003e\n- replace `project_name` with your chosen project name\n\n- replace `git_repository_url` with your actual git repository url\n\u003c!-- {% endcomment %} --\u003e\n## Workspace initialization\n\nWe suggest updating pip to the latest version and using a virtual environment to wrap all your libraries.\n\n### Virtual environment\n\n**IMPORTANT**: Please, create an empty virtual environment, with the right python version, and activate it.\nTo install and use virtualenv, please, visit [the official documentation](https://virtualenv.pypa.io)\n\n### Basic requirements\n\n**Django** and **Invoke** must be installed before initializing the project.\n\n```shell\n({{project_name}}) $ pip install -U django invoke\n```\n\n\u003c!-- {% comment %} --\u003e\n## Setup a new project\n\nThis section explains the first steps when you need to create a new project.\n\n### Start Project\n\nChange directory and start a new project with this template:\n\n```shell\n({{project_name}}) $ cd ~/projects/\n({{project_name}}) $ django-admin.py startproject --template https://github.com/20tab/django-uwsgi-template-legacy/zipball/master -e cfg,ini,json,md,py,yaml,template -n Makefile {{project_name}}\n```\n\n### Git initialization\n\nIn order to initialize git and sync the project with an existing repository:\n\n```shell\n({{project_name}}) $ cd ~/projects/{{project_name}}\n({{project_name}}) $ inv gitinit GIT_REPOSITORY_URL\n```\n\n### First initialization\n\nGo to the [initialization](#initialization) section\n\u003c!-- {% endcomment %} --\u003e\n\n## Clone and start the existing project\n\nThis section explains the steps when you need to clone an existing project.\n\n### Clone Project\n\nChange directory and clone the project repository:\n\n```shell\n({{project_name}}) $ cd ~/projects/\n({{project_name}}) $ git clone GIT_REPOSITORY_URL {{project_name}}\n```\n\n\u003e **NOTE** : If you're cloning an existing project, make sure you go to the correct branch (e.g. `git checkout develop`)\n\n### Initialization\n\nEnter the newly created **project** directory:\n\n```shell\n({{project_name}}) $ cd ~/projects/{{project_name}}\n```\n\nInvoke init and follow instructions, to configure the project:\n\n```shell\n({{project_name}}) $ inv init\n```\n\n## Usage\n\n### Database reset\n\nTo reset database execute (beware all data will be lost):\n\n```shell\n({{project_name}}) $ inv dropdb\n({{project_name}}) $ inv createdb\n({{project_name}}) $ python manage.py migrate\n```\n\n### Superuser creation\n\nCreate a user with full privileges (e.g. admin access):\n\n```shell\n({{project_name}}) $ python manage.py createsuperuser\n```\n\n### Add or Update libraries\n\n#### List outdated libraries\n\nTo list all outdated installed libraries:\n\n```shell\n({{project_name}}) $ pip list -o\n```\n\n#### Edit and Compile requirements files\n\nEdit the appropriate .ini requirements file, to add/remove pinned libraries or modify their versions.\n\nTo update the compiled requirements files (`requirements/*.txt`), execute:\n\n```shell\n({{project_name}}) $ make pip\n```\n\nAlternatively, in order to update specific dependent libraries to the latest version (e.g. urllib3), execute:\n￼\n```shell\n({{project_name}}) $ make pip p='-P urllib3'\n```\n\n### Install libraries for development\n\nTo install the just updated requirements (e.g. `requirements/dev.txt`), execute:\n\n```shell\n({{project_name}}) $ make dev\n```\n\n## Testing\n\nTo run the full test suite (including `behave` tests), with coverage calculation, execute:\n\n```shell\n({{project_name}}) $ make test\n```\n\n\u003e **NOTE**:  check [django-bdd-toolkit](https://github.com/20tab/django-bdd-toolkit) for instructions on how to write BDD tests\n\n## Frontend build\n\nIn order to install `node` dependencies and compile the frontend code, execute:\n\n```shell\n({{project_name}}) $ make npm\n```\n\n## Continuous Integration\n\nUse the following command as a shortcut to configure a continuous integration (e.g. Jenkins) build:\n\n```shell\nmake ci PASSWORD=\u003cdatabase_user_password\u003e DATABASE=\u003cdatabase_name\u003e SECRETKEY=\u003cdjango_secret_key\u003e\n```\n\n## Deploy\n\nThe project is partially configured to use Ansible to deploy the project. For each instance to deploy (e.g. \"alpha\"), there must be a config file (e.g. `deploy/alpha.yaml`) and an item in the hosts file.\n\nUse provided `deploy/alpha.yaml.template` and `deploy/hosts.template` as templates for, respectively, the configuration and the hosts files. Rename them removing the `.template` suffix. The obtained files will not be versioned.\n\nThis project contains makefile commands for \"alpha\". If needed, duplicate those and use them as templates for additional instances (e.g. \"beta\" or \"prod\").\n\nBoth the remote server and the continuous integration system need `node.js`, in order to automatically build static files. If such module bundler is not necessary, remove unused commands from the Makefile `ci` command and from `deploy/deploy.yaml`.\n\nEach instance (e.g. \"alpha\") should be initialized, executing only **once**:\n\n```shell\n({{project_name}}) $ make initalpha\n```\n\nTo deploy a specific instance (e.g. \"alpha\"), execute:\n\n```shell\n({{project_name}}) $ make alpha\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F20tab%2Fdjango-uwsgi-template-legacy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F20tab%2Fdjango-uwsgi-template-legacy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F20tab%2Fdjango-uwsgi-template-legacy/lists"}