Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
Merge pull request #8 from valq7711/patch-28
Browse files Browse the repository at this point in the history
minor improvements
  • Loading branch information
KellerKev authored Sep 6, 2021
2 parents 353eaee + f6924e7 commit 2e2f801
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions apps/safe_fixtures/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@
SafeFixtures.HTTP = HTTP


class SF(SafeFixtures):
session = Session(secret="some secret")
index_html = Template('index.html')
db = db
user_in = None


class RequiresUser(Fixture):

def __init__(self, session):
Expand All @@ -39,7 +32,12 @@ def on_request(self):
if not user or not user.get('id'):
raise HTTP(401)

SF.user_in = RequiresUser(SF.session)

class SF(SafeFixtures):
session = Session(secret="some secret")
index_html = Template('index.html')
db = db
user_in = RequiresUser(session)


sf = SF()
Expand Down

0 comments on commit 2e2f801

Please sign in to comment.