Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
| # -*- coding: utf-8 -*- | |
| from django.core.management.base import BaseCommand, CommandError | |
| from django.db.models.loading import get_model | |
| class Command(BaseCommand): | |
| help = "Reindex a given model." | |
| args = 'app.Model' | |
| def handle(self, *args, **options): | |
| if not args: |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
| if (isset($_SERVER['PANTHEON_ENVIRONMENT'])) { | |
| switch ($_SERVER['PANTHEON_ENVIRONMENT']) { | |
| case 'test': | |
| $base_url = 'http://test-example.gotpantheon.com'; // NO trailing slash! | |
| break; | |
| case 'dev': | |
| $base_url = 'http://dev-example.gotpantheon.com'; // NO trailing slash! | |
| break; | |
| case 'live': | |
| $base_url = 'http://www.example.com'; // NO trailing slash! |
We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
| from django.db import models | |
| class Person(models.Model): | |
| name = models.CharField(max_length=200) | |
| groups = models.ManyToManyField('Group', through='GroupMember', related_name='people') | |
| class Meta: | |
| ordering = ['name'] | |
| def __unicode__(self): |