-
BERJON Matthieu authored
The webapp creation is done in two steps. A first step that writes the information in the database. Once the controller has created the sandbox, the user is allowed to push its application on it and create a new version. I updated the models in order to satisfy the current state of the rails database. I transformed the `sandbox_version_id` as a foreign key as it's supposed to be in the rails `Webapp` model. I updated the `WebappVersion` model to add the `state` possible choices. I updated the webapp sandbox form in order to take into account the `WebappVersion` model and add the related necessary fields. I updated the `UserWebappListView` view to match the updated model. I used as well a context object name to get a handle in the template with a meaningful name. The `WebappCreateView` now create an object in the database with all the necessary data. The `WebappSandboxCreationView` view create the sandbox and update the Webapp model with the new version that has been committed. I updated the templates in order to perform several specific actions. I added a block called `meta` in the base template. The underlying idea is to be able to supercharge on page basis the meta tags in the head of the page. It used in the `webapp_creation_form.html` file where the refresh every 5 seconds the page to read the database in order to know when the sandbox is in its "running" state. Afterwards the meta tag is removed to access the sandbox creation form in order to commit a new version. Resolves: #170 Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr>
1725aeac