Did I find the right examples for you? yes no

All Samples(5)  |  Call(2)  |  Derive(0)  |  Import(3)

src/d/j/django-maintenance-0.1/maintenance/admin.py   django-maintenance(Download)
from django.contrib import admin
 
from models import Maintenance, MaintenanceFilter
 
class MaintenanceFilterInline(admin.StackedInline):

src/d/j/django-maintenance-0.1/maintenance/middleware.py   django-maintenance(Download)
from django.http import HttpResponseServerError
from django.shortcuts import render_to_response
from datetime import datetime
from models import Maintenance
 

src/d/j/django-maintenance-0.1/maintenance/tests.py   django-maintenance(Download)
 
from middleware import MaintenanceMiddleware
from models import Maintenance, MaintenanceFilter
 
class MaintenanceMiddlewareTest(TestCase):
    def _create_maintenance_now(self):
        maintenance = Maintenance()
        maintenance.start_time = datetime.now() - timedelta(3600)
        maintenance.end_time = datetime.now() + timedelta(3600)
        return maintenance
 
    def _create_maintenance_yesterday(self):
        maintenance = Maintenance()