-
Simplest intro to git by github and codeschool - Try Git
-
[Intro to github]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from StringIO import StringIO | |
| from django.core.handlers.wsgi import WSGIRequest | |
| def fake_get(path='/', user=None): | |
| req = WSGIRequest({ | |
| 'REQUEST_METHOD': 'GET', | |
| 'PATH_INFO': path, | |
| 'wsgi.input': StringIO()}) | |
| from django.contrib.auth.models import AnonymousUser | |
| req.user = AnonymousUser() if user is None else user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.contrib.auth.models import Permission | |
| from django.contrib.contenttypes.models import ContentType | |
| from myapp.models import MyModel | |
| content_type = ContentType.objects.get_for_model(MyModel) | |
| permissions = Permission.objects.filter(content_type=content_type) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.core.exceptions import ValidationError | |
| from django.db.models import Field, CharField | |
| __all__ = ['MultiColumnField'] | |
| try: | |
| from hashlib import md5 | |
| except ImportError: | |
| from md5 import new as md5 |
NewerOlder