##// END OF EJS Templates
adding django-json-field to requirement.txt...
Cristiam Castillo -
r5:c8ed4c7085e7
parent child
Show More
@@ -1,23 +1,21
1 1 from django.db import models
2 2
3 3 from json_field import JSONField
4 4 from django.core.validators import MinValueValidator, MaxValueValidator
5 5
6 6
7 7 from apps.main.models import Device, Experiment
8 8
9 9 # Create your models here.
10 10 class CGSConfiguration(models.Model):
11 11
12 12 device = models.ForeignKey(Device)
13 13 exp = models.ForeignKey(Experiment, default = None)
14 freq0 = models.FloatField(verbose_name='Frequency 0',validators=[MinValueValidator(62.5e6), MaxValueValidator(450e6)])
15 freq1 = models.FloatField(verbose_name='Frequency 1',validators=[MinValueValidator(62.5e6), MaxValueValidator(450e6)])
14 freq0 = models.FloatField(verbose_name='Frequency 0',validators=[MinValueValidator(62.5e6), MaxValueValidator(450e6)])
15 freq1 = models.FloatField(verbose_name='Frequency 1',validators=[MinValueValidator(62.5e6), MaxValueValidator(450e6)])
16 16 freq2 = models.FloatField(verbose_name='Frequency 2',validators=[MinValueValidator(62.5e6), MaxValueValidator(450e6)])
17 freq3 = models.PositiveIntegerField(verbose_name='Frequency 3',validators=[MinValueValidator(62.5e6), MaxValueValidator(450e6)])
17 freq3 = models.PositiveIntegerField(verbose_name='Frequency 3',validators=[MinValueValidator(62.5e6), MaxValueValidator(450e6)])
18 18 freqs = JSONField(default={"frequencies":[{"f0":freq0,"f1":freq1,"f2":freq2,"f3":freq3}]}, blank=True)
19 19 #clk_in = models.PositiveIntegerField(default=10e6)
20 20 #mult = models.PositiveIntegerField(default=40)
21 21 #div = models.PositiveIntegerField(default=1)
22
23
@@ -1,121 +1,122
1 1 """
2 2 Django settings for radarsys project.
3 3
4 4 Generated by 'django-admin startproject' using Django 1.8.6.
5 5
6 6 For more information on this file, see
7 7 https://docs.djangoproject.com/en/1.8/topics/settings/
8 8
9 9 For the full list of settings and their values, see
10 10 https://docs.djangoproject.com/en/1.8/ref/settings/
11 11 """
12 12
13 13 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
14 14 import os
15 15
16 16 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
17 17
18 18 # Quick-start development settings - unsuitable for production
19 19 # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
20 20
21 21 # SECURITY WARNING: keep the secret key used in production secret!
22 22 SECRET_KEY = 'xshb$k5fc-+j16)cvyffj&9u__0q3$l!hieh#+tbzqg)*f^km0'
23 23
24 24 # SECURITY WARNING: don't run with debug turned on in production!
25 25 DEBUG = True
26 26
27 27 ALLOWED_HOSTS = []
28 28
29 29 # Application definition
30 30
31 31 INSTALLED_APPS = (
32 32 'django.contrib.admin',
33 33 'django.contrib.auth',
34 34 'django.contrib.contenttypes',
35 35 'django.contrib.sessions',
36 36 'django.contrib.messages',
37 37 'django.contrib.staticfiles',
38 38 'bootstrap3',
39 39 'apps.accounts',
40 40 'apps.main',
41 41 'apps.misc',
42 42 'apps.rc',
43 43 'apps.dds',
44 44 'apps.cgs',
45 45 'apps.acq',
46 46 'apps.abs',
47 'json_field'
47 48 )
48 49
49 50 MIDDLEWARE_CLASSES = (
50 51 'django.contrib.sessions.middleware.SessionMiddleware',
51 52 'django.middleware.common.CommonMiddleware',
52 53 'django.middleware.csrf.CsrfViewMiddleware',
53 54 'django.contrib.auth.middleware.AuthenticationMiddleware',
54 55 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
55 56 'django.contrib.messages.middleware.MessageMiddleware',
56 57 'django.middleware.clickjacking.XFrameOptionsMiddleware',
57 58 'django.middleware.security.SecurityMiddleware',
58 59 )
59 60
60 61 ROOT_URLCONF = 'radarsys.urls'
61 62
62 63 TEMPLATES = [
63 64 {
64 65 'BACKEND': 'django.template.backends.django.DjangoTemplates',
65 66 'DIRS': [os.path.join(BASE_DIR, "templates").replace('\\', '/'),],
66 67 'APP_DIRS': True,
67 68 'OPTIONS': {
68 69 'context_processors': [
69 70 'django.template.context_processors.debug',
70 71 'django.template.context_processors.request',
71 72 'django.contrib.auth.context_processors.auth',
72 73 'django.contrib.messages.context_processors.messages',
73 74 ],
74 75 },
75 76 },
76 77 ]
77 78
78 79 WSGI_APPLICATION = 'radarsys.wsgi.application'
79 80
80 81
81 82 # Database
82 83 # https://docs.djangoproject.com/en/1.8/ref/settings/#databases
83 84
84 85 DATABASES = {
85 86 'default': {
86 87 'ENGINE': 'django.db.backends.mysql',
87 88 'NAME': 'radarsys',
88 89 'USER': 'developer',
89 90 'PASSWORD': 'idi2015',
90 91 }
91 92 }
92 93
93 94
94 95 # Internationalization
95 96 # https://docs.djangoproject.com/en/1.8/topics/i18n/
96 97
97 98 LANGUAGE_CODE = 'en-us'
98 99
99 100 TIME_ZONE = 'UTC'
100 101
101 102 USE_I18N = True
102 103
103 104 USE_L10N = True
104 105
105 106 USE_TZ = True
106 107
107 108 # Static files (CSS, JavaScript, Images)
108 109 # https://docs.djangoproject.com/en/1.8/howto/static-files/
109 110
110 111 STATIC_URL = '/static/'
111 112 STATIC_ROOT = '/var/www/html/static/'
112 113
113 114 STATICFILES_DIRS = (
114 115 os.path.join(BASE_DIR, 'apps', 'main', 'static'),
115
116
116 117 )
117 118
118 STATICFILES_FINDERS = (
119 STATICFILES_FINDERS = (
119 120 'django.contrib.staticfiles.finders.FileSystemFinder',
120 121 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
121 122 )
@@ -1,3 +1,4
1 1 Django==1.8.6
2 2 django-bootstrap3==6.2.2
3 3 MySQL-python==1.2.5
4 django-json-field==0.5.7
General Comments 0
You need to be logged in to leave comments. Login now