django-snippetscream

Django app packaging the best snippets found on http://djangosnippets.org
Download

django-snippetscream Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Publisher Name:
  • Shaun Sephton
  • Publisher web site:
  • http://github.com/shaunsephton/

django-snippetscream Tags


django-snippetscream Description

Django app packaging the best snippets found on http://djangosnippets.org django-snippetscream is a Django app packaging the best snippets found on http://djangosnippets.orgIncluded Snippets963. RequestFactoryEasily create mock request objects for use in testing.Original Snippet - http://djangosnippets.org/snippets/963/Example:from snippetscream import RequestFactoryrequest = RequestFactory().get('/')1378. Resolve URLs to View NameSupplies a resolve_to_name function that takes in a path and resolves it to a view name or view function name (given that the path is actually defined in your urlconf).Original Snippet - http://djangosnippets.org/snippets/1378/Example:=== urlconf ====urlpatterns = patterns('' (r'/some/url', 'app.views.view'), (r'/some/other/url', 'app.views.other.view', {}, 'this_is_a_named_view'),)=== example usage in interpreter ===>>> from snippetscream import resolve_to_name>>> print resolve_to_name('/some/url')'app.views.view'>>> print resolve_to_name('/some/other/url')'this_is_a_named_view' Requirements: · Python · Django What's New in This Release: · Included 1875 - Auto-create Django Admin User During syncdb


django-snippetscream Related Software