Rename 'forms2' package, templates to 'forms'

This commit is contained in:
Lance Edgar 2018-02-11 22:48:48 -06:00
parent d0b78babd2
commit cdaf36f346
20 changed files with 17 additions and 17 deletions

View file

@ -646,9 +646,9 @@ class Form(object):
def render(self, template=None, **kwargs):
if not template:
if self.readonly:
template = '/forms2/form_readonly.mako'
template = '/forms/form_readonly.mako'
else:
template = '/forms2/form.mako'
template = '/forms/form.mako'
context = kwargs
context['form'] = self
return render(template, context)
@ -686,7 +686,7 @@ class Form(object):
return self.deform_form
def render_deform(self, dform=None, template='/forms2/deform.mako', **kwargs):
def render_deform(self, dform=None, template='/forms/deform.mako', **kwargs):
if dform is None:
dform = self.make_deform_form()
@ -704,7 +704,7 @@ class Form(object):
context['request'] = self.request
context['readonly_fields'] = self.readonly_fields
context['render_field_readonly'] = self.render_field_readonly
return render('/forms2/deform.mako', context)
return render('/forms/deform.mako', context)
def field_visible(self, field):
if self.hidden and self.hidden.get(field):

View file

@ -33,7 +33,7 @@ from deform import widget as dfwidget
from pyramid.httpexceptions import HTTPForbidden
from webhelpers2.html import tags, literal
from tailbone import forms2 as forms
from tailbone import forms
from tailbone.db import Session
from tailbone.views import View
from tailbone.auth import login_user, logout_user

View file

@ -49,7 +49,7 @@ from pyramid.response import FileResponse
from pyramid_deform import SessionFileUploadTempStore
from webhelpers2.html import HTML, tags
from tailbone import forms2 as forms, grids
from tailbone import forms, grids
from tailbone.db import Session
from tailbone.views import MasterView
from tailbone.progress import SessionProgress

View file

@ -39,7 +39,7 @@ from pyramid import httpexceptions
from pyramid.response import Response
import tailbone
from tailbone import forms2 as forms
from tailbone import forms
from tailbone.db import Session
from tailbone.views import View

View file

@ -35,7 +35,7 @@ from rattail.db import model
from pyramid.response import FileResponse
from webhelpers2.html import HTML, tags
from tailbone import forms2 as forms
from tailbone import forms
from tailbone.views import MasterView

View file

@ -34,7 +34,7 @@ from rattail.util import OrderedDict
import colander
from webhelpers2.html import tags
from tailbone import forms2 as forms
from tailbone import forms
from tailbone.db import Session
from tailbone.views.batch import FileBatchMasterView

View file

@ -40,7 +40,7 @@ import colander
from deform import widget as dfwidget
from webhelpers2.html import HTML, tags
from tailbone import forms2 as forms, grids
from tailbone import forms, grids
from tailbone.views import MasterView
from tailbone.views.batch import BatchMasterView

View file

@ -50,7 +50,7 @@ from pyramid.renderers import get_renderer, render_to_response, render
from pyramid.response import FileResponse
from webhelpers2.html import HTML, tags
from tailbone import forms2 as forms, grids, diffs
from tailbone import forms, grids, diffs
from tailbone.views import View
from tailbone.progress import SessionProgress

View file

@ -45,7 +45,7 @@ from deform import widget as dfwidget
from pyramid import httpexceptions
from webhelpers2.html import tags, HTML
from tailbone import forms2 as forms, grids
from tailbone import forms, grids
from tailbone.db import Session
from tailbone.views import MasterView, AutocompleteView
from tailbone.progress import SessionProgress

View file

@ -36,7 +36,7 @@ from deform import widget as dfwidget
from pyramid import httpexceptions
from webhelpers2.html import tags
from tailbone import forms2 as forms
from tailbone import forms
from tailbone.views.batch import BatchMasterView

View file

@ -39,7 +39,7 @@ import colander
import formencode as fe
from webhelpers2.html import tags
from tailbone import forms2 as forms, grids
from tailbone import forms, grids
from tailbone.views.purchasing import PurchasingBatchView

View file

@ -40,7 +40,7 @@ import colander
from deform import widget as dfwidget
from webhelpers2.html import tags, HTML
from tailbone import forms2 as forms
from tailbone import forms
from tailbone.db import Session
from tailbone.views import View

View file

@ -38,7 +38,7 @@ import colander
from deform import widget as dfwidget
from webhelpers2.html import HTML, tags
from tailbone import forms2 as forms
from tailbone import forms
from tailbone.db import Session
from tailbone.views import MasterView
from tailbone.views.principal import PrincipalMasterView, PermissionsRenderer

View file

@ -37,7 +37,7 @@ import colander
from deform import widget as dfwidget
from webhelpers2.html import tags
from tailbone import forms2 as forms
from tailbone import forms
from tailbone.db import Session
from tailbone.views.batch import FileBatchMasterView