Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:jnaous:expedient
python-optin-manager
optin_manager_auth.wsgi
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File optin_manager_auth.wsgi of Package python-optin-manager
import os import sys from os.path import dirname, join # This is needed because wsgi disallows using stdout sys.stdout = sys.stderr os.environ['DJANGO_SETTINGS_MODULE'] = 'openflow.optin_manager.settings' sys.path.append("/etc/optin_manager") from django.contrib.auth.models import User from django import db def check_password(environ, user, password): db.reset_queries() kwargs = {'username': user, 'is_active': True} try: try: user = User.objects.get(**kwargs) except User.DoesNotExist: return None if user.check_password(password): return True else: return False finally: db.connection.close()
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor