====== Web Interface Development ====== === How to add a new app === * create a new directory inside ''prima-web-interface/src'' * create the following subdirectories * ''templates'' to store template html and js files, i.e. using jinja instructions * ''static'' to store fixed html, js or css files * create the following files * ''urls.py'' containing the list of URL patterns for the app * ''views.py'' containing the functions to be executed on GET on POST requests * update ''src/prima_site/settings.py''', adding the name of the new directory where needed * add an ''include'' in ''src/main/urls.py'' * update the appropriate template file in ''src/main/templates/'' to set the proper URL on the proper link. The URL has to be one of those defined in ''urls.py'' == Using Static files == Static files are e.g. html, js or css files which are included in the html code. To include them correctly use a tag like {% static '' %} where '''' contains no path. == Using Models == Models are container classes which can be used to store data in the DB. * define the model classes in ''models.py'' in the app directory * add the model class names in ''src/main/admin.py'' == Introductory Slides == [[https://seafile.rlp.net/smart-link/1bf7e8d0-c0cb-432f-a959-66425881e584/?dl=1]]