Skip to content

Commit 7865cd2

Browse files
committed
Initial commit
works locally without email functioality -> sign up of users
1 parent 31d7dfc commit 7865cd2

File tree

109 files changed

+2734
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+2734
-2
lines changed

.gitignore

+278
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,278 @@
1+
### Python template
2+
# Byte-compiled / optimized / DLL files
3+
__pycache__/
4+
*.py[cod]
5+
*$py.class
6+
7+
# C extensions
8+
*.so
9+
10+
# Distribution / packaging
11+
.Python
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
49+
# Translations
50+
*.mo
51+
*.pot
52+
53+
# Django stuff:
54+
staticfiles/
55+
56+
# Sphinx documentation
57+
docs/_build/
58+
59+
# PyBuilder
60+
target/
61+
62+
# pyenv
63+
.python-version
64+
65+
66+
67+
# Environments
68+
.venv
69+
venv/
70+
ENV/
71+
72+
# Rope project settings
73+
.ropeproject
74+
75+
# mkdocs documentation
76+
/site
77+
78+
# mypy
79+
.mypy_cache/
80+
81+
82+
### Node template
83+
# Logs
84+
logs
85+
*.log
86+
npm-debug.log*
87+
yarn-debug.log*
88+
yarn-error.log*
89+
90+
# Runtime data
91+
pids
92+
*.pid
93+
*.seed
94+
*.pid.lock
95+
96+
# Directory for instrumented libs generated by jscoverage/JSCover
97+
lib-cov
98+
99+
# Coverage directory used by tools like istanbul
100+
coverage
101+
102+
# nyc test coverage
103+
.nyc_output
104+
105+
# Bower dependency directory (https://bower.io/)
106+
bower_components
107+
108+
# node-waf configuration
109+
.lock-wscript
110+
111+
# Compiled binary addons (http://nodejs.org/api/addons.html)
112+
build/Release
113+
114+
# Dependency directories
115+
node_modules/
116+
jspm_packages/
117+
118+
# Typescript v1 declaration files
119+
typings/
120+
121+
# Optional npm cache directory
122+
.npm
123+
124+
# Optional eslint cache
125+
.eslintcache
126+
127+
# Optional REPL history
128+
.node_repl_history
129+
130+
# Output of 'npm pack'
131+
*.tgz
132+
133+
# Yarn Integrity file
134+
.yarn-integrity
135+
136+
137+
### Linux template
138+
*~
139+
140+
# temporary files which can be created if a process still has a handle open of a deleted file
141+
.fuse_hidden*
142+
143+
# KDE directory preferences
144+
.directory
145+
146+
# Linux trash folder which might appear on any partition or disk
147+
.Trash-*
148+
149+
# .nfs files are created when an open file is removed but is still being accessed
150+
.nfs*
151+
152+
153+
### VisualStudioCode template
154+
.vscode/*
155+
!.vscode/settings.json
156+
!.vscode/tasks.json
157+
!.vscode/launch.json
158+
!.vscode/extensions.json
159+
160+
161+
162+
163+
164+
### Windows template
165+
# Windows thumbnail cache files
166+
Thumbs.db
167+
ehthumbs.db
168+
ehthumbs_vista.db
169+
170+
# Dump file
171+
*.stackdump
172+
173+
# Folder config file
174+
Desktop.ini
175+
176+
# Recycle Bin used on file shares
177+
$RECYCLE.BIN/
178+
179+
# Windows Installer files
180+
*.cab
181+
*.msi
182+
*.msm
183+
*.msp
184+
185+
# Windows shortcuts
186+
*.lnk
187+
188+
189+
### macOS template
190+
# General
191+
*.DS_Store
192+
.AppleDouble
193+
.LSOverride
194+
195+
# Icon must end with two \r
196+
Icon
197+
198+
# Thumbnails
199+
._*
200+
201+
# Files that might appear in the root of a volume
202+
.DocumentRevisions-V100
203+
.fseventsd
204+
.Spotlight-V100
205+
.TemporaryItems
206+
.Trashes
207+
.VolumeIcon.icns
208+
.com.apple.timemachine.donotpresent
209+
210+
# Directories potentially created on remote AFP share
211+
.AppleDB
212+
.AppleDesktop
213+
Network Trash Folder
214+
Temporary Items
215+
.apdisk
216+
217+
218+
### SublimeText template
219+
# Cache files for Sublime Text
220+
*.tmlanguage.cache
221+
*.tmPreferences.cache
222+
*.stTheme.cache
223+
224+
# Workspace files are user-specific
225+
*.sublime-workspace
226+
227+
# Project files should be checked into the repository, unless a significant
228+
# proportion of contributors will probably not be using Sublime Text
229+
# *.sublime-project
230+
231+
# SFTP configuration file
232+
sftp-config.json
233+
234+
# Package control specific files
235+
Package Control.last-run
236+
Package Control.ca-list
237+
Package Control.ca-bundle
238+
Package Control.system-ca-bundle
239+
Package Control.cache/
240+
Package Control.ca-certs/
241+
Package Control.merged-ca-bundle
242+
Package Control.user-ca-bundle
243+
oscrypto-ca-bundle.crt
244+
bh_unicode_properties.cache
245+
246+
# Sublime-github package stores a github token in this file
247+
# https://packagecontrol.io/packages/sublime-github
248+
GitHub.sublime-settings
249+
250+
251+
### Vim template
252+
# Swap
253+
[._]*.s[a-v][a-z]
254+
[._]*.sw[a-p]
255+
[._]s[a-v][a-z]
256+
[._]sw[a-p]
257+
258+
# Session
259+
Session.vim
260+
261+
# Temporary
262+
.netrwhist
263+
264+
# Auto-generated tag files
265+
tags
266+
267+
268+
### Project template
269+
270+
civictechindexadmin/media/
271+
272+
.pytest_cache/
273+
274+
275+
.ipython/
276+
.env
277+
.envs/*
278+
!.envs/.local/

Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: gunicorn config.wsgi --log-file -

Procfile.windows

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: python manage.py runserver 0.0.0.0:5000

README.md

+45-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,45 @@
1-
# test-civictechindexadmin
2-
Testing Civic Tech Index Backend
1+
# Python: Getting Started
2+
3+
A barebones Django app, which can easily be deployed to Heroku.
4+
5+
This application supports the [Getting Started with Python on Heroku](https://devcenter.heroku.com/articles/getting-started-with-python) article - check it out.
6+
7+
## Running Locally
8+
9+
Make sure you have Python 3.7 [installed locally](http://install.python-guide.org). To push to Heroku, you'll need to install the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli), as well as [Postgres](https://devcenter.heroku.com/articles/heroku-postgresql#local-setup).
10+
11+
```sh
12+
$ git clone https://github.com/heroku/python-getting-started.git
13+
$ cd python-getting-started
14+
15+
$ python3 -m venv getting-started
16+
$ pip install -r requirements.txt
17+
18+
$ createdb python_getting_started
19+
20+
$ python manage.py migrate
21+
$ python manage.py collectstatic
22+
23+
$ heroku local
24+
```
25+
26+
Your app should now be running on [localhost:5000](http://localhost:5000/).
27+
28+
## Deploying to Heroku
29+
30+
```sh
31+
$ heroku create
32+
$ git push heroku master
33+
34+
$ heroku run python manage.py migrate
35+
$ heroku open
36+
```
37+
or
38+
39+
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
40+
41+
## Documentation
42+
43+
For more information about using Python on Heroku, see these Dev Center articles:
44+
45+
- [Python on Heroku](https://devcenter.heroku.com/categories/python)

app.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "Start on Heroku: Python",
3+
"description": "A barebones Python app, which can easily be deployed to Heroku.",
4+
"image": "heroku/python",
5+
"repository": "https://github.com/heroku/python-getting-started",
6+
"keywords": ["python", "django" ],
7+
"addons": [ "heroku-postgresql" ],
8+
"env": {
9+
"SECRET_KEY": {
10+
"description": "The secret key for the Django application.",
11+
"generator": "secret"
12+
}
13+
},
14+
"environments": {
15+
"test": {
16+
"scripts": {
17+
"test-setup": "python manage.py collectstatic --noinput",
18+
"test": "python manage.py test"
19+
}
20+
}
21+
}
22+
}

civictechindexadmin/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.1.0"

civictechindexadmin/conftest.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import pytest
2+
3+
from civictechindexadmin.users.models import User
4+
from civictechindexadmin.users.tests.factories import UserFactory
5+
6+
7+
@pytest.fixture(autouse=True)
8+
def media_storage(settings, tmpdir):
9+
settings.MEDIA_ROOT = tmpdir.strpath
10+
11+
12+
@pytest.fixture
13+
def user() -> User:
14+
return UserFactory()
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""
2+
To understand why this file is here, please read:
3+
4+
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
5+
"""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""
2+
To understand why this file is here, please read:
3+
4+
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
5+
"""

0 commit comments

Comments
 (0)