@@ -1,159 +1,159 | |||||
1 | # Django settings for abs_webapp_dev project. |
|
1 | # Django settings for abs_webapp_dev project. | |
2 |
|
2 | |||
3 | import os |
|
3 | import os | |
4 | PROJECT_DIR = os.path.split(os.path.dirname(__file__))[0] |
|
4 | PROJECT_DIR = os.path.split(os.path.dirname(__file__))[0] | |
5 |
|
5 | |||
6 | DEBUG = True |
|
6 | DEBUG = True | |
7 | TEMPLATE_DEBUG = DEBUG |
|
7 | TEMPLATE_DEBUG = DEBUG | |
8 |
|
8 | |||
9 | ADMINS = ( |
|
9 | ADMINS = ( | |
10 | # ('Your Name', 'your_email@example.com'), |
|
10 | # ('Your Name', 'your_email@example.com'), | |
11 | ) |
|
11 | ) | |
12 |
|
12 | |||
13 | MANAGERS = ADMINS |
|
13 | MANAGERS = ADMINS | |
14 |
|
14 | |||
15 | DATABASES = { |
|
15 | DATABASES = { | |
16 | 'default': { |
|
16 | 'default': { | |
17 | 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. |
|
17 | 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. | |
18 | 'NAME': 'db_jrowebapp_dev', # Or path to database file if using sqlite3. |
|
18 | 'NAME': 'db_jrowebapp_dev', # Or path to database file if using sqlite3. | |
19 | 'USER': 'abscontrol', # Not used with sqlite3. |
|
19 | 'USER': 'abscontrol', # Not used with sqlite3. | |
20 | 'PASSWORD': 'abscontrol', # Not used with sqlite3. |
|
20 | 'PASSWORD': 'abscontrol', # Not used with sqlite3. | |
21 | 'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3. |
|
21 | 'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3. | |
22 | 'PORT': '3306', # Set to empty string for default. Not used with sqlite3. |
|
22 | 'PORT': '3306', # Set to empty string for default. Not used with sqlite3. | |
23 | } |
|
23 | } | |
24 | } |
|
24 | } | |
25 |
|
25 | |||
26 | # Local time zone for this installation. Choices can be found here: |
|
26 | # Local time zone for this installation. Choices can be found here: | |
27 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
|
27 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name | |
28 | # although not all choices may be available on all operating systems. |
|
28 | # although not all choices may be available on all operating systems. | |
29 | # In a Windows environment this must be set to your system time zone. |
|
29 | # In a Windows environment this must be set to your system time zone. | |
30 | TIME_ZONE = 'America/Lima' |
|
30 | TIME_ZONE = 'America/Lima' | |
31 |
|
31 | |||
32 | # Language code for this installation. All choices can be found here: |
|
32 | # Language code for this installation. All choices can be found here: | |
33 | # http://www.i18nguy.com/unicode/language-identifiers.html |
|
33 | # http://www.i18nguy.com/unicode/language-identifiers.html | |
34 | LANGUAGE_CODE = 'en-us' |
|
34 | LANGUAGE_CODE = 'en-us' | |
35 |
|
35 | |||
36 | SITE_ID = 1 |
|
36 | SITE_ID = 1 | |
37 |
|
37 | |||
38 | # If you set this to False, Django will make some optimizations so as not |
|
38 | # If you set this to False, Django will make some optimizations so as not | |
39 | # to load the internationalization machinery. |
|
39 | # to load the internationalization machinery. | |
40 | USE_I18N = True |
|
40 | USE_I18N = True | |
41 |
|
41 | |||
42 | # If you set this to False, Django will not format dates, numbers and |
|
42 | # If you set this to False, Django will not format dates, numbers and | |
43 | # calendars according to the current locale. |
|
43 | # calendars according to the current locale. | |
44 | USE_L10N = True |
|
44 | USE_L10N = True | |
45 |
|
45 | |||
46 | # If you set this to False, Django will not use timezone-aware datetimes. |
|
46 | # If you set this to False, Django will not use timezone-aware datetimes. | |
47 | USE_TZ = True |
|
47 | USE_TZ = True | |
48 |
|
48 | |||
49 | # Absolute filesystem path to the directory that will hold user-uploaded files. |
|
49 | # Absolute filesystem path to the directory that will hold user-uploaded files. | |
50 | # Example: "/home/media/media.lawrence.com/media/" |
|
50 | # Example: "/home/media/media.lawrence.com/media/" | |
51 | MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media').replace('\\', '/') |
|
51 | MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media').replace('\\', '/') | |
52 |
|
52 | |||
53 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
53 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a | |
54 | # trailing slash. |
|
54 | # trailing slash. | |
55 | # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" |
|
55 | # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" | |
56 | MEDIA_URL = '/media/' |
|
56 | MEDIA_URL = '/media/' | |
57 |
|
57 | |||
58 | # Absolute path to the directory static files should be collected to. |
|
58 | # Absolute path to the directory static files should be collected to. | |
59 | # Don't put anything in this directory yourself; store your static files |
|
59 | # Don't put anything in this directory yourself; store your static files | |
60 | # in apps' "static/" subdirectories and in STATICFILES_DIRS. |
|
60 | # in apps' "static/" subdirectories and in STATICFILES_DIRS. | |
61 | # Example: "/home/media/media.lawrence.com/static/" |
|
61 | # Example: "/home/media/media.lawrence.com/static/" | |
62 | STATIC_ROOT = os.path.join(PROJECT_DIR, 'static-serve').replace('\\', '/'), |
|
62 | #STATIC_ROOT = os.path.join(PROJECT_DIR, 'static-serve').replace('\\', '/'), | |
|
63 | STATIC_ROOT = '' | |||
63 |
|
64 | |||
64 | # URL prefix for static files. |
|
65 | # URL prefix for static files. | |
65 | # Example: "http://media.lawrence.com/static/" |
|
66 | # Example: "http://media.lawrence.com/static/" | |
66 | STATIC_URL = '/static/' |
|
67 | STATIC_URL = '/static/' | |
67 |
|
68 | |||
68 | # Additional locations of static files |
|
69 | # Additional locations of static files | |
69 | STATICFILES_DIRS = ( |
|
70 | STATICFILES_DIRS = ( | |
70 | # Put strings here, like "/home/html/static" or "C:/www/django/static". |
|
71 | # Put strings here, like "/home/html/static" or "C:/www/django/static". | |
71 | # Always use forward slashes, even on Windows. |
|
72 | # Always use forward slashes, even on Windows. | |
72 | # Don't forget to use absolute paths, not relative paths. |
|
73 | # Don't forget to use absolute paths, not relative paths. | |
73 | os.path.join(PROJECT_DIR, "static").replace('\\', '/'), |
|
74 | #os.path.join(PROJECT_DIR, "static").replace('\\', '/'), | |
|
75 | ("static", os.path.join(PROJECT_DIR, "static").replace('\\', '/')), | |||
74 | ) |
|
76 | ) | |
75 |
|
77 | |||
76 | # List of finder classes that know how to find static files in |
|
78 | # List of finder classes that know how to find static files in | |
77 | # various locations. |
|
79 | # various locations. | |
78 | STATICFILES_FINDERS = ( |
|
80 | STATICFILES_FINDERS = ( | |
79 | 'django.contrib.staticfiles.finders.FileSystemFinder', |
|
81 | 'django.contrib.staticfiles.finders.FileSystemFinder', | |
80 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|
82 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', | |
81 | # 'django.contrib.staticfiles.finders.DefaultStorageFinder', |
|
83 | # 'django.contrib.staticfiles.finders.DefaultStorageFinder', | |
82 | ) |
|
84 | ) | |
83 |
|
85 | |||
84 | # Make this unique, and don't share it with anybody. |
|
86 | # Make this unique, and don't share it with anybody. | |
85 | SECRET_KEY = '=^abu)gd=)7hf#rme_vw=tv!bdh7+tts*^&)h(n=7@7(9#__@e' |
|
87 | SECRET_KEY = '=^abu)gd=)7hf#rme_vw=tv!bdh7+tts*^&)h(n=7@7(9#__@e' | |
86 |
|
88 | |||
87 | # List of callables that know how to import templates from various sources. |
|
89 | # List of callables that know how to import templates from various sources. | |
88 | TEMPLATE_LOADERS = ( |
|
90 | TEMPLATE_LOADERS = ( | |
89 | 'django.template.loaders.filesystem.Loader', |
|
91 | 'django.template.loaders.filesystem.Loader', | |
90 | 'django.template.loaders.app_directories.Loader', |
|
92 | 'django.template.loaders.app_directories.Loader', | |
91 | # 'django.template.loaders.eggs.Loader', |
|
93 | # 'django.template.loaders.eggs.Loader', | |
92 | ) |
|
94 | ) | |
93 |
|
95 | |||
94 | MIDDLEWARE_CLASSES = ( |
|
96 | MIDDLEWARE_CLASSES = ( | |
95 | 'django.middleware.common.CommonMiddleware', |
|
97 | 'django.middleware.common.CommonMiddleware', | |
96 | 'django.contrib.sessions.middleware.SessionMiddleware', |
|
98 | 'django.contrib.sessions.middleware.SessionMiddleware', | |
97 | 'django.middleware.csrf.CsrfViewMiddleware', |
|
99 | #'django.middleware.csrf.CsrfViewMiddleware', | |
98 | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
100 | 'django.contrib.auth.middleware.AuthenticationMiddleware', | |
99 | 'django.contrib.messages.middleware.MessageMiddleware', |
|
101 | 'django.contrib.messages.middleware.MessageMiddleware', | |
100 | # Uncomment the next line for simple clickjacking protection: |
|
102 | # Uncomment the next line for simple clickjacking protection: | |
101 | # 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
|
103 | # 'django.middleware.clickjacking.XFrameOptionsMiddleware', | |
102 | ) |
|
104 | ) | |
103 |
|
105 | |||
104 | ROOT_URLCONF = 'abs_webapp_dev.urls' |
|
106 | ROOT_URLCONF = 'abs_webapp_dev.urls' | |
105 |
|
107 | |||
106 | # Python dotted path to the WSGI application used by Django's runserver. |
|
108 | # Python dotted path to the WSGI application used by Django's runserver. | |
107 | WSGI_APPLICATION = 'abs_webapp_dev.wsgi.application' |
|
109 | WSGI_APPLICATION = 'abs_webapp_dev.wsgi.application' | |
108 |
|
110 | |||
109 | TEMPLATE_DIRS = ( |
|
111 | TEMPLATE_DIRS = ( | |
110 | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
|
112 | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". | |
111 | # Always use forward slashes, even on Windows. |
|
113 | # Always use forward slashes, even on Windows. | |
112 | # Don't forget to use absolute paths, not relative paths. |
|
114 | # Don't forget to use absolute paths, not relative paths. | |
113 | os.path.join(PROJECT_DIR, "templates").replace('\\', '/'), |
|
115 | os.path.join(PROJECT_DIR, "templates").replace('\\', '/'), | |
114 | ) |
|
116 | ) | |
115 |
|
117 | |||
116 | INSTALLED_APPS = ( |
|
118 | INSTALLED_APPS = ( | |
117 | 'django.contrib.auth', |
|
119 | 'django.contrib.auth', | |
118 | 'django.contrib.contenttypes', |
|
120 | 'django.contrib.contenttypes', | |
119 | 'django.contrib.sessions', |
|
121 | 'django.contrib.sessions', | |
120 | 'django.contrib.sites', |
|
122 | 'django.contrib.sites', | |
121 | 'django.contrib.messages', |
|
123 | 'django.contrib.messages', | |
122 | 'django.contrib.staticfiles', |
|
124 | 'django.contrib.staticfiles', | |
123 | # Uncomment the next line to enable the admin: |
|
125 | # Uncomment the next line to enable the admin: | |
124 | # 'django.contrib.admin', |
|
126 | # 'django.contrib.admin', | |
125 | # Uncomment the next line to enable admin documentation: |
|
127 | # Uncomment the next line to enable admin documentation: | |
126 | # 'django.contrib.admindocs', |
|
128 | # 'django.contrib.admindocs', | |
127 | 'components.antenna', |
|
129 | 'abscontrol', | |
128 | 'components.pattern_antenna', |
|
|||
129 | 'components.profile_antenna', |
|
|||
130 | ) |
|
130 | ) | |
131 |
|
131 | |||
132 | # A sample logging configuration. The only tangible logging |
|
132 | # A sample logging configuration. The only tangible logging | |
133 | # performed by this configuration is to send an email to |
|
133 | # performed by this configuration is to send an email to | |
134 | # the site admins on every HTTP 500 error when DEBUG=False. |
|
134 | # the site admins on every HTTP 500 error when DEBUG=False. | |
135 | # See http://docs.djangoproject.com/en/dev/topics/logging for |
|
135 | # See http://docs.djangoproject.com/en/dev/topics/logging for | |
136 | # more details on how to customize your logging configuration. |
|
136 | # more details on how to customize your logging configuration. | |
137 | LOGGING = { |
|
137 | LOGGING = { | |
138 | 'version': 1, |
|
138 | 'version': 1, | |
139 | 'disable_existing_loggers': False, |
|
139 | 'disable_existing_loggers': False, | |
140 | 'filters': { |
|
140 | 'filters': { | |
141 | 'require_debug_false': { |
|
141 | 'require_debug_false': { | |
142 | '()': 'django.utils.log.RequireDebugFalse' |
|
142 | '()': 'django.utils.log.RequireDebugFalse' | |
143 | } |
|
143 | } | |
144 | }, |
|
144 | }, | |
145 | 'handlers': { |
|
145 | 'handlers': { | |
146 | 'mail_admins': { |
|
146 | 'mail_admins': { | |
147 | 'level': 'ERROR', |
|
147 | 'level': 'ERROR', | |
148 | 'filters': ['require_debug_false'], |
|
148 | 'filters': ['require_debug_false'], | |
149 | 'class': 'django.utils.log.AdminEmailHandler' |
|
149 | 'class': 'django.utils.log.AdminEmailHandler' | |
150 | } |
|
150 | } | |
151 | }, |
|
151 | }, | |
152 | 'loggers': { |
|
152 | 'loggers': { | |
153 | 'django.request': { |
|
153 | 'django.request': { | |
154 | 'handlers': ['mail_admins'], |
|
154 | 'handlers': ['mail_admins'], | |
155 | 'level': 'ERROR', |
|
155 | 'level': 'ERROR', | |
156 | 'propagate': True, |
|
156 | 'propagate': True, | |
157 | }, |
|
157 | }, | |
158 | } |
|
158 | } | |
159 | } |
|
159 | } |
@@ -1,3 +1,113 | |||||
1 | from django.db import models |
|
1 | from django.db import models | |
|
2 | from django.utils import timezone | |||
2 |
|
3 | |||
3 | # Create your models here. |
|
4 | class profileAntenna(models.Model): | |
|
5 | ||||
|
6 | name = models.CharField(max_length=250) | |||
|
7 | date_create = models.DateTimeField() | |||
|
8 | date_modified = models.DateTimeField(null=True) | |||
|
9 | hits = models.PositiveIntegerField() | |||
|
10 | state = models.PositiveSmallIntegerField() | |||
|
11 | ||||
|
12 | class Meta: | |||
|
13 | db_table = "abs_profile_antenna" | |||
|
14 | verbose_name = "Profile of Configuration" | |||
|
15 | verbose_name_plural = "Profiles of Configuration" | |||
|
16 | ||||
|
17 | def save(self): | |||
|
18 | if self.pk is None: | |||
|
19 | self.date_create = timezone.now() | |||
|
20 | self.hits = 0 | |||
|
21 | self.state = 1 | |||
|
22 | else: | |||
|
23 | self.date_modified = timezone.now() | |||
|
24 | super(profileAntenna, self).save() | |||
|
25 | ||||
|
26 | def __unicode__(self): | |||
|
27 | return u'%s' % self.value | |||
|
28 | ||||
|
29 | class patternAntenna(models.Model): | |||
|
30 | ||||
|
31 | profile = models.ForeignKey(profileAntenna) | |||
|
32 | date_create = models.DateTimeField() | |||
|
33 | date_modified = models.DateTimeField(null=True) | |||
|
34 | hits = models.PositiveIntegerField() | |||
|
35 | state = models.PositiveSmallIntegerField() | |||
|
36 | ||||
|
37 | class Meta: | |||
|
38 | db_table = "abs_pattern_antenna" | |||
|
39 | verbose_name = "Pattern of Antenna" | |||
|
40 | verbose_name_plural = "List of Patterns of Antenna" | |||
|
41 | ||||
|
42 | def save(self): | |||
|
43 | if self.pk is None: | |||
|
44 | self.date_create = timezone.now() | |||
|
45 | self.hits = 0 | |||
|
46 | self.state = 1 | |||
|
47 | else: | |||
|
48 | self.date_modified = timezone.now() | |||
|
49 | super(patternAntenna, self).save() | |||
|
50 | ||||
|
51 | ''' | |||
|
52 | def __unicode__(self): | |||
|
53 | return u'%s' % self.value | |||
|
54 | ''' | |||
|
55 | ||||
|
56 | class antennaUp(models.Model): | |||
|
57 | ||||
|
58 | pattern = models.ForeignKey(patternAntenna) | |||
|
59 | value = models.CharField(max_length=250) | |||
|
60 | tx = models.CharField(max_length=250) | |||
|
61 | rx = models.CharField(max_length=250) | |||
|
62 | ues = models.CharField(max_length=80) | |||
|
63 | date_create = models.DateTimeField() | |||
|
64 | date_modified = models.DateTimeField(null=True) | |||
|
65 | hits = models.PositiveIntegerField() | |||
|
66 | state = models.PositiveSmallIntegerField() | |||
|
67 | ||||
|
68 | class Meta: | |||
|
69 | db_table = "abs_antenna_up" | |||
|
70 | verbose_name = "Antenna Up" | |||
|
71 | verbose_name_plural = "List of Antenna Up" | |||
|
72 | ||||
|
73 | def save(self): | |||
|
74 | if self.pk is None: | |||
|
75 | self.date_create = timezone.now() | |||
|
76 | self.hits = 0 | |||
|
77 | self.state = 1 | |||
|
78 | else: | |||
|
79 | self.date_modified = timezone.now() | |||
|
80 | super(antennaUp, self).save() | |||
|
81 | ||||
|
82 | def __unicode__(self): | |||
|
83 | return u'%s' % self.value | |||
|
84 | ||||
|
85 | ||||
|
86 | class antennaDown(models.Model): | |||
|
87 | ||||
|
88 | pattern = models.ForeignKey(patternAntenna) | |||
|
89 | value = models.CharField(max_length=250) | |||
|
90 | tx = models.CharField(max_length=250) | |||
|
91 | rx = models.CharField(max_length=250) | |||
|
92 | ues = models.CharField(max_length=80) | |||
|
93 | date_create = models.DateTimeField() | |||
|
94 | date_modified = models.DateTimeField(null=True) | |||
|
95 | hits = models.PositiveIntegerField() | |||
|
96 | state = models.PositiveSmallIntegerField() | |||
|
97 | ||||
|
98 | class Meta: | |||
|
99 | db_table = "abs_antenna_down" | |||
|
100 | verbose_name = "Antenna Down" | |||
|
101 | verbose_name_plural = "List of Antenna Down" | |||
|
102 | ||||
|
103 | def save(self): | |||
|
104 | if self.pk is None: | |||
|
105 | self.date_create = timezone.now() | |||
|
106 | self.hits = 0 | |||
|
107 | self.state = 1 | |||
|
108 | else: | |||
|
109 | self.date_modified = timezone.now() | |||
|
110 | super(antennaDown, self).save() | |||
|
111 | ||||
|
112 | def __unicode__(self): | |||
|
113 | return u'%s' % self.value |
@@ -1,9 +1,10 | |||||
1 | from django.conf.urls import patterns, url |
|
1 | from django.conf.urls import patterns, url | |
2 |
|
2 | |||
3 | urlpatterns = patterns('abscontrol.views', |
|
3 | urlpatterns = patterns('abscontrol.views', | |
4 | url(r'^$', 'index'), |
|
4 | url(r'^$', 'index'), | |
5 | url(r'^new/$', 'new'), |
|
5 | url(r'^new/$', 'new'), | |
|
6 | url(r'^save/$', 'save'), | |||
6 | url(r'^(?P<profile_id>\d+)/$', 'detail'), |
|
7 | url(r'^(?P<profile_id>\d+)/$', 'detail'), | |
7 | #url(r'^(?P<poll_id>\d+)/results/$', 'results'), |
|
8 | #url(r'^(?P<poll_id>\d+)/results/$', 'results'), | |
8 | #url(r'^(?P<poll_id>\d+)/vote/$', 'vote'), |
|
9 | #url(r'^(?P<poll_id>\d+)/vote/$', 'vote'), | |
9 | ) No newline at end of file |
|
10 | ) |
@@ -1,11 +1,49 | |||||
1 | from django.shortcuts import render_to_response |
|
1 | from django.shortcuts import render_to_response | |
2 | from components.profile_antenna.models import profileAntenna |
|
2 | from django.http import HttpResponseRedirect | |
|
3 | from django.core.urlresolvers import reverse | |||
|
4 | from django.template import RequestContext | |||
|
5 | ||||
|
6 | from abscontrol.models import profileAntenna, patternAntenna, antennaUp, antennaDown | |||
3 |
|
7 | |||
4 | def index(request): |
|
8 | def index(request): | |
5 | #latest_poll_list = profileAntenna.objects.all().order_by('-pub_date')[:5] |
|
9 | #latest_poll_list = profileAntenna.objects.all().order_by('-pub_date')[:5] | |
6 | profile_list = profileAntenna.objects.all() |
|
10 | profile_list = profileAntenna.objects.all() | |
7 | return render_to_response('abscontrol/index.html', {'profile_list': profile_list}) |
|
11 | return render_to_response('abscontrol/index.html', {'profile_list': profile_list}) | |
8 |
|
12 | |||
9 | def new(request): |
|
13 | def new(request): | |
10 | #profile_list = profileAntenna.objects.all() |
|
14 | #profile_list = profileAntenna.objects.all() | |
11 | return render_to_response('abscontrol/new.html', {}) |
|
15 | return render_to_response('abscontrol/new.html', {}) | |
|
16 | ||||
|
17 | def save(request): | |||
|
18 | try: | |||
|
19 | txtProfile = request.POST["txtProfile"] | |||
|
20 | ||||
|
21 | txtAntennaUp = request.POST["txtAntennaUp"] | |||
|
22 | txtTxUp = request.POST["txtTxUp"] | |||
|
23 | txtRxUp = request.POST["txtRxUp"] | |||
|
24 | txtUesUp = request.POST["txtUesUp"] | |||
|
25 | ||||
|
26 | txtAntennaDown = request.POST["txtAntennaDown"] | |||
|
27 | txtTxDown = request.POST["txtTxDown"] | |||
|
28 | txtRxDown = request.POST["txtRxDown"] | |||
|
29 | txtUesDown = request.POST["txtUesDown"] | |||
|
30 | ||||
|
31 | objProfile = profileAntenna(name=txtProfile) | |||
|
32 | objProfile.save() | |||
|
33 | ||||
|
34 | profile = profileAntenna.objects.get(pk=objProfile.id) | |||
|
35 | print profile.id | |||
|
36 | newpattern = profile.pattern_set.create() | |||
|
37 | ''' | |||
|
38 | pattern = patternAntenna.objects.get(pk=newpattern.id) | |||
|
39 | pattern.antennaUp_set.create(value=txtAntennaUp, tx=txtTxUp, rx=txtRxUp, ues=txtUesUp) | |||
|
40 | pattern.antennaDown_set.create(value=txtAntennaDown, tx=txtTxDown, rx=txtRxDown, ues=txtUesDown) | |||
|
41 | ''' | |||
|
42 | return HttpResponseRedirect(reverse('abscontrol.views.index')) | |||
|
43 | ||||
|
44 | except: | |||
|
45 | # Redisplay the form | |||
|
46 | return render_to_response('abscontrol/new.html', { | |||
|
47 | 'error_message': "You didn't select a choice.", | |||
|
48 | }, context_instance=RequestContext(request)) | |||
|
49 |
@@ -1,6 +1,35 | |||||
1 | body { |
|
1 | body {font-size: 11px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif} | |
2 | font-size: 11px; |
|
|||
3 | } |
|
|||
4 | article, aside, figure, footer, header, hgroup, nav, section { display:block; } |
|
2 | article, aside, figure, footer, header, hgroup, nav, section { display:block; } | |
5 | header{border: 1px solid #f00; font-size: 1.2em} |
|
3 | header {border: 1px solid #fcc; font-size: 2em; height: 50px; text-align: center; line-height: 50px} | |
6 | #schema{margin: 0 auto; width: 980px; border: 1px solid #f00;} |
|
4 | #schema {margin: 0 auto; width: 980px; border: 1px solid #f00; padding: 10px 10px 10px 10px} | |
|
5 | #content {border: 1px solid #1cc; margin-top: 5px; margin-bottom: 5px} | |||
|
6 | #content #leftcolumn {float: left;border: 1px solid #c55; width: 150px; font-family: Monaco;} | |||
|
7 | #content #maincolumn {float: left; border: 1px solid #000; width: 800px; padding-left: 20px;} | |||
|
8 | footer {border: 1px solid #200; font-size: 0.9em; height: 30px; text-align: center; line-height: 20px} | |||
|
9 | ||||
|
10 | .cleardivs {clear: both; border: 1px solid #400; height: 0px} | |||
|
11 | ||||
|
12 | ||||
|
13 | /****************************************************************************************/ | |||
|
14 | /****** MENU DE NAVEGACION DE PERFILES **********************************/ | |||
|
15 | /****************************************************************************************/ | |||
|
16 | #content #infoProfiles {border: 1px solid #d00; width: 140px; margin: 0px; padding-top: 2px; padding-bottom: 2px} | |||
|
17 | .lblInfo {padding-left: 12px; line-height: 20px;} | |||
|
18 | #content nav {border: 1px solid #c55; width: 140px; margin: 0px; font-family: Monaco; font-size: 1.2em;} | |||
|
19 | #content nav ul{list-style: none; list-style-type: none; margin: 15px 15px 15px 15px; padding-left: 20px; border: 0px solid #eee} | |||
|
20 | #content nav ul li{line-height: 20px} | |||
|
21 | ||||
|
22 | /****************************************************************************************/ | |||
|
23 | /******** FORMULARIO DE PERFILES *************************************/ | |||
|
24 | /****************************************************************************************/ | |||
|
25 | #divProfile {border: 0px solid #dff; margin: 10px 0px; padding: 10px 10px; width: 500px} | |||
|
26 | .flsAntenna {margin: 10px 0px; width: 750px; padding: 10px 10px} | |||
|
27 | #divPattern textarea,input[type=text],label {font-family: Monaco; font-size: inherit;} | |||
|
28 | #divPattern input[type=text] {width: 200px} | |||
|
29 | #divPattern textarea {resize: none; overflow: hidden} | |||
|
30 | .divAntenna {float: left; margin: 10px; height: 150px} | |||
|
31 | .divAntenna label {display: block} | |||
|
32 | .divTx {display: block; float: left; margin: 10px; height: 150px} | |||
|
33 | .divTx label {display: block} | |||
|
34 | .divUes {display: block; margin: 10px} | |||
|
35 | .txtAntenna {max-width: 200px; max-height: 120px} |
@@ -1,37 +1,44 | |||||
1 | {% extends "base.html" %} |
|
1 | {% extends "base.html" %} | |
2 |
|
2 | |||
3 | {% block title %}ABS CONTROL:::::{% endblock %} |
|
3 | {% block title %}ABS CONTROL:::::{% endblock %} | |
4 |
|
4 | |||
5 | {% block content %} |
|
5 | {% block content %} | |
|
6 | <div id="content"> | |||
|
7 | {% block leftcolumn %} | |||
6 | <div id="leftcolumn"> |
|
8 | <div id="leftcolumn"> | |
7 | <div> |
|
9 | <div id="lsProfiles"> | |
8 |
|
|
10 | <div id="infoProfiles"> | |
9 | <ul> |
|
11 | <label for="lblProfile" class="lblInfo">Profiles:</label><br /> | |
10 | <li><a href="#">Choose ...</</a></li> |
|
12 | {% if profile_list %} | |
11 | {% for entry in profile_list %} |
|
13 | <select name="lsProfiles"> | |
12 | <li><a href="/view/{{ entry.id }}">{{ entry.name }}</a></li> |
|
14 | <option>Choose ...</option> | |
13 | {% endfor %} |
|
15 | {% for entry in profile_list %} | |
14 | </ul> |
|
16 | <option value="{{ entry.id }}">{{ entry.name }}</option> | |
15 |
|
|
17 | {% endfor %} | |
16 | <p>No profiles are available.</p> |
|
18 | </select> | |
17 |
|
|
19 | {% else %} | |
|
20 | <label for="lblMessage" class="lblInfo">No profiles.</label> | |||
|
21 | {% endif %} | |||
|
22 | </div> | |||
18 | </div> |
|
23 | </div> | |
19 | {% block mnu_profile %} |
|
24 | {% block mnu_profile %} | |
20 | <nav> |
|
25 | <nav> | |
21 | <ul> |
|
26 | <ul> | |
22 | <li><a href="new">New</a></li> |
|
27 | <li><a href="/abscontrol/new">New</a></li> | |
23 | <li><a href="#">Save</a></li> |
|
|||
24 | <li><a href="#">Save as</a></li> |
|
28 | <li><a href="#">Save as</a></li> | |
25 | <li><a href="#">Import</a></li> |
|
29 | <li><a href="#">Import</a></li> | |
26 | <li><a href="#">Export</a></li> |
|
30 | <li><a href="#">Export</a></li> | |
27 | <li><a href="#">Apply</a></li> |
|
31 | <li><a href="#">Apply</a></li> | |
28 | </ul> |
|
32 | </ul> | |
29 | </nav> |
|
33 | </nav> | |
30 | {% endblock %} |
|
34 | {% endblock %} | |
31 | </div> |
|
35 | </div> | |
|
36 | {% endblock %} | |||
32 | {% block maincolumn %} |
|
37 | {% block maincolumn %} | |
33 | <div id="maincolumn"> |
|
38 | <div id="maincolumn"> | |
34 |
|
39 | |||
35 | </div> |
|
40 | </div> | |
36 | {% endblock %} |
|
41 | {% endblock %} | |
|
42 | <div class="cleardivs"></div> | |||
|
43 | </div> | |||
37 | {% endblock %} No newline at end of file |
|
44 | {% endblock %} |
@@ -1,13 +1,60 | |||||
1 | {% extends "abscontrol/index.html" %} |
|
1 | {% extends "abscontrol/index.html" %} | |
2 | {% block title %}ABS CONTROL:::::NEW PROFILE{% endblock %} |
|
2 | {% block title %}ABS CONTROL:::::NEW PROFILE{% endblock %} | |
3 |
|
3 | |||
4 | {% block maincolumn%} |
|
4 | {% block maincolumn%} | |
5 | <div id="maincolumn"> |
|
5 | <div id="maincolumn"> | |
6 | <form action="/save/" method="post"> |
|
6 | <form action="/abscontrol/save/" method="post"> | |
7 | {% csrf_token %} |
|
7 | <div id="divProfile"> | |
8 |
<label for="lblName">Profile:</label> |
|
8 | <label for="lblName">Profile:</label> | |
9 |
<input type="text" name=" |
|
9 | <input type="text" name="txtProfile" id="" value="" /> | |
10 | <input type="submit" value="Save" /> |
|
10 | <input type="submit" value="Save" /> | |
|
11 | </div> | |||
|
12 | <div id="divPattern"> | |||
|
13 | <div id="antennaUp"> | |||
|
14 | <fieldset class="flsAntenna"> | |||
|
15 | <legend>UP</legend> | |||
|
16 | <div class="divAntenna"> | |||
|
17 | <label for="lblAntenna">Antenna</label> | |||
|
18 | <textarea name="txtAntennaUp" class="txtAntenna" cols="38" rows="8"></textarea> | |||
|
19 | </div> | |||
|
20 | <div class="divTx"> | |||
|
21 | <label for="lblTx">Tx</label> | |||
|
22 | <textarea name="txtTxUp" class="txtTR" cols="20" rows="8"></textarea> | |||
|
23 | </div> | |||
|
24 | <div class="divTx"> | |||
|
25 | <label for="lblRx">Rx</label> | |||
|
26 | <textarea name="txtRxUp" class="txtTR" cols="20" rows="8"></textarea> | |||
|
27 | </div> | |||
|
28 | <div class="cleardivs"></div> | |||
|
29 | <div class="divUes"> | |||
|
30 | <label for="lblUes">Ues:</label> | |||
|
31 | <input type="text" name="txtUesUp" value="" /> | |||
|
32 | </div> | |||
|
33 | </fieldset> | |||
|
34 | </div> | |||
|
35 | <div id="antennaDown"> | |||
|
36 | <fieldset class="flsAntenna"> | |||
|
37 | <legend>DOWN</legend> | |||
|
38 | <div class="divAntenna"> | |||
|
39 | <label for="lblAntenna">Antenna</label> | |||
|
40 | <textarea name="txtAntennaDown" class="txtAntenna" cols="38" rows="8"></textarea> | |||
|
41 | </div> | |||
|
42 | <div class="divTx"> | |||
|
43 | <label for="lblTx">Tx</label> | |||
|
44 | <textarea name="txtTxDown" class="txtTR" cols="20" rows="8"></textarea> | |||
|
45 | </div> | |||
|
46 | <div class="divTx"> | |||
|
47 | <label for="lblRx">Rx</label> | |||
|
48 | <textarea name="txtRxDown" class="txtTR" cols="20" rows="8"></textarea> | |||
|
49 | </div> | |||
|
50 | <div class="cleardivs"></div> | |||
|
51 | <div class="divUes"> | |||
|
52 | <label for="lblUes">Ues:</label> | |||
|
53 | <input type="text" name="txtUesDown" value="" /> | |||
|
54 | </div> | |||
|
55 | </fieldset> | |||
|
56 | </div> | |||
|
57 | </div> | |||
11 | </form> |
|
58 | </form> | |
12 | </div> |
|
59 | </div> | |
13 | {% endblock %} |
|
60 | {% endblock %} |
@@ -1,55 +1,50 | |||||
|
1 | {% load static %} | |||
1 | <!DOCTYPE html> |
|
2 | <!DOCTYPE html> | |
2 | <html lang="en"> |
|
3 | <html lang="en"> | |
3 | <head> |
|
4 | <head> | |
4 | <meta charset="utf-8" /> |
|
5 | <meta charset="utf-8" /> | |
5 | {% comment %} |
|
6 | {% comment %} | |
6 | <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame |
|
7 | <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame | |
7 | Remove this if you use the .htaccess --> |
|
8 | Remove this if you use the .htaccess --> | |
8 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> |
|
9 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |
9 | {% endcomment %} |
|
10 | {% endcomment %} | |
10 |
<link rel="stylesheet" href="{ |
|
11 | <link rel="stylesheet" href="{% static 'static/css/style.css' %}" type="text/css" /> | |
11 | <title>{% block title %}JRO WEB APPS::::{% endblock %}</title> |
|
12 | <title>{% block title %}JRO WEB APPS::::{% endblock %}</title> | |
12 | <meta name="description" content="JRO WEB APPLICATIONS" /> |
|
13 | <meta name="description" content="JRO WEB APPLICATIONS" /> | |
13 | <meta name="author" content="Jose Antonio Sal y Rosas Celi" /> |
|
14 | <meta name="author" content="Jose Antonio Sal y Rosas Celi" /> | |
14 |
|
15 | |||
15 | {# <meta name="viewport" content="width=device-width; initial-scale=1.0" /> #} |
|
16 | {# <meta name="viewport" content="width=device-width; initial-scale=1.0" /> #} | |
16 | {% comment %} |
|
17 | {% comment %} | |
17 | <!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references --> |
|
18 | <!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references --> | |
18 | <link rel="shortcut icon" href="/favicon.ico" /> |
|
19 | <link rel="shortcut icon" href="/favicon.ico" /> | |
19 | <link rel="apple-touch-icon" href="/apple-touch-icon.png" /> |
|
20 | <link rel="apple-touch-icon" href="/apple-touch-icon.png" /> | |
20 | {% endcomment %} |
|
21 | {% endcomment %} | |
21 | </head> |
|
22 | </head> | |
22 | <body> |
|
23 | <body> | |
23 | <div id="schema"> |
|
24 | <div id="schema"> | |
24 | <header> |
|
25 | <header> | |
25 | {% block header %} |
|
26 | {% block header %} | |
26 | <nav> |
|
27 | <nav> | |
27 | <a href="/abscontrol">ABS</a> | |
|
28 | <a href="/abscontrol">ABS</a> | | |
28 | <a href="#">CR</a> | |
|
29 | <a href="#">CR</a> | | |
29 | <a href="#">DDS</a> | |
|
30 | <a href="#">DDS</a> | | |
30 | <a href="#">JARS</a> |
|
31 | <a href="#">JARS</a> | |
31 | </nav> |
|
32 | </nav> | |
32 | {% endblock %} |
|
33 | {% endblock %} | |
33 | </header> |
|
34 | </header> | |
|
35 | {% block content %} | |||
34 | <div id="content"> |
|
36 | <div id="content"> | |
35 | {% block content %} |
|
37 | <nav> | |
36 | <nav> |
|
38 | <p><a href="/">Home</a></p> | |
37 | <p> |
|
39 | <p><a href="/contact">Contact</a></p> | |
38 |
|
|
40 | </nav> | |
39 |
|
|
41 | </div> | |
40 | <p> |
|
|||
41 | <a href="/contact">Contact</a> |
|
|||
42 | </p> |
|
|||
43 | </nav> |
|
|||
44 | {% endblock %} |
|
42 | {% endblock %} | |
45 | </div> |
|
|||
46 | <footer> |
|
43 | <footer> | |
47 | {% block footer %} |
|
44 | {% block footer %} | |
48 | <p> |
|
45 | <p>© Copyright by Jicamarca Radio Observatory</p> | |
49 | © Copyright by Jicamarca Radio Observatory |
|
|||
50 | </p> |
|
|||
51 | {% endblock %} |
|
46 | {% endblock %} | |
52 | </footer> |
|
47 | </footer> | |
53 | </div> |
|
48 | </div> | |
54 | </body> |
|
49 | </body> | |
55 | </html> |
|
50 | </html> |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now