| author | durandn |
| Tue, 16 Aug 2016 11:01:35 +0200 | |
| changeset 126 | b5aa7e6f6a01 |
| parent 46 | 86608f92ebed |
| child 140 | b0aae3bc25d2 |
| 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 |
||
|
44
6730ec4d7e37
fixing js dependencies
Harris Baptiste <harris.baptiste@iri.centrepompidou.fr>
parents:
33
diff
changeset
|
10 |
2. Move to src/iconolab/static/js/iconolab-bundle to install js dependencies. |
| 25 | 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 |
``` |
|
|
46
86608f92ebed
fixing tags
Harris Baptiste <harris.baptiste@iri.centrepompidou.fr>
parents:
44
diff
changeset
|
20 |
npm run build |
| 25 | 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 |