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
+41Lines changed: 41 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,47 @@ There is a short demo of the first version on YouTube: https://youtu.be/86HhxTRL
41
41
42
42
# Developers stuff
43
43
44
+
**DB creation**
45
+
46
+
You need PostgreSQL installed on your machine. To facilitate the configurations and if you are not familiar with PostgreSQL commands, I suggest to use a Db manager with UI: in my case, I use [pgAdmin](https://www.pgadmin.org/).
47
+
48
+
After the installation of PostgreSQL, use pgAdmin to create a ```django-emotion-classification``` database and a ```App_filemodel``` table.
49
+
50
+
The ```App_filemodel``` table can be created with the following script:
51
+
52
+
```
53
+
CREATE DATABASE django-emotion-classification;
54
+
55
+
CREATE USER marco WITH PASSWORD 'test';
56
+
57
+
CREATE TABLE App_filemodel (
58
+
id INT PRIMARY KEY NOT NULL,
59
+
file TEXT NOT NULL,
60
+
timestamp DATE NOT NULL,
61
+
path TEXT NOT NULL
62
+
);
63
+
64
+
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA django-emotion-classification TO marco;
65
+
66
+
ALTER USER marco CREATEDB; -- This is to run the automatic tests, otherwise you will get an "unable to create database" error when running python manage.py test
67
+
68
+
```
69
+
70
+
Please note the above script is made with the data available in my settings.py, but you can change it according to your needs.
0 commit comments