@@ -0,0 +1,30 | |||||
|
1 | FROM bitnami/minideb:jessie | |||
|
2 | ||||
|
3 | # setup libraries | |||
|
4 | RUN install_packages python \ | |||
|
5 | python-pip \ | |||
|
6 | python-dev \ | |||
|
7 | gfortran \ | |||
|
8 | libpng-dev \ | |||
|
9 | freetype* \ | |||
|
10 | libblas-dev \ | |||
|
11 | liblapack-dev \ | |||
|
12 | libatlas-base-dev | |||
|
13 | # set working directory | |||
|
14 | RUN mkdir /radarsys | |||
|
15 | WORKDIR /radarsys | |||
|
16 | ||||
|
17 | # Copy the main application. | |||
|
18 | COPY . ./ | |||
|
19 | ||||
|
20 | # Install python dependences | |||
|
21 | RUN pip install -r requirements.txt | |||
|
22 | RUN python manage.py makemigrations \ | |||
|
23 | && python manage.py migrate \ | |||
|
24 | && python manage.py loaddata apps/main/fixtures/main_initial_data.json \ | |||
|
25 | && python manage.py loaddata apps/rc/fixtures/rc_initial_data.json \ | |||
|
26 | && python manage.py loaddata apps/jars/fixtures/jars_initial_data.json | |||
|
27 | ||||
|
28 | EXPOSE 3000 | |||
|
29 | CMD ["python", "manage.py", "runserver", "0.0.0.0:3000"] | |||
|
30 |
@@ -4,6 +4,9 from apps.main import views | |||||
4 |
|
4 | |||
5 | urlpatterns = ( |
|
5 | urlpatterns = ( | |
6 | url(r'^$', views.index, name='index'), |
|
6 | url(r'^$', views.index, name='index'), | |
|
7 | ||||
|
8 | url(r'^realtime/$', views.real_time, name='url_real_time'), | |||
|
9 | ||||
7 | url(r'^location/new/$', views.location_new, name='url_add_location'), |
|
10 | url(r'^location/new/$', views.location_new, name='url_add_location'), | |
8 | url(r'^location/$', views.locations, name='url_locations'), |
|
11 | url(r'^location/$', views.locations, name='url_locations'), | |
9 | url(r'^location/(?P<id_loc>-?\d+)/$', views.location, name='url_location'), |
|
12 | url(r'^location/(?P<id_loc>-?\d+)/$', views.location, name='url_location'), |
@@ -1707,3 +1707,17 def radar_refresh(request, id_camp, id_radar): | |||||
1707 | exp.get_status() |
|
1707 | exp.get_status() | |
1708 |
|
1708 | |||
1709 | return HttpResponseRedirect(reverse('url_operation', args=[id_camp])) |
|
1709 | return HttpResponseRedirect(reverse('url_operation', args=[id_camp])) | |
|
1710 | ||||
|
1711 | ||||
|
1712 | def real_time(request): | |||
|
1713 | ||||
|
1714 | graphic_path = "/home/fiorella/Pictures/catwbeanie.jpg" | |||
|
1715 | ||||
|
1716 | kwargs = {} | |||
|
1717 | kwargs['title'] = 'CLAIRE' | |||
|
1718 | kwargs['suptitle'] = 'Real Time' | |||
|
1719 | kwargs['no_sidebar'] = True | |||
|
1720 | kwargs['graphic_path'] = graphic_path | |||
|
1721 | kwargs['graphic1_path'] = 'http://www.bluemaize.net/im/girls-accessories/shark-beanie-11.jpg' | |||
|
1722 | ||||
|
1723 | return render(request, 'real_time.html', kwargs) No newline at end of file |
@@ -114,14 +114,19 USE_TZ = False | |||||
114 | # Static files (CSS, JavaScript, Images) |
|
114 | # Static files (CSS, JavaScript, Images) | |
115 | # https://docs.djangoproject.com/en/1.8/howto/static-files/ |
|
115 | # https://docs.djangoproject.com/en/1.8/howto/static-files/ | |
116 |
|
116 | |||
|
117 | MEDIA_ROOT = os.path.join(BASE_DIR, 'media') | |||
|
118 | MEDIA_URL = '/site_media/' | |||
|
119 | ||||
117 | STATIC_URL = '/static/' |
|
120 | STATIC_URL = '/static/' | |
118 | STATIC_ROOT = '/var/www/html/static/' |
|
121 | #STATIC_ROOT = '/var/www/html/static/' | |
|
122 | STATIC_ROOT = os.path.join(MEDIA_ROOT, 'static') | |||
119 |
|
123 | |||
120 | #STATICFILES_DIRS = ( |
|
124 | #STATICFILES_DIRS = ( | |
121 | # os.path.join(BASE_DIR, 'apps', 'main', 'static'), |
|
125 | # os.path.join(BASE_DIR, 'apps', 'main', 'static'), | |
122 | # |
|
126 | # | |
123 | #) |
|
127 | #) | |
124 |
|
128 | |||
|
129 | ||||
125 | STATICFILES_FINDERS = ( |
|
130 | STATICFILES_FINDERS = ( | |
126 | 'django.contrib.staticfiles.finders.FileSystemFinder', |
|
131 | 'django.contrib.staticfiles.finders.FileSystemFinder', | |
127 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|
132 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
General Comments 0
You need to be logged in to leave comments.
Login now