Serving null files

1
2
3
4
nullFile = lambda r: HttpResponse()

# As you might've figured out, you use it in urls.py with:
# (r'myRegex', 'some.module.nullFile'),

More like this

  1. Send large files through Django, and how to generate Zip files by jcrocholl 4 years, 9 months ago
  2. KMZMiddleware by giovabal 4 years, 1 month ago
  3. django-admin custom filter: IS NULL/IS NOT NULL by Eloff 2 years, 2 months ago
  4. Decorator to make files downloadable by prigun 3 years, 6 months ago
  5. Middleware to resolve current URL to module and view by kuchin 1 year, 10 months ago

Comments

(Forgotten your password?)