An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
| class MultiFormMixin(ContextMixin): | |
| form_classes = {} | |
| prefixes = {} | |
| success_urls = {} | |
| grouped_forms = {} | |
| initial = {} | |
| prefix = None | |
| success_url = None |
| """ | |
| Example of mandrill service in python (http://mandrill.com/) | |
| Description of usage in python: | |
| Russian: http://www.lexev.org/2014/send-email-django-project-mandrill-service/ | |
| English: http://www.lexev.org/en/2014/send-email-django-project-mandrill-service/ | |
| """ | |
| # ====== | |
| # Django |
| # myapp/partner/strategy.py | |
| from decimal import Decimal as D | |
| from oscar.apps.partner import strategy, prices | |
| DEFAULT_RATE = D('0.196') | |
| PRODUCT_CLASSES_RATES = { | |
| 'cours': 0, |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
Jean-pierre VINCENT, consultant et expert technique Web cherche son stagiaire
Si vous pensez que :
| #don't multiply queryset for user.get_profile... | |
| #coworkers is a queryset of User | |
| coworkers_id = set([c.id for c in coworkers]) | |
| from users_profiles.models import UserProfile | |
| profiles = UserProfile.objects.filter(user__in=coworkers_id) | |
| co_profiles = dict((u.id, u) for u in profiles) | |
| for co in coworkers: | |
| co.get_profile = co_profiles.get(co.id) |