old_contents: # -*- coding: utf-8 -*-
  # Generated by Django 1.11 on 2017-04-25 09:11
  from __future__ import unicode_literals
  
  from django.conf import settings
  from django.db import migrations
  
  
  def ensure_site(apps):
      """Configure Sites correctly."""
  
      Site = apps.get_model('sites', 'Site')
      site, created = Site.objects.update_or_create(id=settings.SITE_ID, defaults={'domain': 'freelancefinder.work', 'name': 'FreelanceFinder'})
      return site
  
  
  def create_social_app_settings(apps, schema_editor):
      """Get settings ready for django-allauth."""
      site = ensure_site(apps)
  
      SocialApp = apps.get_model('socialaccount', 'SocialApp')
      gh_app, created = SocialApp.objects.get_or_create(provider='github', name='GitHub', defaults={
          'client_id': settings.GITHUB_CLIENT_ID, 'secret': settings.GITHUB_CLIENT_SECRET
      })
      gh_app.sites.add(site)
  
      li_app, created = SocialApp.objects.get_or_create(provider='linkedin', name='LinkedIn', defaults={
          'client_id': settings.LINKEDIN_CLIENT_ID, 'secret': settings.LINKEDIN_CLIENT_SECRET
      })
      li_app.sites.add(site)
  
      re_app, created = SocialApp.objects.get_or_create(provider='reddit', name='Reddit', defaults={
          'client_id': settings.REDDIT_CLIENT_ID, 'secret': settings.REDDIT_CLIENT_SECRET
      })
      re_app.sites.add(site)
  
  
  def delete_social_app_settings(apps, schema_editor):
      """Delete all social apps."""
  
      SocialApp = apps.get_model('socialaccount', 'SocialApp')
      SocialApp.objects.all().delete()
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('remotes', '0005_auto_20170319_1547'),
      ]
  
      operations = [
          migrations.RunPython(create_social_app_settings, reverse_code=delete_social_app_settings),
      ]
  
new_contents: # -*- coding: utf-8 -*-
  # Generated by Django 1.11 on 2017-04-25 09:11
  from __future__ import unicode_literals
  
  from django.conf import settings
  from django.db import migrations
  
  
  def ensure_site(apps):
      """Configure Sites correctly."""
  
      Site = apps.get_model('sites', 'Site')
      site, created = Site.objects.update_or_create(id=settings.SITE_ID, defaults={'domain': 'freelancefinder.work', 'name': 'FreelanceFinder'})
      return site
  
  
  def create_social_app_settings(apps, schema_editor):
      """Get settings ready for django-allauth."""
      site = ensure_site(apps)
  
      SocialApp = apps.get_model('socialaccount', 'SocialApp')
      gh_app, created = SocialApp.objects.get_or_create(provider='github', name='GitHub', defaults={
          'client_id': settings.GITHUB_CLIENT_ID, 'secret': settings.GITHUB_CLIENT_SECRET
      })
      gh_app.sites.add(site)
  
      li_app, created = SocialApp.objects.get_or_create(provider='linkedin', name='LinkedIn', defaults={
          'client_id': settings.LINKEDIN_CLIENT_ID, 'secret': settings.LINKEDIN_CLIENT_SECRET
      })
      li_app.sites.add(site)
  
      re_app, created = SocialApp.objects.get_or_create(provider='reddit', name='Reddit', defaults={
          'client_id': settings.REDDIT_CLIENT_ID, 'secret': settings.REDDIT_CLIENT_SECRET
      })
      re_app.sites.add(site)
  
  
  def delete_social_app_settings(apps, schema_editor):
      """Delete all social apps."""
  
      SocialApp = apps.get_model('socialaccount', 'SocialApp')
      SocialApp.objects.all().delete()
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('remotes', '0005_auto_20170319_1547'),
          ('socialaccount', '0003_extra_data_default_dict'),
          ('sites', '0002_alter_domain_unique'),
      ]
  
      operations = [
          migrations.RunPython(create_social_app_settings, reverse_code=delete_social_app_settings),
      ]
  
subject: Set dependencies correctly