You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+29-3Lines changed: 29 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@
15
15
-[Setup](#setup)
16
16
-[Secret Key](#secretkey)
17
17
-[Configure your .env](#configure-env)
18
+
-[DataBase](#database)
18
19
-[Version](#version)
19
20
-[Videos](#videos)
20
21
@@ -23,9 +24,11 @@
23
24
24
25
You can use Docker Image
25
26
27
+
The current version of the project is 1.2, which is considered the most stable and reliable release available. This version has undergone extensive testing and debugging to ensure a high level of stability and performance.
28
+
26
29
```
27
-
sudo docker pull xandouglas/switchsetup:v1.1
28
-
sudo docker run -p 8000:8000 --name switchsetup -d xandouglas/switchsetup:v1.1
30
+
sudo docker pull xandouglas/switchsetup:v1.2
31
+
sudo docker run -p 8000:8000 --name switchsetup -d xandouglas/switchsetup:v1.2
29
32
```
30
33
31
34
After creating the image, use for login:
@@ -45,12 +48,14 @@ To set up the project locally, please follow these steps:
45
48
5. You can run it in your terminal or dockerfile
46
49
47
50
### Terminal: **(Before starting run [Configure your .env](#configure-env))**
51
+
48
52
```
49
53
cd WebApi
50
54
python manage.py runserver
51
55
```
52
56
53
57
### Dockerfile: **(Before starting run [Configure your .env](#configure-env))**
58
+
54
59
```
55
60
docker build -t image_name
56
61
docker run -p 8000:8000 image_name
@@ -59,7 +64,7 @@ docker run -p 8000:8000 image_name
59
64
60
65
## SecretKey
61
66
62
-
Start the Python interpreter
67
+
Start the **Python interpreter**
63
68
```
64
69
import secrets
65
70
secrets.token_hex(32)
@@ -77,6 +82,27 @@ DEBUG=True
77
82
```
78
83
**Use DEBUG=TRUE only when in development.**
79
84
85
+
## Database
86
+
87
+
We use SQLite at first, but it is possible to manage other databases.
88
+
89
+
Use [Django's](https://docs.djangoproject.com/en/4.2/ref/databases/) own reference.
90
+
91
+
If you lose the database file or decide to switch to a different one, you will need to follow these steps:
92
+
93
+
1. Generate a new migration ( **Inside the WebApi file** )
94
+
95
+
96
+
```
97
+
python manage.py makemigrations
98
+
python manage.py migrate
99
+
```
100
+
101
+
2. Create a new user ( **Inside the WebApi file** )
0 commit comments