Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return 204 when responding head request #132

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
22b6e8f
update XsamsRadTranBroadening function to work with starkb
nicolasmoreau Jun 21, 2017
ad46adb
remove count function from dictionnary to move it in model
nicolasmoreau Jun 21, 2017
6e0ffb3
Merge branch 'master' of https://github.com/VAMDC/NodeSoftware
nicolasmoreau Jan 22, 2018
7d4e82b
Add a makeEscapedOptionalTag, identical to makeOptionalTag but escapi…
nicolasmoreau Jan 22, 2018
556540e
remove encode functions from stark-b models thanks to makeEscapedOpti…
nicolasmoreau Jan 22, 2018
aed8dd3
update SpeciesDB code with new version by Misha Doronin and Nicolas M…
nicolasmoreau Feb 19, 2018
d99acf1
add functions to escape content of some fields in models
nicolasmoreau Feb 19, 2018
34ee57a
add missing files
nicolasmoreau Feb 19, 2018
85ca93b
escape journal name in starkb
nicolasmoreau Feb 20, 2018
36404af
remove makeEscapedOptionalTag from generators.py, rely on node to do …
nicolasmoreau Feb 20, 2018
0217950
add a "update_status" column in the species database.
nicolasmoreau Feb 22, 2018
1d5fcd4
remove print
nicolasmoreau Feb 22, 2018
48a0638
update node only if update_status == 1
nicolasmoreau Mar 14, 2018
9fdd399
make short_title field content longer
nicolasmoreau Mar 14, 2018
acb13f0
Merge branch 'master' of https://github.com/VAMDC/NodeSoftware
nicolasmoreau Jul 11, 2018
18f674c
Do not create response content when a HEAD request is received
nicolasmoreau Jul 11, 2018
b5b573b
improve response to head request.
nicolasmoreau Jul 13, 2018
5f8edb7
Remove modifications made in the generator for starkb
nicolasmoreau Jul 16, 2018
f533067
comment unused function
nicolasmoreau Jul 16, 2018
6b883d1
use python3 compatible syntax
nicolasmoreau Feb 21, 2019
3c874ea
rewrites urls.py with django 1.10 compatibility
nicolasmoreau Mar 26, 2019
042f093
correction of an indentation error
nicolasmoreau Mar 26, 2019
995f8de
urls in django1.10 format
nicolasmoreau Mar 27, 2019
ece81c1
modification in the iteration on the content of self.parsedSQL.column…
nicolasmoreau Mar 27, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove count function from dictionnary to move it in model
  • Loading branch information
nicolasmoreau committed Jun 21, 2017
commit ad46adb4c7eaa6fb69ab2f17103d4b6745ae415e
5 changes: 2 additions & 3 deletions nodes/tipbase/node/dictionaries.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
RETURNABLES = {\
'NodeID':'Tipbase',

'AtomStateID':'AtomState.id',

'AtomSymbol':'Atom.atomicion.isotope.chemicalelement.elementsymbol',
Expand Down Expand Up @@ -35,11 +34,11 @@
'CollisionTabulatedDataRef' : 'TabData.Sources',
'CollisionTabulatedDataXDataList' : 'TabData.xdata',
'CollisionTabulatedDataXUnits' : 'TabData.xdataunit.value',
'CollisionTabulatedDataXDataListN' : 'len(TabData.xdata.split(" "))',
'CollisionTabulatedDataXDataListN' : 'TabData.get_xdata_length()',
'CollisionTabulatedDataXParameter' : 'undef',
'CollisionTabulatedDataYDataList' : 'TabData.ydata',
'CollisionTabulatedDataYUnits' : 'TabData.ydataunit.value',
'CollisionTabulatedDataYDataListN' : 'len(TabData.ydata.split(" "))',
'CollisionTabulatedDataYDataListN' : 'TabData.get_ydata_length()',
'CollisionTabulatedDataYParameter' : 'undef',

'CollisionDataSetDescription' : 'DataSet.dataDescription',
Expand Down
7 changes: 7 additions & 0 deletions nodes/tipbase/node/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,13 @@ class Tabulateddata(models.Model):
ydata = models.TextField(null=True)
xdataunit = models.ForeignKey(Unit, db_column='xdataunitid', related_name='+', null=True)
ydataunit = models.ForeignKey(Unit, db_column='ydataunitid', related_name='+', null=True)

def get_xdata_length(self):
return len(self.xdata.split(" "))

def get_ydata_length(self):
return len(self.ydata.split(" "))

class Meta:
db_table = u't_tabulateddata'

Expand Down