Apply "object" changes only from futurize --stage2.
				
					
				
			This commit is contained in:
		
							parent
							
								
									05bee8b3c3
								
							
						
					
					
						commit
						31e51a7742
					
				
					 14 changed files with 27 additions and 14 deletions
				
			
		|  | @ -1,3 +1,4 @@ | ||||||
|  | from builtins import object | ||||||
| import hashlib | import hashlib | ||||||
| 
 | 
 | ||||||
| from django.conf import settings | from django.conf import settings | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ class EntryTag(models.Model): | ||||||
|     label = models.CharField(max_length=100) |     label = models.CharField(max_length=100) | ||||||
|     slug = models.SlugField() |     slug = models.SlugField() | ||||||
| 
 | 
 | ||||||
|     class Meta: |     class Meta(object): | ||||||
|         db_table = 'techblog_entrytag' # legacy |         db_table = 'techblog_entrytag' # legacy | ||||||
| 
 | 
 | ||||||
|     def __unicode__(self): |     def __unicode__(self): | ||||||
|  | @ -33,7 +33,7 @@ class Entry(models.Model, bsoup.SoupModelMixin): | ||||||
|     date_created = models.DateTimeField(auto_now_add=True) |     date_created = models.DateTimeField(auto_now_add=True) | ||||||
|     date_last_modified = models.DateTimeField(auto_now=True) |     date_last_modified = models.DateTimeField(auto_now=True) | ||||||
| 
 | 
 | ||||||
|     class Meta: |     class Meta(object): | ||||||
|         db_table = 'techblog_entries' # legacy |         db_table = 'techblog_entries' # legacy | ||||||
|         verbose_name_plural = 'entries' |         verbose_name_plural = 'entries' | ||||||
|         ordering = ('-pub_date',) |         ordering = ('-pub_date',) | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | from builtins import object | ||||||
| from django.db import models | from django.db import models | ||||||
| 
 | 
 | ||||||
| class ContactEntry(models.Model): | class ContactEntry(models.Model): | ||||||
|  | @ -8,6 +9,6 @@ class ContactEntry(models.Model): | ||||||
|     email = models.EmailField() # should make it unique, but we really cannot |     email = models.EmailField() # should make it unique, but we really cannot | ||||||
|     subscribe_conservancy = models.BooleanField(default=False) |     subscribe_conservancy = models.BooleanField(default=False) | ||||||
| 
 | 
 | ||||||
|     class Meta: |     class Meta(object): | ||||||
|         ordering = ('email',) |         ordering = ('email',) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | from builtins import object | ||||||
| from django.shortcuts import render | from django.shortcuts import render | ||||||
| from django import forms | from django import forms | ||||||
| from conservancy.apps.contacts.models import ContactEntry | from conservancy.apps.contacts.models import ContactEntry | ||||||
|  | @ -8,7 +9,7 @@ def subscribe(request): | ||||||
|     """ |     """ | ||||||
| 
 | 
 | ||||||
|     class ContactEntryForm(ModelForm): |     class ContactEntryForm(ModelForm): | ||||||
|         class Meta: |         class Meta(object): | ||||||
|             model = ContactEntry |             model = ContactEntry | ||||||
| 
 | 
 | ||||||
|     ContactEntryForm.base_fields['subscribe_conservancy'].label = 'Receive Software Freedom Conservancy updates' |     ContactEntryForm.base_fields['subscribe_conservancy'].label = 'Receive Software Freedom Conservancy updates' | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | from builtins import object | ||||||
| from django.db import models | from django.db import models | ||||||
| from conservancy.apps.staff.models import Person | from conservancy.apps.staff.models import Person | ||||||
| from conservancy.apps.worldmap.models import EarthLocation | from conservancy.apps.worldmap.models import EarthLocation | ||||||
|  | @ -46,7 +47,7 @@ class Event(models.Model): | ||||||
|     date_created = models.DateTimeField(auto_now_add=True) |     date_created = models.DateTimeField(auto_now_add=True) | ||||||
|     date_last_modified = models.DateTimeField(auto_now=True) |     date_last_modified = models.DateTimeField(auto_now=True) | ||||||
| 
 | 
 | ||||||
|     class Meta: |     class Meta(object): | ||||||
|         ordering = ("-date",) |         ordering = ("-date",) | ||||||
| 
 | 
 | ||||||
|     def __unicode__(self): |     def __unicode__(self): | ||||||
|  | @ -86,7 +87,7 @@ class EventMedia(models.Model): | ||||||
|     date_created = models.DateTimeField(auto_now_add=True) |     date_created = models.DateTimeField(auto_now_add=True) | ||||||
|     date_last_modified = models.DateTimeField(auto_now=True) |     date_last_modified = models.DateTimeField(auto_now=True) | ||||||
| 
 | 
 | ||||||
|     class Meta: |     class Meta(object): | ||||||
|         verbose_name_plural = 'event media' |         verbose_name_plural = 'event media' | ||||||
| 
 | 
 | ||||||
|     def __unicode__(self): |     def __unicode__(self): | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | from builtins import object | ||||||
| import random | import random | ||||||
| 
 | 
 | ||||||
| from django.db import models | from django.db import models | ||||||
|  | @ -18,7 +19,7 @@ class FundraisingGoal(models.Model): | ||||||
|     def percentage_there(self): |     def percentage_there(self): | ||||||
|         return (self.fundraiser_so_far_amount / self.fundraiser_goal_amount ) * 100 |         return (self.fundraiser_so_far_amount / self.fundraiser_goal_amount ) * 100 | ||||||
|      |      | ||||||
|     class Meta: |     class Meta(object): | ||||||
|         ordering = ('fundraiser_code_name',) |         ordering = ('fundraiser_code_name',) | ||||||
| 
 | 
 | ||||||
|     def providers(self): |     def providers(self): | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | from builtins import object | ||||||
| from django.db import models | from django.db import models | ||||||
| from django.conf import settings | from django.conf import settings | ||||||
| from conservancy import bsoup | from conservancy import bsoup | ||||||
|  | @ -21,7 +22,7 @@ class PressRelease(models.Model, bsoup.SoupModelMixin): | ||||||
| 
 | 
 | ||||||
|     date_last_modified = models.DateTimeField(auto_now=True) |     date_last_modified = models.DateTimeField(auto_now=True) | ||||||
| 
 | 
 | ||||||
|     class Meta: |     class Meta(object): | ||||||
|         ordering = ("-pub_date",) |         ordering = ("-pub_date",) | ||||||
|         get_latest_by = "pub_date" |         get_latest_by = "pub_date" | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | from builtins import object | ||||||
| from django.db import models | from django.db import models | ||||||
| 
 | 
 | ||||||
| class Person(models.Model): | class Person(models.Model): | ||||||
|  | @ -19,7 +20,7 @@ class Person(models.Model): | ||||||
|     date_created = models.DateTimeField(auto_now_add=True) |     date_created = models.DateTimeField(auto_now_add=True) | ||||||
|     date_last_modified = models.DateTimeField(auto_now=True) |     date_last_modified = models.DateTimeField(auto_now=True) | ||||||
| 
 | 
 | ||||||
|     class Meta: |     class Meta(object): | ||||||
|         verbose_name_plural = 'people' |         verbose_name_plural = 'people' | ||||||
| 
 | 
 | ||||||
|     def __unicode__(self): |     def __unicode__(self): | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | from builtins import object | ||||||
| from django.db import models | from django.db import models | ||||||
| 
 | 
 | ||||||
| class SummitRegistration(models.Model): | class SummitRegistration(models.Model): | ||||||
|  | @ -11,6 +12,6 @@ class SummitRegistration(models.Model): | ||||||
|     date_created = models.DateField(auto_now_add=True) |     date_created = models.DateField(auto_now_add=True) | ||||||
|     cle_credit = models.BooleanField(default=True) |     cle_credit = models.BooleanField(default=True) | ||||||
| 
 | 
 | ||||||
|     class Meta: |     class Meta(object): | ||||||
|         ordering = ('name',) |         ordering = ('name',) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | from builtins import object | ||||||
| from django.shortcuts import render | from django.shortcuts import render | ||||||
| from django import forms | from django import forms | ||||||
| from conervancy.apps.summit_registration.models import SummitRegistration | from conervancy.apps.summit_registration.models import SummitRegistration | ||||||
|  | @ -7,7 +8,7 @@ def register(request): | ||||||
|     """ |     """ | ||||||
| 
 | 
 | ||||||
|     class SummitForm(ModelForm): |     class SummitForm(ModelForm): | ||||||
|         class Meta: |         class Meta(object): | ||||||
|             model = SummitRegistration |             model = SummitRegistration | ||||||
| 
 | 
 | ||||||
|     SummitForm.base_fields['email'].label = 'Email address' |     SummitForm.base_fields['email'].label = 'Email address' | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | from builtins import object | ||||||
| from django.db import models | from django.db import models | ||||||
| 
 | 
 | ||||||
| class Supporter(models.Model): | class Supporter(models.Model): | ||||||
|  | @ -12,5 +13,5 @@ class Supporter(models.Model): | ||||||
|     def __unicode__(self): |     def __unicode__(self): | ||||||
|         return self.display_name |         return self.display_name | ||||||
| 
 | 
 | ||||||
|     class Meta: |     class Meta(object): | ||||||
|         ordering = ('ledger_entity_id',) |         ordering = ('ledger_entity_id',) | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | from builtins import object | ||||||
| from django.db import models | from django.db import models | ||||||
| 
 | 
 | ||||||
| class EarthLocation(models.Model): | class EarthLocation(models.Model): | ||||||
|  | @ -10,7 +11,7 @@ class EarthLocation(models.Model): | ||||||
|     date_created = models.DateTimeField(auto_now_add=True) |     date_created = models.DateTimeField(auto_now_add=True) | ||||||
|     date_last_modified = models.DateTimeField(auto_now=True) |     date_last_modified = models.DateTimeField(auto_now=True) | ||||||
| 
 | 
 | ||||||
|     class Meta: |     class Meta(object): | ||||||
|         unique_together = (("latitude", "longitude"),) |         unique_together = (("latitude", "longitude"),) | ||||||
| 
 | 
 | ||||||
|     def __unicode__(self): |     def __unicode__(self): | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| # -*- encoding: utf-8 -*- | # -*- encoding: utf-8 -*- | ||||||
| 
 | 
 | ||||||
|  | from builtins import object | ||||||
| import io | import io | ||||||
| import itertools | import itertools | ||||||
| import re | import re | ||||||
|  | @ -105,7 +106,7 @@ class BeautifulSoup(bs4.BeautifulSoup): | ||||||
|         return self.find_all(self.is_video_source, src=True) |         return self.find_all(self.is_video_source, src=True) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class SoupModelMixin: | class SoupModelMixin(object): | ||||||
|     """Mixin for models to parse HTML with BeautifulSoup. |     """Mixin for models to parse HTML with BeautifulSoup. | ||||||
| 
 | 
 | ||||||
|     Classes that use this mixin must define `SOUP_ATTRS`, a list of strings |     Classes that use this mixin must define `SOUP_ATTRS`, a list of strings | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | from builtins import object | ||||||
| from future.utils import raise_ | from future.utils import raise_ | ||||||
| from django import http | from django import http | ||||||
| from django.conf import settings | from django.conf import settings | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue