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

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
valq7711 authored Sep 6, 2021
1 parent 61f336c commit f6924e7
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 f6924e7

Please sign in to comment.