Skip to content

Commit c27994e

Browse files
first commit
0 parents  commit c27994e

20 files changed

+569
-0
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
indent_size = 4
5+
indent_style = space
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
end_of_line = crlf
9+
10+
[*.yml]
11+
indent_size = 2

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.venv
2+
.env
3+
__pycache__
4+
*.sqlite3
5+
staticfiles/
6+
media/
7+
.coverage
8+
htmlcov/
9+
temp/
10+
*.pid
11+
*.log

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Keep learning
2+
3+
## Develop
4+
5+
### Python version
6+
3.9
7+
8+
### Create virtual environment
9+
```
10+
python -m venv .venv
11+
```
12+
13+
### Activate virtual environment
14+
```
15+
.venv\Scripts\activate
16+
```
17+
18+
### Install dependencies
19+
```
20+
python -m pip install --upgrade pip
21+
pip install -r requirements.txt
22+
```
23+
24+
### Migrate database
25+
```
26+
python manage.py migrate
27+
```
28+
29+
### Run development server
30+
```
31+
python manage.py runserver
32+
```
33+
34+
### Debug
35+
#### For Visual studio code
36+
Just press F5 (Config is inside `.vscode/`)
37+
38+
#### For other editors
39+
Please contribute if you know how.
40+
41+
### Config environment variables
42+
Default variables should work out of the box already, but in case you want to customize, here is how.
43+
44+
Add `.env` file and write your custom variables to it.
45+
46+
Available variables and their data type can be seen in `keep_learning/settings.py`:
47+
```
48+
env = environ.Env(
49+
... # Variables are listed here
50+
)
51+
```
52+
53+
### Browsable API
54+
You can login to the browsable API and explore it to help with development.
55+
#### Collect static
56+
```
57+
python manage.py collectstatic
58+
```
59+
60+
#### Browse!
61+
Go to this URL in your brower. (You may need to register new user and then login if you haven't already)
62+
```
63+
http://localhost:8000/
64+
```

account/__init__.py

Whitespace-only changes.

account/admin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.contrib import admin
2+
3+
# Register your models here.

account/apps.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from django.apps import AppConfig
2+
3+
4+
class AccountConfig(AppConfig):
5+
default_auto_field = 'django.db.models.BigAutoField'
6+
name = 'account'

account/migrations/__init__.py

Whitespace-only changes.

account/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.db import models
2+
3+
# Create your models here.

account/tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.test import TestCase
2+
3+
# Create your tests here.

account/views.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.shortcuts import render
2+
3+
# Create your views here.

0 commit comments

Comments
 (0)