Did I find the right examples for you? yes no

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

src/d/j/django-session-attachments-HEAD/session_attachments/views.py   django-session-attachments(Download)
from .utils import get_attachments, get_attachment, delete_attachments, delete_attachment, delete_and_clean
from .decorators import enforce_session
from .config import SESSION_ATTACHMENTS_MAX_FILE_SIZE
 
 
                # check max size
                file_size = request.FILES[upload_file].size / (1024 * 1024)
                if file_size > SESSION_ATTACHMENTS_MAX_FILE_SIZE:
                    return HttpResponse(status=413)
 

src/d/j/django-session-attachments-HEAD/session_attachments/context_processors.py   django-session-attachments(Download)
# -*- coding: utf-8 -*-
from .config import SESSION_ATTACHMENTS_MAX_FILE_SIZE
 
 
def filesize(request):
    return {
        'SESSION_ATTACHMENTS_MAX_FILE_SIZE': SESSION_ATTACHMENTS_MAX_FILE_SIZE