{"id":18388250,"url":"https://github.com/ccnmtl/ctldjango","last_synced_at":"2025-04-12T04:23:39.638Z","repository":{"id":37494020,"uuid":"148640230","full_name":"ccnmtl/ctldjango","owner":"ccnmtl","description":"Django project template","archived":false,"fork":false,"pushed_at":"2025-04-11T18:24:36.000Z","size":2896,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-11T19:40:45.414Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ccnmtl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2018-09-13T13:16:33.000Z","updated_at":"2025-04-11T18:24:34.000Z","dependencies_parsed_at":"2023-11-26T18:23:18.412Z","dependency_job_id":"8edcf476-4a1b-4b3f-9109-5b1287160f9d","html_url":"https://github.com/ccnmtl/ctldjango","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/ccnmtl%2Fctldjango","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnmtl%2Fctldjango/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnmtl%2Fctldjango/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnmtl%2Fctldjango/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ccnmtl","download_url":"https://codeload.github.com/ccnmtl/ctldjango/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514769,"owners_count":21117032,"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-06T01:33:13.717Z","updated_at":"2025-04-12T04:23:39.612Z","avatar_url":"https://github.com/ccnmtl.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"`ctldjango` is a standard Django project template tuned to\nimplement CTL specific functionality and configuration. This\ntemplate includes many dependencies and configurations that aren't\nnecessary for most django projects. It's intended to be used as a\nreference, more than a starting point. When setting up a new\napplication, it's important to think carefully about exactly what\nyou want to use, and what you don't.\n\n## What's Included\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/ccnmtl/ctldjango.svg)](https://greenkeeper.io/)\n\n* Default to Python3\n* [django-cas-ng](https://github.com/django-cas-ng/django-cas-ng)\n  configured for Columbia's central auth service -\n  http://www.jasig.org/cas/deployments/columbia-university\n  Anyone with a Columbia UNI by default will have an account.\n* virtualenv and pip setup\n* a nice Makefile for common build, test, and run tasks\n* settings split for dev/prod/staging\n* gunicorn configuration\n* media dirs for dev/prod/staging configured\n* `/stats/` page wired up to display basic traffic stats for the app\n* 'main' app with templated index view wired up and ready to go\n* jQuery included\n* base templates included\n* database defaulted to postgresql\n* timezone set\n* `flake8` (http://pypi.python.org/pypi/flake8), `bandit` (https://pypi.org/project/bandit/) and `eslint` (https://eslint.org/) installed and configured for code linting\n* layout based on twitter bootstrap4\n* Google Analytics ready to go\n* See [ctlsettings](https://github.com/ccnmtl/ctlsettings) for more information on CTL settings setup.\n\n\n## How to use\n\n\n### Generate the project\n```bash\n$ django-admin.py startproject \\\n  --template=https://github.com/ccnmtl/ctldjango/archive/main.zip \\\n  --name=Dockerfile,Makefile,package.json,stats.html \\\n  --extension=py,yml \\\n  project_name\n```\nNote: On MacOS, sometimes an SSL error will occur when attempting to download the master.zip in this way. To get around this, download a copy of the ctldjango master.zip to your desktop, then execute:\n```bash\n$ django-admin.py startproject \\\n  --template=~/Desktop/ctldjango-main.zip \\\n  --name=Dockerfile,Makefile,package.json,stats.html \\\n  --extension=py,yml \\\n  project_name\n```\n\n`project_name` should be a python module name (ie, lowercase,\nno punctuation, etc). It will create a directory called\n`project_name` that has a django project in it.\n\n### Setup hidden files\n* `mv travis.yml .travis.yml` to activate Travis CI integration\n* `mv gitignore .gitignore` to configure git ignore\n* `mv eslintrc.js .eslintrc.js` to configure eslint\n* `mv bandit .bandit` to configure bandit security linting\n\n### Misc\n* Clear the README.md and add a bit about your project.\n* Update the `Project Name` string in `base.html` with your application's display name.\n\n### Check it in\n* Check the project into version control now.\n\n### Build\nWe use containment for django, with virtualenv:\n\n    $ make\n\nThat will create a `ve` directory which contains a virtualenv and has\nhad all the libraries specified in the `requirements.txt` file\ninstalled into it (this includes django itself). The `ve` directory\nshould never be checked in. If you need\nother libraries for your application, update `requirements.txt` then re-run `make`.\n\nKeep in mind that with virtualenv, there's no need to `activate` an\nenvironment. Instead, a ve has a `bin` directory which contains a\npython executable. If you use that instead of the system python\nexecutable, it uses the libraries in that virtualenv.\n\nctldjango assumes that your project will use a postgresql database\nwith the same name as your project. So, for our example, you would\nthen do:\n\n    $ createdb myprojectname\n\nand it is all set to use it:\n\n    $ make migrate\n\nwill install the tables that django needs for it's common apps (sites,\nsessions, admin, flatpages, etc).\n\nTests should pass out of the box:\n\n    $ make test\n\nThey can be run via Jenkins as well and generate the right reports in\na `reports` directory (which you will want to gitignore).\n\n    $ make jenkins\n\nYour application is ready to run now:\n\n    $ make runserver\n\nwill start a server on `http://localhost:8000/`. The admin app should\nbe accessible (via a user account created with\n`manage.py createsuperuser`)\nSo go ahead and login to `http://localhost:8000/admin/`\n\nEven without any application specific code, `flatpages` is included so\nyou can put content on the web right away.\n\nFrom this point out, it's basic django development. You'll probably\nwant to do a `./manage.py startapp` to create your own application\nwithin the project and so on.\n\n### AWS CodeBuild CD/CI Template files - Optional\nThere are two files `buildspec.yml` and `buildspec-staging.yml` within this repository.  This is an optional setup if you want to use AWS CodeBuild for deploying into the ECS stack.\n\nThe `buildspec.yml` deploys to the production cluster and the `buildspec-staging.yml` builds into the staging cluster.\n\nMore detail information on setting up the AWS ECS and AWS CodeBuild is within our Wiki documentation in the Runbook .\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccnmtl%2Fctldjango","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fccnmtl%2Fctldjango","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccnmtl%2Fctldjango/lists"}