Skip to content

Commit

Permalink
Improve compatibility with the pyforms library
Browse files Browse the repository at this point in the history
  • Loading branch information
UmSenhorQualquer committed May 18, 2018
1 parent 60558e4 commit ee92b6a
Show file tree
Hide file tree
Showing 66 changed files with 508 additions and 514 deletions.
4 changes: 0 additions & 4 deletions pyforms/__init__.py

This file was deleted.

Empty file removed pyforms/utils/__init__.py
Empty file.
42 changes: 0 additions & 42 deletions pyforms/utils/settings_manager.py

This file was deleted.

2 changes: 1 addition & 1 deletion pyforms_web/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from pyforms import conf; conf += 'pyforms_web.settings'
from confapp import conf; conf += 'pyforms_web.settings'
41 changes: 20 additions & 21 deletions pyforms_web/basewidget.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@

from .controls.ControlBase import ControlBase
from .controls.ControlFile import ControlFile
from .controls.ControlSlider import ControlSlider
from .controls.ControlText import ControlText
from .controls.ControlCheckBox import ControlCheckBox
from .controls.ControlLabel import ControlLabel
from .controls.control_base import ControlBase
from .controls.control_file import ControlFile
from .controls.control_slider import ControlSlider
from .controls.control_text import ControlText
from .controls.control_checkbox import ControlCheckBox
from .controls.control_label import ControlLabel
from .controls.control_button import ControlButton
try:
from .controls.ControlPlayer import ControlPlayer
from .controls.control_player import ControlPlayer
except:
print("ControlPlayer is not available")
from .controls.ControlButton import ControlButton
from .web.applications import ApplicationsLoader
from .web.middleware import PyFormsMiddleware
from .web.middleware import PyFormsMiddleware
import uuid, os, shutil, base64, inspect
import base64, dill, simplejson, filelock
from pyforms import conf
from confapp import conf
from django.template.loader import render_to_string

from .utils import make_lambda_func

class no_columns(object):
Expand Down Expand Up @@ -183,16 +182,16 @@ def generate_control(self, row):
control = self.controls.get(row, None)
if control==None:
if row==' ': return "<div class='field' ></div>"
elif row.startswith('h1:'): return "<h1>{0}</h1>".format(row[3:])
elif row.startswith('h1-right:'):return "<h1 class='ui right aligned header' >{0}</h1>".format(row[9:])
elif row.startswith('h2:'): return "<h2>{0}</h2>".format(row[3:])
elif row.startswith('h2-right:'):return "<h2 class='ui right aligned header' >{0}</h2>".format(row[9:])
elif row.startswith('h3:'): return "<h3>{0}</h3>".format(row[3:])
elif row.startswith('h3-right:'):return "<h3 class='ui right aligned header' >{0}</h3>".format(row[9:])
elif row.startswith('h4:'): return "<h4>{0}</h4>".format(row[3:])
elif row.startswith('h4-right:'):return "<h4 class='ui right aligned header' >{0}</h4>".format(row[9:])
elif row.startswith('h5:'): return "<h5>{0}</h5>".format(row[3:])
elif row.startswith('h5-right:'):return "<h5 class='ui right aligned header' >{0}</h5>".format(row[9:])
elif row.startswith('h1:'): return "<h1 class='field' >{0}</h1>".format(row[3:])
elif row.startswith('h1-right:'):return "<h1 class='ui right aligned header field' >{0}</h1>".format(row[9:])
elif row.startswith('h2:'): return "<h2 class='field' >{0}</h2>".format(row[3:])
elif row.startswith('h2-right:'):return "<h2 class='ui right aligned header field' >{0}</h2>".format(row[9:])
elif row.startswith('h3:'): return "<h3 class='field' >{0}</h3>".format(row[3:])
elif row.startswith('h3-right:'):return "<h3 class='ui right aligned header field' >{0}</h3>".format(row[9:])
elif row.startswith('h4:'): return "<h4 class='field' >{0}</h4>".format(row[3:])
elif row.startswith('h4-right:'):return "<h4 class='ui right aligned header field' >{0}</h4>".format(row[9:])
elif row.startswith('h5:'): return "<h5 class='field' >{0}</h5>".format(row[3:])
elif row.startswith('h5-right:'):return "<h5 class='ui right aligned header field' >{0}</h5>".format(row[9:])
elif row.startswith('info:'): return "<div class='ui info visible message'>{0}</div>".format(row[5:])
elif row.startswith('warning:'): return "<div class='ui warning visible message'>{0}</div>".format(row[8:])
elif row.startswith('alert:'): return "<div class='ui error visible message'>{0}</div>".format(row[6:])
Expand Down
6 changes: 0 additions & 6 deletions pyforms_web/controls/ControlFile.py

This file was deleted.

127 changes: 0 additions & 127 deletions pyforms_web/controls/ControlPlayer.py

This file was deleted.

62 changes: 0 additions & 62 deletions pyforms_web/controls/ControlSlider.py

This file was deleted.

4 changes: 2 additions & 2 deletions pyforms_web/controls/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__author__="ricardo"
__date__ ="$Aug 18, 2012 12:50:07 PM$"
__author__ = "ricardo"

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyforms_web.controls.ControlBase import ControlBase
from pyforms_web.controls.control_base import ControlBase
import simplejson, collections

class ValueNotSet: pass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import uuid
from pyforms import conf
from confapp import conf
from pyforms_web.web.middleware import PyFormsMiddleware

class ControlBase(object):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyforms_web.controls.ControlBase import ControlBase
from pyforms_web.controls.control_base import ControlBase
import simplejson

class ControlBoundingSlider(ControlBase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyforms_web.controls.ControlBase import ControlBase
from pyforms_web.controls.control_base import ControlBase
import simplejson

class ControlBreadcrumb(ControlBase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyforms_web.controls.ControlBase import ControlBase
from pyforms_web.controls.control_base import ControlBase
import simplejson

class ControlButton(ControlBase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from datetime import date
from pyforms_web.controls.ControlBase import ControlBase
from pyforms_web.controls.control_base import ControlBase
import simplejson

class ControlCalendar(ControlBase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyforms_web.controls.ControlBase import ControlBase
from pyforms_web.controls.control_base import ControlBase
import simplejson

class ControlCheckBox(ControlBase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyforms_web.controls.ControlBase import ControlBase
from pyforms_web.controls.control_base import ControlBase
import simplejson


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pyforms_web.controls.ControlBase import ControlBase
from pyforms_web.controls.ControlCheckBoxList import ControlCheckBoxList
from pyforms_web.controls.control_base import ControlBase
from pyforms_web.controls.control_checkboxlist import ControlCheckBoxList
from django.apps import apps
import simplejson, collections

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyforms_web.controls.ControlBase import ControlBase
from pyforms_web.controls.control_base import ControlBase
import simplejson, collections

class ValueNotSet: pass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import datetime
from pyforms_web.controls.ControlBase import ControlBase
from pyforms_web.controls.control_base import ControlBase
import simplejson

from django.utils.dateparse import parse_datetime
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import datetime
from pyforms_web.controls.ControlBase import ControlBase
from pyforms_web.controls.control_base import ControlBase
import simplejson

from django.utils.dateparse import parse_datetime
Expand Down

0 comments on commit ee92b6a

Please sign in to comment.