Django app packaging the best snippets found on http://djangosnippets.org
Project description
Django Snippets Cream
Django app packaging the best snippets found on http://djangosnippets.org
Included Snippets
963. RequestFactory
Easily create mock request objects for use in testing.
Original Snippet - http://djangosnippets.org/snippets/963/
Example:
from snippetscream import RequestFactory request = RequestFactory().get('/')
1378. Resolve URLs to View Name
Supplies 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'
Changelog
0.0.1
Initial release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file django-snippetscream-0.0.1.tar.gz
.
File metadata
- Download URL: django-snippetscream-0.0.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdc3b6671777e95264172eea46ee6ddff18ee4418352c22d8de56b625de44cee |
|
MD5 | f114640339d803616a79d779972bbac9 |
|
BLAKE2b-256 | 9df68fc36c1a15788285a4103ca617197e08d00a538cb8d189649228fbbbcb44 |
Provenance
File details
Details for the file django_snippetscream-0.0.1-py2.6.egg
.
File metadata
- Download URL: django_snippetscream-0.0.1-py2.6.egg
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e586940d302418dc514c354ae7bcdfd5176c56a9e93602dc2574d2dcf5fe1280 |
|
MD5 | 7bef8daee79e51e6f0256a8e7ccd9633 |
|
BLAKE2b-256 | 74617dec633bb48994551dc21131ada7976a477a33c8fcaef3113b8fb30aaa1a |
Provenance
File details
Details for the file django_snippetscream-0.0.1-py2.5.egg
.
File metadata
- Download URL: django_snippetscream-0.0.1-py2.5.egg
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb25abadfc8be9f3491878ef23b660f64418c6b93764ce25b5759bb59f5e3b86 |
|
MD5 | 80fa7bce5e007aaed34200048e5ac4cb |
|
BLAKE2b-256 | 5599778d4d0adcadbcfa27df51e6de448d4f10e7a6345be33be33b5871b5e94a |