Login

Snippets by jansta

Snippet List

IP Authorization Decorator with IP list

Improved version of http://djangosnippets.org/snippets/2205/ Example simple code: ` from django.http import HttpResponse IP_LIST = ['192.168.101.100', '192.168.101.220', '127.0.0.1', '127.0.1.1'] @ip_auth(IP_LIST) def get_parameter(request,name): parameter = get_object_or_404(Parameter,short_name=short_name) return HttpResponse(parameter.value) `

  • IP
  • Authorization
  • Decorator
Read More

Django code generator

django-app-generator takes as an input your project (ORM) and generates repetitive code. At this moment there is only one example a simple RESTservice, but goal is to build alternative implementation of admin panel that will be fully customizable. The project is in the beta stage, if you encounter any problems feel free to create an issue.

  • Admin
  • REST
  • code-generator
Read More

jansta has posted 2 snippets.