Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Merge develop back to master #44

Merged
merged 110 commits into from
Feb 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
ba8be08
Replaced str() with unicode() in bone/dateBone:fromClient
tsteinruecken Jan 23, 2017
e463afc
Fixed a type-mismatch in renders/html/default:edit
tsteinruecken Jan 23, 2017
8719f2e
Merged in fix/unicodeInDateBone (pull request #61)
tsteinruecken Jan 24, 2017
6c8bbf5
Merged in fix/htmlRenderTypeMismatch (pull request #62)
tsteinruecken Feb 2, 2017
12b40ee
Merge branch 'master' into develop
tsteinruecken Feb 8, 2017
0c14cb1
Speedup processing relations in skels by reusing a global refSkel / u…
tsteinruecken Feb 8, 2017
677a246
Fixed rebuildSearchIndex broken after the transition to faster relations
tsteinruecken Feb 9, 2017
de84033
Fixed new properties not been added to relations on rebuildSearchIndex
tsteinruecken Feb 9, 2017
5bf50bd
Call setSystemInitialized on all skeletons (not only skels having kin…
tsteinruecken Feb 17, 2017
bff39ce
Fixing the canAccess() functions of the admin- and vi-renders to give…
phorward Mar 2, 2017
1c21566
Fixed a typo causing the "dest" part of an relationalBone becomming u…
tsteinruecken Mar 13, 2017
19e49f6
Merged in fix_renderCanAccess (pull request #68)
phorward Apr 10, 2017
241ec98
Fixing the order module.
phorward Feb 22, 2017
73c58a0
Implemented config variable "viur.emailHandler" to easily integrate c…
phorward Mar 29, 2017
53859de
Fix on tobis comment.
phorward Apr 12, 2017
e0cb75c
Merge branch 'develop' of bitbucket.org:/viur/server into feature/fas…
tsteinruecken Apr 18, 2017
175fe8b
Updated setBoneValue in relationalBone to store the valuesCache as it…
tsteinruecken Apr 18, 2017
7f9e0d6
Merge branch 'feature/fastRelations' of bitbucket.org:/viur/server in…
tsteinruecken Apr 18, 2017
295ba0c
skel[bone].value does not work with the new bones API...
phorward Apr 28, 2017
75eb415
Removed the 'skel["key"] = None' line, because post-delete-events lik…
phorward Apr 28, 2017
90b6702
When a userBone with updatemagic or creationmagic is created, why sho…
phorward Apr 28, 2017
d01a2cb
Export "unique" property of bone structure in json renderer.
phorward Apr 28, 2017
0898dfa
Merged in feature/splitCommitFixingOrderModule (pull request #72)
tsteinruecken Apr 28, 2017
fb9ecbe
Merged in feature/splitCommitCustomEmailHandler (pull request #73)
tsteinruecken Apr 28, 2017
3d80a32
Fix for Tobi's comment.
phorward Apr 28, 2017
2773077
Several bone improvements for a better Google Search API experience.
phorward Apr 28, 2017
426c010
Make single, typed search fields for every multiple entry.
phorward May 5, 2017
46d1d12
Merged in fix_userBone (pull request #80)
phorward May 5, 2017
c9204dc
Merged in fix_skeleton.delete (pull request #76)
phorward May 5, 2017
5cc7a80
Merged in feature_uniqueInJsonBoneStructure (pull request #81)
phorward May 16, 2017
7ba5bd3
Updated documentation for the key-bone in the skeleton class
tsteinruecken May 16, 2017
0c8fc4a
Merged in feature/skelKeyDocumentationUpdate (pull request #88)
tsteinruecken May 17, 2017
27027df
Merge branch 'master' into feature/fastRelations
tsteinruecken May 17, 2017
c25770d
Give the developer a chance to do additional tasks on user logout event.
phorward May 19, 2017
68a16e5
One more fix that came up during development.
phorward May 30, 2017
706c947
Merged in feature_onLogoutEvent (pull request #89)
phorward Jun 9, 2017
82b3586
Added missing imports to dbtransfer.py, removed return statement from…
tsteinruecken Jul 19, 2017
88fb32b
Removed all inefficient .keys() calls on dictionary membership tests …
tsteinruecken Aug 1, 2017
152c9a9
Removed unnecessary __init__ function
tsteinruecken Aug 2, 2017
a30daf8
develop in feature_extendBonesForSearchAPI gemergt
tsteinruecken Aug 2, 2017
00706d8
Merged in feature/fixDbTransferImports (pull request #93)
tsteinruecken Aug 2, 2017
fdaf38f
added Jinja function `icon`
sveneberth Aug 2, 2017
b05954c
Readded accidential removed .keys() call from for loops (instead of o…
tsteinruecken Aug 11, 2017
af5b6bf
Removed another unused and inefficent list() call from a dict members…
tsteinruecken Aug 11, 2017
8ab4b8c
Added an __iter__ to skeletons
tsteinruecken Aug 11, 2017
0564ab0
Make TaskHandler also available for the Vi renderer.
phorward Aug 23, 2017
9fa976c
Fixed a typeError in bones/numericBone:getSearchDocumentFields if it'…
tsteinruecken Aug 29, 2017
338fc24
Merged in feature_extendBonesForSearchAPI (pull request #83)
phorward Aug 29, 2017
a77511a
Renamed icon-function to embedSvg and simpified it's code
tsteinruecken Aug 29, 2017
99eebdc
Removed obsolete re import
tsteinruecken Aug 29, 2017
00867e1
Introduced the passThrough parameter to renders and unified the API o…
tsteinruecken Aug 29, 2017
ee8551d
Merge branch 'develop' into fix_skeleton.setValues
tsteinruecken Aug 29, 2017
47d910c
Removed obsolete key parameter from skeleton.setValues
tsteinruecken Aug 29, 2017
e80f648
Allow retrieving the structure of a list/hierarchy/tree module by cal…
tsteinruecken Aug 29, 2017
c1e42c5
Merged in feature/inlineIcon (pull request #96)
sveneberth Aug 30, 2017
dedb0a9
Merged in fix_skeleton.setValues (pull request #77)
phorward Aug 30, 2017
dd4ec2f
serializing a textBone failed in getSearchDocumentFields if valuesCac…
tsteinruecken Sep 5, 2017
34e8d22
Rewrote buildDbFilter in numericBone to detect and handle garbage inp…
tsteinruecken Sep 5, 2017
ec8aa41
Merged in feature/exposeViewSkelStructure (pull request #101)
tsteinruecken Sep 7, 2017
b8067a9
Merge branch 'develop' into feature/removedInefficientKeysCalls
tsteinruecken Sep 7, 2017
f93e107
Merged in feature/removedInefficientKeysCalls (pull request #102)
tsteinruecken Sep 7, 2017
51b67ae
Merge branch 'develop' into hotfix/TaskHandlerForViRenderer
tsteinruecken Sep 7, 2017
abfea57
Merged in hotfix/TaskHandlerForViRenderer (pull request #98)
phorward Sep 7, 2017
1d99b0a
Necessary fixes to get renderEditForm() work properly also in non-pat…
phorward Sep 18, 2017
effaa83
Merge branch 'master' into develop
tsteinruecken Sep 19, 2017
8e59490
Updated the changelog to reflect changes merged into develop
tsteinruecken Sep 19, 2017
ecf4c9c
Supply the descriptions of selectOne/selectMulti bones pre-translated…
tsteinruecken Sep 21, 2017
7fdfe38
Pass the (currently unused) error descriptions to the underlying webob
tsteinruecken Sep 21, 2017
2140f8e
After a discussion, removed the feature of setting bones as readOnly …
phorward Sep 29, 2017
e867c54
Creating editform templates using ViUR ignite CSS classes.
phorward Sep 29, 2017
9729d12
Some fine tuning and adding templates for password and color.
phorward Sep 29, 2017
7850f27
Renewed and more essential README.md.
phorward Oct 2, 2017
355bb9f
dev_appserver.py call fixed.
phorward Oct 2, 2017
6a1913a
Point to english mausbrand.de website
phorward Oct 2, 2017
4f8e441
Merge pull request #12 from viur-framework/fix/passErrorDescription
tsteinruecken Oct 2, 2017
07f08fb
Merge pull request #9 from viur-framework/fix/invalidQueryDataInNumer…
tsteinruecken Oct 2, 2017
edbed25
Merge pull request #13 from viur-framework/fix/translateSelectValuesI…
tsteinruecken Oct 2, 2017
0a540d2
Merge branch 'develop' into feature/structuredParameterPassThrough
tsteinruecken Oct 6, 2017
1948bfc
Merge pull request #18 from viur-framework/updatedREADME
tsteinruecken Oct 6, 2017
640c1da
Rewrote broken getSearchTags and getSearchDocumentFields in relationa…
tsteinruecken Oct 10, 2017
aac57ff
Fixes for the getSearchDocumentFields() function, that crashed the se…
phorward Oct 16, 2017
55ba079
Also fixed getSearchTags to return an empty list instead of None if t…
tsteinruecken Oct 17, 2017
831f8eb
Merge branch 'develop' into feature/structuredParameterPassThrough
tsteinruecken Oct 17, 2017
0584e2b
Renamed the passThrough parameter to params
tsteinruecken Oct 17, 2017
d458fdb
Merge pull request #19 from viur-framework/fix/relationalBone
tsteinruecken Oct 19, 2017
f0af4e6
Merge pull request #16 from viur-framework/complete_renderEditForm
tsteinruecken Oct 19, 2017
760a0b6
Merge branch 'master' into develop
tsteinruecken Oct 24, 2017
dc60a4b
Merge pull request #20 from viur-framework/mergeMasterBackToDevelop
tsteinruecken Oct 24, 2017
bc8b810
Updated Changelog.md to reflect latest merges
tsteinruecken Oct 24, 2017
73eaaa6
Small update for markdown syntax
tsteinruecken Oct 24, 2017
c9550cc
Merge branch 'develop' into feature/updatedChangelog
tsteinruecken Oct 24, 2017
4f03987
Merge pull request #11 from viur-framework/feature/structuredParamete…
tsteinruecken Oct 24, 2017
7d45a8a
Merge pull request #10 from viur-framework/fix/textBonegetSearchDocum…
tsteinruecken Oct 24, 2017
9c29237
Merge pull request #21 from viur-framework/feature/updatedChangelog
tsteinruecken Oct 24, 2017
12007c3
Bump version to 2.1.0 for release
tsteinruecken Oct 24, 2017
5a70411
Merge pull request #22 from viur-framework/feature/release2-0-0
tsteinruecken Oct 25, 2017
ea51630
fixed an import in env/date.py as pythons datetime does not support t…
xnopasaranx Nov 16, 2017
3d6a41b
Merge pull request #26 from viur-framework/fix/dateBone
tsteinruecken Nov 28, 2017
92c4d73
Fixing bug in dateBone.serialize()
phorward Dec 12, 2017
1f75457
Export params variables by json and xml renderer
phorward Dec 12, 2017
7c7d41a
Bugfix for stringBone not existing in DB
phorward Dec 20, 2017
b8d692c
Merge pull request #29 from viur-framework/fix_dateBone_serialize
tsteinruecken Dec 20, 2017
6e63c71
Set maxint as max value to sortindex
phorward Dec 22, 2017
c728987
Merge pull request #33 from viur-framework/fix/unsetStringBoneValue
tsteinruecken Jan 2, 2018
dd984fd
Merge pull request #35 from viur-framework/fix_HierarchySkel.sortindex
tsteinruecken Jan 2, 2018
b34ee7d
Consequently provide the tpl parameter
phorward Jan 16, 2018
42ab896
Merge pull request #36 from viur-framework/tplParameterToSuccess
tsteinruecken Jan 18, 2018
2be4606
Merge pull request #30 from viur-framework/feature_renderParams
tsteinruecken Jan 18, 2018
d00ed82
Fixing baseBone.buildDBFilter()
phorward Jan 24, 2018
0cfcf4c
Merge pull request #37 from viur-framework/fix_baseBone.buildDBFilter
tsteinruecken Jan 24, 2018
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
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,45 @@

## [Unreleased]

## [2.1.0] - 2017-10-25

### Added
- New edit form templates following the ViUR ignite standard
- Pass the error description of HTTPException to the underlying webob framework
- ignore/hide parameter to our renderEditForm jinja2 function
- New parameter "params" to explicitly pass additional values to the template / json response
- Retrieving the viewSkel Structure by calling modulePath/view/structure
- \_\_iter\_\_ function to skeletons
- embedSvg function to html render
- onLogout hook to the user module
- Expose the unique property in skel-structures in json render
- viur.emailHandler config variable for easy integration of 3rd party email services

### Changed
- Pre-translate the descriptions of selectOne/selectMulti bones in add or edit calls (as done in views)
- Listing and calling user-callable tasks is now also possible for the vi render
- Internally switched to more efficient membership tests for dicts
- userBones with creation- or update-magic set are not forced to be invisible anymore
- Don't set skel["key"] to None if skel.delete() is called
- Relational bones can now include properties from ref-/rel-skel bones in search indexes
- Setting update- or creation-magic on userBones don't force them to be invisible anymore
- *[Breaking]* Internal representation of relations are now dicts, not instances of Ref- or Rel-Skels

### Fixed
- handle ValueError in int() or float() in numericBone:buildDbFilter
- serializing a textBone failing in getSearchDocumentFields if valuesCache[name] is None
- Correctly handle None values in numericBones getSearchDocumentFields()
- Added missing imports to dbtransfer.py
- Several issues with writing search api indexes for relationalBones
- Usage of old Skeleton-API in orders module
- Users without access to the vi/admin render couldn't logout using these renders
- Call setSystemInitialized on all skeletons (not only skels having kindName set)
- Type-mismatch in html-render causing errors if a RelSkel is present
- Parsing dates containing non-unicode characters

### Removed
- *[Breaking]* "key"-Parameter from skeleton.setValues()


## [2.0.3] - 2017-08-30

Expand Down
128 changes: 40 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,104 +1,56 @@
ViUR® is a free software development framework for the Google App Engine™.
More about ViUR can be found at http://www.viur.is/.

DESCRIPTION
===========

**ViUR®** is an application development framework that mainly focuses to
implement cloud-based information systems on top of the
[Google AppEngine™ platform](http://appengine.google.com).

By design, ViUR-based applications are build upon simple, clear, flexible,
extendible, versatile, high-scalable and easy-to-use concepts. To fit the
requirements of modern agile software development workflows, ViUR is entirely
written in the [Python programming language](http://www.python.org/).

Applications implemented in ViUR are not only limited to websites or any other
kind of specialized web-application. Therefore, we call ViUR an information
system, because it goes beyond the limitations of a content-management-system
or other kinds of specialized web-application software.

ViUR helps to manage any kind of information. It comes with a set of four
pre-defined application kinds which can be used to build modules for any
desired tasks. The system comes with a variety of pre-defined modules, which
can easily be adapted for particular goals. New modules are simply created or
extended from other ones. Data structures can be defined, extended and changed
during the development workflow. Input masks and data management interfaces
for all informations hold in the information system are dynamically created
within the administration tools.

ViUR currently exists of three parts:

- The **server** is the core of a ViUR application. It provides the
server-library of the web-application, providing pre-defined data-models,
modules, tools and libraries for data management and much more, and several
renders to support different output kinds.
(Download it at https://bitbucket.org/viur/server)
- The **vi** (visual interface), is the web-based administration backend for
ViUR written in pure HTML5, to provide an easy-to-access management tool
that directly runs system-independently in the web-browser of any desktop or
even mobile devices. (Download it at https://bitbucket.org/viur/vi)
- The **admin** is the client-based, cross-platform administration backend to
manage a ViUR application. It focuses on power-users that want to manage
their applications with the full power of a desktop client computer.
(Download it at https://bitbucket.org/viur/admin)

Both administration tools support the integration of application-specific
plug-ins and can be used independently, depending on what is wanted and
required.

PREREQUISITES
=============

The server components of ViUR are written in **Python 2.7** because they are
based on the Google App Engine SDK. The [Google App Engine SDK](https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python)
is required for testing and deployment in the latest version.

As client system, Windows, OS X and Linux are supported, but Linux will give
you the best platform for development tasks with ViUR.

QUICK START
===========
# ViUR server

**ViUR** is a free software development framework for the [Google App Engine](https://appengine.google.com).

## About

ViUR provides a clear concept for implementing agile data management software that runs on top of the [Google App Engine](https://appengine.google.com) platform. It is written in the [Python programming language](https://python.org) for a maximum flexibility and easy-to-manage code. Its underlying database is Googles Cloud Datastore, which is a scalable document database.

The ViUR framework targets to the implementation of information systems, which are integrated, web-based applications or services performing data management and deployment operations of any kind. Therefore, ViUR is explicitly not claimed to be a content management system, although content management can be a part of a ViUR information system.

## Quick Start

To quickly setup a running ViUR web-application from scratch, follow these
simple steps:

1. Install the prerequisites (Python and Google App Engine SDK for your
operating system).
1. Install the prerequisites Python and [Google Cloud SDK for Python](https://cloud.google.com/sdk) for your operating system.
2. Create an empty folder for your project.
3. Download setup.py from http://www.viur.is/package/download/setup/latest and
save it into the newly created folder.
3. Download setup.py from https://www.viur.is/package/download/setup/latest and save it into the newly created folder.
4. Run ``setup.py`` from that folder - it will do the rest for you!
5. Locally run the development server with ``dev_appserver.py <project-dir>``
or deploy it to the world with ``appcfg.py update <project-dir>``.
5. Locally run the development server with ``dev_appserver.py -A <your-project-key> <project-dir>``
or deploy it to the world with ``gcloud app deploy --project <your-project-key> <your-project-dir>``.

Visit the official ViUR online documentation at http://docs.viur.is/latest for
more information.
All quick start steps as shell command snippet:

WHO CREATES VIUR?
=================
```sh
mkdir hello-viur # Setup project folder
cd hello-viur # Change into this folder
wget -qO setup.py https://www.viur.is/package/download/setup/latest # Download latest setup
python setup.py # Run ViUR setup tool
dev_appserver.py -A hello-viur . # Start Google App Engine
```

ViUR is developed and maintained by mausbrand Informationssysteme GmbH,
from Dortmund, Germany.
Visit the official [ViUR online documentation](https://docs.viur.is/latest) for more information.

We are a software company consisting of young, enthusiastic software
developers, designers and social media experts, working on exciting
projects for different kinds of customers. All of our newer projects are
implemented with ViUR, from tiny web-pages to huge company intranets with
hundreds of users.
## Contributing

Help of any kind to extend and improve or enhance this project in any kind or
way is always appreciated.
We take a great interest in your opinion about ViUR. We appreciate your feedback and are looking forward to hear about your ideas. Share your visions or questions with us and participate in ongoing discussions.

LICENSING
=========
- [ViUR on the web](https://www.viur.is)
- [#ViUR on freenode IRC](https://webchat.freenode.net/?channels=viur)
- [ViUR on Google Community](https://plus.google.com/communities/102034046048891029088)
- [ViUR on Twitter](https://twitter.com/weloveViUR)

ViUR is Copyright (C) 2012-2017 by Mausbrand Informationssysteme GmbH.
## Credits

ViUR is developed and maintained by [Mausbrand Informationssysteme GmbH](https://www.mausbrand.de/en), from Dortmund in Germany. We are a software company consisting of young, enthusiastic software developers, designers and social media experts, working on exciting projects for different kinds of customers. All of our newer projects are implemented with ViUR, from tiny web-pages to huge company intranets with hundreds of users.

Help of any kind to extend and improve or enhance this project in any kind or way is always appreciated.

Mausbrand and ViUR are registered trademarks of
Mausbrand Informationssysteme GmbH.
## License

ViUR is Copyright (C) 2012-2017 by Mausbrand Informationssysteme GmbH.

You may use, modify and distribute this software under the terms and
conditions of the GNU Lesser General Public License (LGPL).
Mausbrand and ViUR are registered trademarks of Mausbrand Informationssysteme GmbH.

See the file LICENSE provided in this package for more information.
You may use, modify and distribute this software under the terms and conditions of the GNU Lesser General Public License (LGPL). See the file LICENSE provided within this package for more information.
36 changes: 18 additions & 18 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
See file LICENSE for more information.
"""

__version__ = (2, 0, 3) # Which API do we expose to our application
__version__ = (2, 1, 0) # Which API do we expose to our application

import sys, traceback, os, inspect

Expand Down Expand Up @@ -132,22 +132,22 @@ def translate( key, **kwargs ):
res = None
lang = lang or conf["viur.defaultLanguage"]

if "_lang" in kwargs.keys():
if "_lang" in kwargs:
lang = kwargs[ "_lang" ]

if lang in conf["viur.languageAliasMap"].keys():
if lang in conf["viur.languageAliasMap"]:
lang = conf["viur.languageAliasMap"][ lang ]

if lang and lang in dir( translations ):
langDict = getattr(translations,lang)

if key.lower() in langDict.keys():
if key.lower() in langDict:
res = langDict[ key.lower() ]

if res is None and lang and lang in dir( servertrans ):
langDict = getattr(servertrans,lang)

if key.lower() in langDict.keys():
if key.lower() in langDict:
res = langDict[ key.lower() ]

if res is None and conf["viur.logMissingTranslations"]:
Expand Down Expand Up @@ -182,7 +182,7 @@ def setDefaultDomainLanguage( domain, lang ):
host = host[ 4: ]
conf["viur.domainLanguageMapping"][host] = lang.lower()

### Multi-Language Part: END
### Multi-Language Part: END

from server import session, errors
from server.tasks import TaskHandler, runStartupTasks
Expand Down Expand Up @@ -234,7 +234,7 @@ def buildApp( config, renderers, default=None, *args, **kwargs ):
"""
class ExtendableObject( object ):
pass

if isinstance( renderers, dict ):
rendlist = renderers
else: # build up the dict from server.render
Expand Down Expand Up @@ -330,7 +330,7 @@ class BrowseHandler(webapp.RequestHandler):

:warning: Don't instantiate! Don't subclass! DON'T TOUCH! ;)
"""

def get(self, path="/", *args, **kwargs): #Accept a HTTP-GET request
t1 = time()
if path=="_ah/start" or path=="_ah/warmup": #Warmup request
Expand All @@ -350,7 +350,7 @@ def post(self, path="/", *args, **kwargs): #Accept a HTTP-POST request
def head(self, path="/", *args, **kwargs): #Accept a HTTP-HEAD request
self.isPostRequest = False
self.processRequest( path, *args, **kwargs )

def selectLanguage( self, path ):
"""
Tries to select the best language for the current request.
Expand All @@ -361,7 +361,7 @@ def selectLanguage( self, path ):
if conf["viur.languageMethod"] == "session":
# We store the language inside the session, try to load it from there
if not session.current.getLanguage():
if "X-Appengine-Country" in self.request.headers.keys():
if "X-Appengine-Country" in self.request.headers:
lng = self.request.headers["X-Appengine-Country"].lower()
if lng in conf["viur.availableLanguages"]+list( conf["viur.languageAliasMap"].keys() ):
session.current.setLanguage( lng )
Expand All @@ -375,7 +375,7 @@ def selectLanguage( self, path ):
host = host[ host.find("://")+3: ].strip(" /") #strip http(s)://
if host.startswith("www."):
host = host[ 4: ]
if host in conf["viur.domainLanguageMapping"].keys():
if host in conf["viur.domainLanguageMapping"]:
self.language = conf["viur.domainLanguageMapping"][ host ]
else: # We have no language configured for this domain, try to read it from session
if session.current.getLanguage():
Expand Down Expand Up @@ -471,7 +471,7 @@ def processRequest( self, path, *args, **kwargs ): #Bring up the enviroment for
if conf["viur.debug.traceExceptions"]:
raise
self.response.clear()
self.response.set_status( e.status )
self.response.set_status(e.status, e.descr)
res = None
if conf["viur.errorHandler"]:
try:
Expand Down Expand Up @@ -508,7 +508,7 @@ def processRequest( self, path, *args, **kwargs ): #Bring up the enviroment for
self.response.out.write( res )
if bugsnag and conf["bugsnag.apiKey" ]:
bugsnag.configure( api_key=conf["bugsnag.apiKey" ] )
try:
try:
user = conf["viur.mainApp"].user.getCurrentUser()
except:
user = "-unknown-"
Expand All @@ -520,7 +520,7 @@ def processRequest( self, path, *args, **kwargs ): #Bring up the enviroment for
bugsnag.notify( e )
finally:
self.saveSession( )


def findAndCall( self, path, *args, **kwargs ): #Do the actual work: process the request
# Prevent Hash-collision attacks
Expand All @@ -530,7 +530,7 @@ def findAndCall( self, path, *args, **kwargs ): #Do the actual work: process the
for key in tmpArgs.keys()[ : ]:
if len( tmpArgs[ key ] ) == 0:
continue
if not key in kwargs.keys():
if not key in kwargs:
if len( tmpArgs[ key ] ) == 1:
kwargs[ key ] = tmpArgs[ key ][0]
else:
Expand All @@ -541,7 +541,7 @@ def findAndCall( self, path, *args, **kwargs ): #Do the actual work: process the
else:
kwargs[key] = [ kwargs[key] ] + tmpArgs[key]
del tmpArgs
if "self" in kwargs.keys(): #self is reserved for bound methods
if "self" in kwargs: #self is reserved for bound methods
raise errors.BadRequest()
#Parse the URL
path = urlparse.urlparse( path ).path
Expand Down Expand Up @@ -670,7 +670,7 @@ def setup( modules, render=None, default="html" ):
if not skel.kindName:
# Looks like a common base-class for skeletons
continue
if skel.kindName in conf["viur.skeletons"].keys() and skel!=conf["viur.skeletons"][ skel.kindName ]:
if skel.kindName in conf["viur.skeletons"] and skel!=conf["viur.skeletons"][ skel.kindName ]:
# We have a conflict here, lets see if one skeleton is from server.*, and one from skeletons.*
relNewFileName = inspect.getfile(skel).replace( os.getcwd(),"" )
relOldFileName = inspect.getfile(conf["viur.skeletons"][ skel.kindName ]).replace( os.getcwd(),"" )
Expand Down Expand Up @@ -714,7 +714,7 @@ def setup( modules, render=None, default="html" ):
uri.lower().startswith("https://") or uri.lower().startswith("http://"))
runStartupTasks() #Add a deferred call to run all queued startup tasks
return( conf["viur.wsgiApp"] )


def run():
"""
Expand Down
Loading