text: # -*- coding: utf-8 -*-
  from south.utils import datetime_utils as datetime
  from south.db import db
  from south.v2 import DataMigration
  from django.db import models
  
  
  def get_value(xml, expression):
      """ Busca `expression` em `xml` e retorna o resultado da primeira ocorrência.
  
      Função copiada de `journalmanager.models.Article.get_value`.
  
      Espaços em branco no início ou fim são removidos. Retorna `None` caso
      `expression` não encontre elementos, ou o elemento esteja vazio.
      """
      try:
          first_occ = xml.xpath(expression)[0]
      except IndexError:
          return None
  
      try:
          value = first_occ.text
      except AttributeError:
          # valor de atributo
          value = first_occ
  
      try:
          return value.strip()
      except AttributeError:
          return value
  
  
  class Migration(DataMigration):
  
      def forwards(self, orm):
          DOI = '/article/front/article-meta/article-id[@pub-id-type="doi"]'
          ARTICLE_TYPE = '/article/@article-type'
  
          for article in orm.Article.objects.only('xml').filter(doi=u'').iterator():
              article.doi = get_value(article.xml, DOI) or u''
              article.article_type = get_value(article.xml, ARTICLE_TYPE) or u'undefined'
  
              if article.article_type == 'correction':
                  article.articles_linkage_is_pending = True
              else:
                  article.articles_linkage_is_pending = False
  
              article.save()
  
      def backwards(self, orm):
          "Write your backwards methods here."
  
      models = {
          'auth.group': {
              'Meta': {'object_name': 'Group'},
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
              'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
          },
          'auth.permission': {
              'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
              'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
              'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
          },
          'auth.user': {
              'Meta': {'object_name': 'User'},
              'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
              'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
              'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
              'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
              'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
              'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
              'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
              'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
              'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
          },
          'contenttypes.contenttype': {
              'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
              'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
          },
          'journalmanager.aheadpressrelease': {
              'Meta': {'object_name': 'AheadPressRelease', '_ormbases': ['journalmanager.PressRelease']},
              'journal': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'press_releases'", 'to': "orm['journalmanager.Journal']"}),
              'pressrelease_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['journalmanager.PressRelease']", 'unique': 'True', 'primary_key': 'True'})
          },
          'journalmanager.article': {
              'Meta': {'object_name': 'Article'},
              'aid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}),
              'article_type': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}),
              'articles_linkage_is_pending': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'blank': 'True'}),
              'doi': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '2048', 'db_index': 'True'}),
              'domain_key': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '2048', 'db_index': 'False'}),
              'es_is_dirty': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
              'es_updated_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'is_aop': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'is_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
              'issn_epub': ('django.db.models.fields.CharField', [], {'max_length': '9', 'db_index': 'True'}),
              'issn_ppub': ('django.db.models.fields.CharField', [], {'max_length': '9', 'db_index': 'True'}),
              'issue': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'articles'", 'null': 'True', 'to': "orm['journalmanager.Issue']"}),
              'journal': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'articles'", 'null': 'True', 'to': "orm['journalmanager.Journal']"}),
              'journal_title': ('django.db.models.fields.CharField', [], {'max_length': '512', 'db_index': 'True'}),
              'related_articles': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['journalmanager.Article']", 'null': 'True', 'through': "orm['journalmanager.ArticlesLinkage']", 'blank': 'True'}),
              'updated_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'blank': 'True'}),
              'xml': ('scielomanager.custom_fields.XMLSPSField', [], {}),
              'xml_version': ('django.db.models.fields.CharField', [], {'max_length': '9'})
          },
          'journalmanager.articleslinkage': {
              'Meta': {'object_name': 'ArticlesLinkage'},
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'link_to': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'referrers'", 'to': "orm['journalmanager.Article']"}),
              'link_type': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
              'referrer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'links_to'", 'to': "orm['journalmanager.Article']"})
          },
          'journalmanager.collection': {
              'Meta': {'ordering': "['name']", 'object_name': 'Collection'},
              'acronym': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'blank': 'True'}),
              'address': ('django.db.models.fields.TextField', [], {}),
              'address_complement': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
              'address_number': ('django.db.models.fields.CharField', [], {'max_length': '8'}),
              'city': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
              'collection': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'user_collection'", 'to': "orm['auth.User']", 'through': "orm['journalmanager.UserCollections']", 'blank': 'True', 'symmetrical': 'False', 'null': 'True'}),
              'country': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
              'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
              'fax': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
              'name_slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
              'phone': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
              'state': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
              'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
              'zip_code': ('django.db.models.fields.CharField', [], {'max_length': '16', 'null': 'True', 'blank': 'True'})
          },
          'journalmanager.datachangeevent': {
              'Meta': {'object_name': 'DataChangeEvent'},
              'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
              'collection': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['journalmanager.Collection']"}),
              'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
              'event_type': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
              'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
          },
          'journalmanager.institution': {
              'Meta': {'ordering': "['name']", 'object_name': 'Institution'},
              'acronym': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '16', 'blank': 'True'}),
              'address': ('django.db.models.fields.TextField', [], {}),
              'address_complement': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
              'address_number': ('django.db.models.fields.CharField', [], {'max_length': '8'}),
              'cel': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
              'city': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
              'complement': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
              'country': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
              'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
              'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
              'fax': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'is_trashed': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '256', 'db_index': 'True'}),
              'phone': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
              'state': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
              'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
              'zip_code': ('django.db.models.fields.CharField', [], {'max_length': '16', 'null': 'True', 'blank': 'True'})
          },
          'journalmanager.issue': {
              'Meta': {'ordering': "('created', 'id')", 'object_name': 'Issue'},
              'cover': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
              'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
              'ctrl_vocabulary': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
              'editorial_standard': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'is_marked_up': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'is_trashed': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
              'journal': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['journalmanager.Journal']"}),
              'label': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '64', 'null': 'True', 'blank': 'True'}),
              'number': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
              'order': ('django.db.models.fields.IntegerField', [], {'blank': 'True'}),
              'publication_end_month': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
              'publication_start_month': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
              'publication_year': ('django.db.models.fields.IntegerField', [], {}),
              'section': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['journalmanager.Section']", 'symmetrical': 'False', 'blank': 'True'}),
              'spe_text': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
              'suppl_text': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
              'total_documents': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
              'type': ('django.db.models.fields.CharField', [], {'default': "'regular'", 'max_length': '15'}),
              'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
              'use_license': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['journalmanager.UseLicense']", 'null': 'True'}),
              'volume': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'})
          },
          'journalmanager.issuetitle': {
              'Meta': {'object_name': 'IssueTitle'},
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'issue': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['journalmanager.Issue']"}),
              'language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['journalmanager.Language']"}),
              'title': ('django.db.models.fields.CharField', [], {'max_length': '256'})
          },
          'journalmanager.journal': {
              'Meta': {'ordering': "('title', 'id')", 'object_name': 'Journal'},
              'abstract_keyword_languages': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'abstract_keyword_languages'", 'symmetrical': 'False', 'to': "orm['journalmanager.Language']"}),
              'acronym': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
              'collections': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['journalmanager.Collection']", 'through': "orm['journalmanager.Membership']", 'symmetrical': 'False'}),
              'copyrighter': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
              'cover': ('scielomanager.custom_fields.ContentTypeRestrictedFileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
              'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
              'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'enjoy_creator'", 'to': "orm['auth.User']"}),
              'ctrl_vocabulary': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
              'current_ahead_documents': ('django.db.models.fields.IntegerField', [], {'default': '0', 'max_length': '3', 'null': 'True', 'blank': 'True'}),
              'editor': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'editor_journal'", 'null': 'True', 'to': "orm['auth.User']"}),
              'editor_address': ('django.db.models.fields.CharField', [], {'max_length': '512'}),
              'editor_address_city': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
              'editor_address_country': ('scielo_extensions.modelfields.CountryField', [], {'max_length': '2'}),
              'editor_address_state': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
              'editor_address_zip': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
              'editor_email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
              'editor_name': ('django.db.models.fields.CharField', [], {'max_length': '512'}),
              'editor_phone1': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
              'editor_phone2': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
              'editorial_standard': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
              'eletronic_issn': ('django.db.models.fields.CharField', [], {'max_length': '9', 'db_index': 'True'}),
              'final_num': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
              'final_vol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}),
              'final_year': ('django.db.models.fields.CharField', [], {'max_length': '4', 'null': 'True', 'blank': 'True'}),
              'frequency': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'index_coverage': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
              'init_num': ('django.db.models.fields.CharField', [], {'max_length': '16', 'null': 'True', 'blank': 'True'}),
              'init_vol': ('django.db.models.fields.CharField', [], {'max_length': '16', 'null': 'True', 'blank': 'True'}),
              'init_year': ('django.db.models.fields.CharField', [], {'max_length': '4'}),
              'is_indexed_aehci': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'is_indexed_scie': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'is_indexed_ssci': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'is_trashed': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
              'languages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['journalmanager.Language']", 'symmetrical': 'False'}),
              'logo': ('scielomanager.custom_fields.ContentTypeRestrictedFileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
              'medline_code': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
              'medline_title': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
              'national_code': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
              'notes': ('django.db.models.fields.TextField', [], {'max_length': '254', 'null': 'True', 'blank': 'True'}),
              'other_previous_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
              'previous_ahead_documents': ('django.db.models.fields.IntegerField', [], {'default': '0', 'max_length': '3', 'null': 'True', 'blank': 'True'}),
              'previous_title': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'prev_title'", 'null': 'True', 'to': "orm['journalmanager.Journal']"}),
              'print_issn': ('django.db.models.fields.CharField', [], {'max_length': '9', 'db_index': 'True'}),
              'pub_level': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
              'publication_city': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
              'publisher_country': ('scielo_extensions.modelfields.CountryField', [], {'max_length': '2'}),
              'publisher_name': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
              'publisher_state': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
              'scielo_issn': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
              'secs_code': ('django.db.models.fields.CharField', [], {'max_length': '64', 'blank': 'True'}),
              'short_title': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'db_index': 'True'}),
              'sponsor': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'journal_sponsor'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['journalmanager.Sponsor']"}),
              'study_areas': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'journals_migration_tmp'", 'null': 'True', 'to': "orm['journalmanager.StudyArea']"}),
              'subject_categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'journals'", 'null': 'True', 'to': "orm['journalmanager.SubjectCategory']"}),
              'subject_descriptors': ('django.db.models.fields.CharField', [], {'max_length': '1024'}),
              'title': ('django.db.models.fields.CharField', [], {'max_length': '256', 'db_index': 'True'}),
              'title_iso': ('django.db.models.fields.CharField', [], {'max_length': '256', 'db_index': 'True'}),
              'twitter_user': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
              'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
              'url_journal': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
              'url_online_submission': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
              'use_license': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['journalmanager.UseLicense']"})
          },
          'journalmanager.journalmission': {
              'Meta': {'object_name': 'JournalMission'},
              'description': ('django.db.models.fields.TextField', [], {}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'journal': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'missions'", 'to': "orm['journalmanager.Journal']"}),
              'language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['journalmanager.Language']", 'null': 'True'})
          },
          'journalmanager.journaltimeline': {
              'Meta': {'object_name': 'JournalTimeline'},
              'collection': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['journalmanager.Collection']"}),
              'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'journal': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['journalmanager.Journal']"}),
              'reason': ('django.db.models.fields.TextField', [], {'default': "''"}),
              'since': ('django.db.models.fields.DateTimeField', [], {}),
              'status': ('django.db.models.fields.CharField', [], {'max_length': '16'})
          },
          'journalmanager.journaltitle': {
              'Meta': {'object_name': 'JournalTitle'},
              'category': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'journal': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'other_titles'", 'to': "orm['journalmanager.Journal']"}),
              'title': ('django.db.models.fields.CharField', [], {'max_length': '128'})
          },
          'journalmanager.language': {
              'Meta': {'ordering': "['name']", 'object_name': 'Language'},
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'iso_code': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '64'})
          },
          'journalmanager.membership': {
              'Meta': {'unique_together': "(('journal', 'collection'),)", 'object_name': 'Membership'},
              'collection': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['journalmanager.Collection']"}),
              'created_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'journal': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['journalmanager.Journal']"}),
              'reason': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
              'since': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
              'status': ('django.db.models.fields.CharField', [], {'default': "'inprogress'", 'max_length': '16'})
          },
          'journalmanager.pendedform': {
              'Meta': {'object_name': 'PendedForm'},
              'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
              'form_hash': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pending_forms'", 'to': "orm['auth.User']"}),
              'view_name': ('django.db.models.fields.CharField', [], {'max_length': '128'})
          },
          'journalmanager.pendedvalue': {
              'Meta': {'object_name': 'PendedValue'},
              'form': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'data'", 'to': "orm['journalmanager.PendedForm']"}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
              'value': ('django.db.models.fields.TextField', [], {})
          },
          'journalmanager.pressrelease': {
              'Meta': {'object_name': 'PressRelease'},
              'doi': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
          },
          'journalmanager.pressreleasearticle': {
              'Meta': {'object_name': 'PressReleaseArticle'},
              'article_pid': ('django.db.models.fields.CharField', [], {'max_length': '32', 'db_index': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'press_release': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'articles'", 'to': "orm['journalmanager.PressRelease']"})
          },
          'journalmanager.pressreleasetranslation': {
              'Meta': {'object_name': 'PressReleaseTranslation'},
              'content': ('django.db.models.fields.TextField', [], {}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['journalmanager.Language']"}),
              'press_release': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'translations'", 'to': "orm['journalmanager.PressRelease']"}),
              'title': ('django.db.models.fields.CharField', [], {'max_length': '128'})
          },
          'journalmanager.regularpressrelease': {
              'Meta': {'object_name': 'RegularPressRelease', '_ormbases': ['journalmanager.PressRelease']},
              'issue': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'press_releases'", 'to': "orm['journalmanager.Issue']"}),
              'pressrelease_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['journalmanager.PressRelease']", 'unique': 'True', 'primary_key': 'True'})
          },
          'journalmanager.section': {
              'Meta': {'ordering': "('id',)", 'object_name': 'Section'},
              'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '21', 'blank': 'True'}),
              'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'is_trashed': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
              'journal': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['journalmanager.Journal']"}),
              'legacy_code': ('django.db.models.fields.CharField', [], {'max_length': '16', 'null': 'True', 'blank': 'True'}),
              'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
          },
          'journalmanager.sectiontitle': {
              'Meta': {'ordering': "['title']", 'object_name': 'SectionTitle'},
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'language': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['journalmanager.Language']"}),
              'section': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'titles'", 'to': "orm['journalmanager.Section']"}),
              'title': ('django.db.models.fields.CharField', [], {'max_length': '256'})
          },
          'journalmanager.sponsor': {
              'Meta': {'ordering': "['name']", 'object_name': 'Sponsor', '_ormbases': ['journalmanager.Institution']},
              'collections': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['journalmanager.Collection']", 'symmetrical': 'False'}),
              'institution_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['journalmanager.Institution']", 'unique': 'True', 'primary_key': 'True'})
          },
          'journalmanager.studyarea': {
              'Meta': {'object_name': 'StudyArea'},
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'study_area': ('django.db.models.fields.CharField', [], {'max_length': '256'})
          },
          'journalmanager.subjectcategory': {
              'Meta': {'object_name': 'SubjectCategory'},
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'term': ('django.db.models.fields.CharField', [], {'max_length': '256', 'db_index': 'True'})
          },
          'journalmanager.translateddata': {
              'Meta': {'object_name': 'TranslatedData'},
              'field': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'language': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
              'model': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
              'translation': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'})
          },
          'journalmanager.uselicense': {
              'Meta': {'ordering': "['license_code']", 'object_name': 'UseLicense'},
              'disclaimer': ('django.db.models.fields.TextField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'is_default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'license_code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '64'}),
              'reference_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'})
          },
          'journalmanager.usercollections': {
              'Meta': {'unique_together': "(('user', 'collection'),)", 'object_name': 'UserCollections'},
              'collection': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['journalmanager.Collection']"}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'is_default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'is_manager': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
              'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
          },
          'journalmanager.userprofile': {
              'Meta': {'object_name': 'UserProfile'},
              'email_notifications': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
              'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
              'tz': ('django.db.models.fields.CharField', [], {'default': "'America/Sao_Paulo'", 'max_length': '150'}),
              'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
          }
      }
  
      complete_apps = ['journalmanager']
      symmetrical = True
  