Commit 9ee82664 authored by PkSM3's avatar PkSM3

[BUGFIX] always rename file to upload

parent aa7b57d4
...@@ -120,12 +120,14 @@ class CustomForm(forms.Form): ...@@ -120,12 +120,14 @@ class CustomForm(forms.Form):
""" """
def clean_file(self): def clean_file(self):
file_ = self.cleaned_data.get('file') file_ = self.cleaned_data.get('file')
#Filename length from datetime import datetime
if len(file_.name)>30: file_.name = str(datetime.now().microsecond)
from datetime import datetime # #Filename length
file_.name = str(datetime.now().microsecond) # if len(file_.name)>30:
# raise forms.ValidationError(_('Come on dude, name too long. Now is:'+file_.name)) # from datetime import datetime
#File size # file_.name = str(datetime.now().microsecond)
# # raise forms.ValidationError(_('Come on dude, name too long. Now is:'+file_.name))
# #File size
if len(file_)>104857600: if len(file_)>104857600:
raise forms.ValidationError(_('File to heavy! (<100MB).')) raise forms.ValidationError(_('File to heavy! (<100MB).'))
## File type: ## File type:
......
...@@ -63,7 +63,7 @@ function deleteDuplicates(url) { ...@@ -63,7 +63,7 @@ function deleteDuplicates(url) {
success: function(data) { success: function(data) {
console.log("in DeleteDuplicates") console.log("in DeleteDuplicates")
console.log(data) console.log(data)
$("#delAll").remove(); location.reload();
}, },
error: function(result) { error: function(result) {
console.log("Data not found"); console.log("Data not found");
......
...@@ -242,12 +242,12 @@ ...@@ -242,12 +242,12 @@
</select> </select>
<span ng-if="filter.entity"> <span ng-if="filter.entity">
<select ng-model="filter.column"> <select ng-model="filter.column">
<option ng-repeat="column in entities[filter.entity] | orderBy:'key'" value="{{column.key}}">{{column.key}}</option> <option ng-repeat="column in entities[filter.entity] | orderBy:'key'" value="{{column.key}}">a{{column.key}}</option>
</select> </select>
<span ng-if="filter.column" ng-repeat="column in entities[filter.entity]"> <span ng-if="filter.column" ng-repeat="column in entities[filter.entity]">
<span ng-if="column.key == filter.column"> <span ng-if="column.key == filter.column">
<select ng-model="filter.operator"> <select ng-model="filter.operator">
<option ng-repeat="operator in operators[column.type]" value="{{operator.key}}">{{operator.label}}</option> <option ng-repeat="operator in operators[column.type]" value="{{operator.key}}">b{{operator.label}}</option>
</select> </select>
<input type="text" ng-model="filter.value" ng-change="updateQuery()"> <input type="text" ng-model="filter.value" ng-change="updateQuery()">
</span> </span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment