From f8f2117ec62de7a4c30ea1b48cee5c5c38d6d1ab Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Sun, 11 Sep 2016 20:08:31 -0400 Subject: [PATCH 1/3] Update README.md --- README.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 626aa205..15479e35 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,69 @@ A web interface for [OpenDroneMap](https://github.com/OpenDroneMap/OpenDroneMap). +![Alt text](/screenshots/ui-mockup.png?raw=true "WebODM") + +This is currently a work in progress! See the Roadmap below. + +## Getting Started + +The quickest way to get started is by using Docker. + +* From the Docker Quickstart Terminal (Windows / OSX) or from the command line (Linux) type: +``` +git clone https://github.com/OpenDroneMap/WebODM +cd WebODM +docker-compose up +``` + +* If you're on Windows/OSX, find the IP of your Docker machine by running this command from your Docker Quickstart Terminal: + +``` +docker-machine ip +``` + +Linux users can connect to 127.0.0.1. + +* Open a Web Browser to `http://:8000` +* Default username is "admin:admin" + +## Run it natively + +If you want to run WebODM natively, you will need to install: + * PostgreSQL (>= 9.5) + * Python 2.7 + +Then these steps should be sufficient to get you up and running: + +``` +git clone https://github.com/OpenDroneMap/WebODM +``` + +Create a `WebODM\webodm\local_settings.py` file containing: + +``` +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'webodm_dev', + 'USER': 'postgres', + 'PASSWORD': 'postgres', + 'HOST': 'localhost', + 'PORT': '5432', + } +} +``` + +Then: + +``` +pip install -r requirements.txt +chmod +x start.sh && ./start.sh +``` + ## Roadmap - [X] User Registration / Authentication -- [ ] UI mockup +- [X] UI mockup - [ ] Task Processing - [ ] Model display (using Cesium/Leaflet) for both 2D and 3D outputs. - [ ] Cluster management and setup. @@ -28,4 +88,4 @@ A web interface for [OpenDroneMap](https://github.com/OpenDroneMap/OpenDroneMap) ## Work in progress -We will add more information to this document soon (including information on how to get started). +We will add more information to this document soon. From 456733b7f2607a1c632f6ef468051bcfcf773216 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Sun, 11 Sep 2016 20:11:15 -0400 Subject: [PATCH 2/3] Fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 15479e35..e0a2183f 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ docker-machine ip Linux users can connect to 127.0.0.1. * Open a Web Browser to `http://:8000` -* Default username is "admin:admin" +* Log in with the default credentials: "admin:admin" ## Run it natively From 24ccce7b88480b5fba37e7279083ff452757e004 Mon Sep 17 00:00:00 2001 From: Ves Nikos Date: Mon, 12 Sep 2016 11:19:00 +0100 Subject: [PATCH 3/3] added fixtures for tests, updated tests to use fixtures --- app/fixtures/test_project.yaml | 12 ++++++++++++ app/fixtures/test_users.yaml | 32 ++++++++++++++++++++++++++++++++ app/tests.py | 17 +++++++++-------- 3 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 app/fixtures/test_project.yaml create mode 100644 app/fixtures/test_users.yaml diff --git a/app/fixtures/test_project.yaml b/app/fixtures/test_project.yaml new file mode 100644 index 00000000..b40b3d49 --- /dev/null +++ b/app/fixtures/test_project.yaml @@ -0,0 +1,12 @@ +- model: app.project + pk: 1 + fields: {owner: 2, name: Test_Project2, description: This is a test project, created_at: ! '2016-09-12 + 10:08:39.045372+00:00'} +- model: app.project + pk: 2 + fields: {owner: 1, name: Test_Project1, description: This is a test project, created_at: ! '2016-09-12 + 10:08:58.533742+00:00'} +- model: app.project + pk: 3 + fields: {owner: 1, name: Test_Project3, description: This is a test project, created_at: ! '2016-09-12 + 10:11:31.357885+00:00'} \ No newline at end of file diff --git a/app/fixtures/test_users.yaml b/app/fixtures/test_users.yaml new file mode 100644 index 00000000..a66b302e --- /dev/null +++ b/app/fixtures/test_users.yaml @@ -0,0 +1,32 @@ +- model: auth.user + pk: 1 + fields: + # password: test1234 + password: pbkdf2_sha256$30000$pFwIz88hEEZ4$siNaZefZB3bb0DlemWNOkj6+tCq3I3LW+IgVw5VsRmE= + last_login: null + is_superuser: true + username: testuser + first_name: '' + last_name: '' + email: test@mail.com + is_staff: true + is_active: true + date_joined: 2016-09-11 22:26:52.582858+00:00 + groups: [] + user_permissions: [] +- model: auth.user + pk: 2 + fields: + # password: test1234 + password: pbkdf2_sha256$30000$pFwIz88hEEZ4$siNaZefZB3bb0DlemWNOkj6+tCq3I3LW+IgVw5VsRmE= + last_login: null + is_superuser: true + username: testuser2 + first_name: '' + last_name: '' + email: test2@mail.com + is_staff: true + is_active: true + date_joined: 2016-09-11 22:26:52.582858+00:00 + groups: [] + user_permissions: [] \ No newline at end of file diff --git a/app/tests.py b/app/tests.py index 39be5fb3..8698e224 100644 --- a/app/tests.py +++ b/app/tests.py @@ -3,24 +3,25 @@ from django.test import TestCase from django.contrib.auth.models import User, Group from django.test import Client +from .models import Project,Task # Create your tests here. class TestUser(TestCase): + + fixtures = ['test_users', ] + def setUp(self): self.credentials = { 'username': 'testuser', - 'password': 'secret', + 'password': 'test1234', 'email': 'test@mail.com'} - self.u = User.objects.create_user( - username=self.credentials['username'], - email=self.credentials['email'], - password=self.credentials['password'], - is_superuser=True - ) + # Create a test Group my_group, created = Group.objects.get_or_create(name='test_group') - self.u.groups.add(my_group) + + # Add user to test Group + User.objects.get(pk=1).groups.add(my_group) def tearDown(self): pass