{"id":21589740,"url":"https://github.com/typecode/django-project-template","last_synced_at":"2025-03-18T09:44:12.080Z","repository":{"id":16828256,"uuid":"19587604","full_name":"typecode/django-project-template","owner":"typecode","description":null,"archived":false,"fork":false,"pushed_at":"2014-08-05T15:49:55.000Z","size":375,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":21,"default_branch":"develop","last_synced_at":"2025-01-24T16:14:58.701Z","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/typecode.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}},"created_at":"2014-05-08T20:21:40.000Z","updated_at":"2014-07-28T16:20:46.000Z","dependencies_parsed_at":"2022-08-04T11:30:14.746Z","dependency_job_id":null,"html_url":"https://github.com/typecode/django-project-template","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/typecode%2Fdjango-project-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typecode%2Fdjango-project-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typecode%2Fdjango-project-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typecode%2Fdjango-project-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typecode","download_url":"https://codeload.github.com/typecode/django-project-template/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244198190,"owners_count":20414439,"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-24T16:15:37.457Z","updated_at":"2025-03-18T09:44:12.060Z","avatar_url":"https://github.com/typecode.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# How to start a new Django Project\n\u003e #### Disclaimer\n\u003e I'm assuming that most of the setup has already been done so I won't be going over how to setup Python, `pip`, VirtualBox, or Vagrant for the first time.\n\nThroughout the following instructions I'll be using **`newproject`** as a placeholder for the project we're creating. Please, for all of our sakes, choose a better name.\n\n----------\n\nStart off my making sure all of the prerequisites are up-to-date.  We need Django and Bower to run some of the bootstrapping so they need to be installed globally:\n\n    \u003e pip install -U django\n    \u003e npm update -g bower\n    \nMove to the directory where you keep all of your projects (I use `~/Projects` but I think I've seen some of us using `~/Sites`) and create a new project using the most recent template:\n\n    \u003e cd ~/Projects\n    \u003e django-admin.py startproject newproject \\\n            --template=https://github.com/typecode/django-project-template/archive/develop.zip \\\n            --name bower.json\n    \nA new directory `newproject` will be created with the project's directory structure already in place.  Move into the new project and install the default Python:\n\n    \u003e cd newproject\n    \u003e bower install\n    \nWe need to create a deploy key for the Vagrant instance to use private Type/Code repos:\n\n    \u003e ssh-keygen -N '' -f salt/roots/app/files/tc-deploy\n    \nAt this point you have a fully-prepped Django project get everything pushed to Github:\n\n    \u003e git init\n    \u003e git checkout -b develop\n    \u003e git add .\n    \u003e git commit -m'Initial commit'\n    \nCreate a new repo on GitHub and push the code to it:\n\n    \u003e git remote add origin git@github.com:typecode/newproject.git\n    \u003e git push --set-upstream origin develop\n    \nNow we can start the Vagrant instance (could take a while):\n\n    \u003e vagrant up\n\nWhen it's done `ssh` to the Vagrant instance and edit `~/.bashrc` to make sure virtualenvwrapper will work correctly:\n\n    \u003e vagrant ssh\n    \u003e echo 'export WORKON_HOME=$HOME/.virtualenvs' \u003e\u003e ~/.bashrc\n    \u003e echo 'source /usr/local/bin/virtualenvwrapper.sh' \u003e\u003e ~/.bashrc\n    \u003e source ~/.bashrc\n    \n**The next time you start working you can `vagrant ssh` and continue from here.**\n    \nNow you can activate the `virtualenv`:\n\n    \u003e workon app\n    \nInteract with the app as usual:\n\n    \u003e django-admin.py syncdb\n    ...\n    \u003e django-admin.py runserver 0.0.0.0:8000\n    Validating models...\n\n    0 errors found\n    May 08, 2014 - 17:27:37\n    Django version 1.6.4, using settings 'apps.settings'\n    Starting development server at http://127.0.0.1:8000/\n    Quit the server with CONTROL-C.\n    \nBe sure to include `0.0.0.0:8000` with `runserver` so that the app is accessible at [http://localhost:8000] on your host machine (i.e., from Chrome on your Mac).\n    \nCongratulations!  Hopefully there are beers in the fridge.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypecode%2Fdjango-project-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypecode%2Fdjango-project-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypecode%2Fdjango-project-template/lists"}