| author | durandn |
| Fri, 24 Jun 2016 12:36:44 +0200 | |
| changeset 33 | f9d4c9a63e4e |
| parent 25 | 843863132ac9 |
| child 44 | 6730ec4d7e37 |
| permissions | -rw-r--r-- |
| 25 | 1 |
# How to start? |
2 |
||
3 |
1. Make sure PIP is installed then install Django and others dependencies with |
|
4 |
||
5 |
``` |
|
6 |
pip install -r requirements.txt |
|
7 |
||
8 |
``` |
|
9 |
||
10 |
2. Move to src/iconolab/static/js to install js dependencies. |
|
11 |
Make sure your have installed nodejs then run the command bellow |
|
12 |
||
13 |
``` |
|
14 |
npm install |
|
15 |
||
16 |
``` |
|
17 |
3. To recreate the bundle file that lives in dist/ |
|
18 |
||
19 |
``` |
|
20 |
npm build |
|
21 |
||
22 |
``` |
|
23 |
||
24 |
4. To add a new js module, you can add it to the js/components folder and then run |
|
25 |
||
26 |
``` |
|
27 |
npm start |
|
28 |
``` |
|
29 |
||
30 |
## ICONOLAB ## |
|
31 |
||
32 |
### 1. Configuration and setup |
|
33 |
||
34 |
### virtualenv |
|
35 |
||
36 |
- Install pip |
|
37 |
- Create a virtualenv for the project (using virtualenvwrapper is a good idea if possible). Python version is 3.5.1 |
|
38 |
- Run |
|
39 |
||
40 |
pip install -r requirements.txt |
|
41 |
||
42 |
||
43 |
### node.js |
|
44 |
||
45 |
- Make sure nodejs is installed |
|
46 |
- cd into iconolab/src/iconolab/static/iconolab/js and run |
|
47 |
||
48 |
npm install |
|
49 |
||
50 |
- To recreate the bundle file that lives in dist/ |
|
51 |
||
52 |
npm build |
|
53 |
||
54 |
- To add a new js module, you can add it to the js/components folder and then run |
|
55 |
||
56 |
npm start |
|
57 |
||
58 |
### Django project setup |
|
59 |
||
60 |
- Copy iconolab/src/settings/dev.py.tmpl into iconolab/src/settings/dev.py, adapt content to configuration |
|
61 |
- cd into iconolab/src folder and run |
|
62 |
||
63 |
python manage.py migrate |
|
64 |
||
65 |
to create database tables |
|
66 |
||
67 |
- Run |
|
68 |
||
69 |
python manage.py createsuperuser |
|
70 |
||
71 |
to create an admin user |
|
72 |
||
73 |
- Run |
|
74 |
||
75 |
python manage.py loaddata dev_initial_data |
|
76 |
||
77 |
to load the provided data fixture. This fixture will create at least one of each object used in the app. Details on the fixture data below. |
|
78 |
||
79 |
||
80 |
### 2. Development server |
|
81 |
||
82 |
- cd into the iconolab/src folder and run |
|
83 |
||
84 |
python manage.py runserver |
|
85 |
||
86 |
By default, the app is accessible through http://127.0.0.1:8000/home |
|
87 |
||
88 |
||
89 |
### 3. Fixture loaded data |
|
90 |
||
91 |
* User: contributeur1, password: firstuser |
|
92 |
* User: contributeur2, password: seconduser |
|
93 |
||
94 |
* Collection (name): ingres |
|
95 |
* Image (ref): 1234567890 # You will need to move napoleon.jpg into web/media/uploads in order for the app to load the image properly |
|
96 |
* Annotation (guid): 34ae39ae-a9a2-4736-bc59-ba6f00e37f52 |
|
97 |
||
98 |
To access the loaded annotation, follow: |
|
99 |
||
|
33
f9d4c9a63e4e
Backend work on tags (needs testing) + model changes (image_guid, Tag)
durandn
parents:
25
diff
changeset
|
100 |
/collections/ingres/images/26aec320-dcfe-4cbc-b912-6a6c13e8916e/annotations/34ae39ae-a9a2-4736-bc59-ba6f00e37f52/detail |
|
f9d4c9a63e4e
Backend work on tags (needs testing) + model changes (image_guid, Tag)
durandn
parents:
25
diff
changeset
|
101 |
/collections/ingres/images/26aec320-dcfe-4cbc-b912-6a6c13e8916e/annotations/34ae39ae-a9a2-4736-bc59-ba6f00e37f52/edit |
| 25 | 102 |
|
103 |
The annotation owner is contributeur1, if you try to edit it as another user, it will create the revision but will not publish it in the current state of the project. |
|
104 |