Skip to content
Browse files

fixes #34

  • Loading branch information...
1 parent b1a29d6 commit 894ddebe8b16f1d5621f472ccfcb63ef19d0611b @pierrejdlf pierrejdlf committed Mar 9, 2012
Showing with 15 additions and 12 deletions.
  1. +1 −1 apache/reanalyse_dev.conf
  2. +3 −4 reanalyseapp/imexport.py
  3. +9 −5 reanalyseapp/views.py
  4. +2 −2 templates/bq_e_selectviz.html
View
2 apache/reanalyse_dev.conf
@@ -14,7 +14,7 @@ Allow from all
XSendFile on
XSendFilePath /home/pj/djangos/reanalyse/download/
XSendFilePath /home/pj/djangos/reanalyse/upload/
-XSendFilePath /media/braque/pj/reanalyse/files/
+XSendFilePath /media/braque/pj/reanalyse_ese_files/
MaxRequestsPerChild 1
WSGIScriptAlias /reanalyse /home/pj/djangos/reanalyse/apache/django.wsgi
View
7 reanalyseapp/imexport.py
@@ -83,9 +83,7 @@ def doFiestaToEnquete(e):
####### UPDATE ALL TFIDF
# ie fetch ngrams from solr and store them in django model (easier then to make viz using thoses objects rather than fetching ngrams everytime)
- logger.info("["+str(e.id)+"] now updating tfidf ...")
makeAllTfidf(e)
- logger.info("["+str(e.id)+"] tfidf sucessfully updated")
if e.speaker_set.count()>0:
makeViz(e,'Cloud_SolrSpeakerTagCloud')
@@ -172,7 +170,7 @@ def importEnqueteUsingMeta(folderPath):
#mandatoryFields = ['*id','*name','*category','*description','*location','*date']
logger.info(eidstr+"=========== PARSING META_DOCUMENTS.CSV")
###### Parsing Documents
- doc = csv.DictReader(open(docPath),delimiter='\t',quotechar='"')
+ doc = csv.DictReader(open(docPath),delimiter='\t')
for row in doc:
#try:
if row['*id']!='*descr':
@@ -190,8 +188,9 @@ def importEnqueteUsingMeta(folderPath):
#except:
# logger.info(eidstr+"EXCEPT need *file *mimetype *name *category *location *description in meta_documents.csv")
try:
- doc_date = datetime.strptime(row['*date'], "%d/%m/%y") #"31-12-12"
+ doc_date = datetime.datetime.strptime(row['*date'], "%d/%m/%y") #"31-12-12"
except:
+ logger.info(eidstr+"EXCEPT on date : "+row['*id']+" | "+row['*file'])
doc_date = datetime.datetime.today()
### special for ese, don't create any texte() model, just parse ese.xml
View
14 reanalyseapp/views.py
@@ -728,9 +728,9 @@ def edBrowse(request,eid):
######################################### COLUMNS
if request.user.has_perm('reanalyseapp.can_make'):
- colArr=['Research Phase','Doc Type','Name','Size','Status','Viz','Investigator','Speakers'] #+ ['Length']
+ colArr=['Research Phase','Doc Type','Name','Date','Location','Size','Status','Viz','Investigator','Speakers'] #+ ['Length']
else:
- colArr=['Research Phase','Doc Type','Name','Size','Viz','Investigator','Speakers']
+ colArr=['Research Phase','Doc Type','Name','Date','Location','Size','Viz','Investigator','Speakers']
######################################### VALUES
@@ -760,7 +760,11 @@ def edBrowse(request,eid):
# display link using edShow
linkDoc = reverse(edShow,args=eiddid)
nameStr = '<a href="'+linkDoc+'" onclick="event.stopPropagation();">'+t.name+'</a>'+' ('+t.get_doctype_display().lower()+')'
-
+
+ # DOC DATE & LOCATION, sortable
+ dateStr = t.date.isoformat() # '<span style="display:none;">'+t.date.isoformat()+'</span>'+
+ locStr = t.location
+
# FILESIZE
if t.filesize==0:
sizeStr = '-'
@@ -819,9 +823,9 @@ def edBrowse(request,eid):
################# VALUES
if request.user.has_perm('reanalyseapp.can_make'):
- tArr=[t.doccat1,t.doccat2,nameStr,sizeStr,statusStr,vizStr,investStr,speakersStr] #+ [contentStr]
+ tArr=[t.doccat1,t.doccat2,nameStr,dateStr,locStr,sizeStr,statusStr,vizStr,investStr,speakersStr] #+ [contentStr]
else:
- tArr=[t.doccat1,t.doccat2,nameStr,sizeStr,vizStr,investStr,speakersStr]
+ tArr=[t.doccat1,t.doccat2,nameStr,dateStr,locStr,sizeStr,vizStr,investStr,speakersStr]
docDict['texte']=t
docDict['vals']=tArr
View
4 templates/bq_e_selectviz.html
@@ -10,7 +10,7 @@
{% if source = 'Documents' %}
<span id="documentsSelectedCountDiv">0</span> selected docs
- (select <a href="" onclick='selectAllDocs();return false;'>all</a> |
+ (select directly on table | <a href="" onclick='selectAllDocs();return false;'>all</a> |
<a href="" onclick='deselectAllDocs();return false;'>none</a>)
<ul class="selectedList" id="documentsSelectedList"></ul>
@@ -22,7 +22,7 @@
<!-- if you want to be able to create/load speaker sets, you can use the commented code at the end of this file -->
<span id="speakersSelectedCountDiv">0</span> selected speakers
- (select <a href="" onclick='selectAllSpeakers();return false;'>all</a> |
+ (select directly on table | <a href="" onclick='selectAllSpeakers();return false;'>all</a> |
<a href="" onclick='deselectAllSpeakers();return false;'>none</a> |
<!-- dropdown list to select by attribute -->
<select id="spkSelectDropDownList" multiple="multiple">

0 comments on commit 894ddeb

Please sign in to comment.
Something went wrong with that request. Please try again.