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