This requires Django to work.
"""
+from __future__ import unicode_literals
import collections
from django.db import models
+from django.utils.encoding import python_2_unicode_compatible
def is_ax_visible(field):
# ========================
+@python_2_unicode_compatible
class Skin(models.Model):
#id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=96)
skin_tpl = models.CharField(max_length=96)
ext = models.CharField(max_length=9)
class Meta:
- db_table = u'skins'
+ db_table = 'skins'
- def __unicode__(self):
+ def __str__(self):
return self.name
+@python_2_unicode_compatible
class EmailVirtualDomain(models.Model):
#id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=765)
aliasing = models.ForeignKey('self', db_column='aliasing')
class Meta:
- db_table = u'email_virtual_domains'
+ db_table = 'email_virtual_domains'
- def __unicode__(self):
+ def __str__(self):
return self.name
+@python_2_unicode_compatible
class ProfileSectionEnum(models.Model):
#id = models.IntegerField(primary_key=True)
text = models.CharField(max_length=150, unique=True)
class Meta:
- db_table = u'profile_section_enum'
+ db_table = 'profile_section_enum'
- def __unicode__(self):
+ def __str__(self):
return self.text
+@python_2_unicode_compatible
class GeolocCountry(models.Model):
iso_3166_1_a2 = models.CharField(max_length=6, primary_key=True)
iso_3166_1_a3 = models.CharField(max_length=9, unique=True)
belongsto = models.ForeignKey('self', null=True, db_column='belongsTo', blank=True) # Field name made lowercase.
countryplain = models.CharField(max_length=765, db_column='countryPlain', blank=True) # Field name made lowercase.
class Meta:
- db_table = u'geoloc_countries'
+ db_table = 'geoloc_countries'
- def __unicode__(self):
+ def __str__(self):
return self.iso_3166_1_a2
# ===============
+@python_2_unicode_compatible
class AccountType(models.Model):
type = models.CharField(max_length=48, primary_key=True)
perms = models.CharField(max_length=321)
description = models.TextField(blank=True)
class Meta:
- db_table = u'account_types'
+ db_table = 'account_types'
- def __unicode__(self):
+ def __str__(self):
return self.type
+@python_2_unicode_compatible
class Account(models.Model):
uid = models.AutoField(primary_key=True)
hruid = models.CharField(max_length=255, unique=True)
from_email = models.CharField(max_length=765)
from_format = models.CharField(max_length=12)
class Meta:
- db_table = u'accounts'
+ db_table = 'accounts'
- def __unicode__(self):
- return u'%s (%s)' % (self.hruid, self.full_name)
+ def __str__(self):
+ return '%s (%s)' % (self.hruid, self.full_name)
@property
def profile(self):
return self.profiles.filter(perms='owner').get().profile
+@python_2_unicode_compatible
class ProfileAlias(object):
def __init__(self, alias_of, kind, lastname, firstname=None):
self.alias_of = alias_of
def get_kind_display(self):
if self.kind == self.ALT_MARITAL:
if self.female:
- return u"Mme"
+ return "Mme"
else:
- return u"M."
+ return "M."
elif self.kind == self.ALT_PSEUDO:
- return u"Pseudonyme"
+ return "Pseudonyme"
else:
- return u""
+ return ""
def __getattr__(self, attr):
return getattr(self.alias_of, attr)
return '<ProfileAlias %s of %r>' % (self.kind, self.alias_of)
+@python_2_unicode_compatible
class Profile(models.Model):
alias_of = None
title = models.CharField(max_length=12)
class Meta:
- db_table = u'profiles'
+ db_table = 'profiles'
- def __unicode__(self):
+ def __str__(self):
return self.hrpid
@property
def country_name(self):
nat = self.nationality
if nat is None:
- return u"France"
+ return "France"
return nat.country
@property
return jobs
+@python_2_unicode_compatible
class AccountProfile(models.Model):
account = models.ForeignKey(Account, db_column='uid', related_name='profiles')
profile = models.ForeignKey(Profile, db_column='pid', related_name='accounts')
pkey = models.CompositeField(account, profile, primary_key=True)
perms = models.CharField(max_length=15)
class Meta:
- db_table = u'account_profiles'
+ db_table = 'account_profiles'
- def __unicode__(self):
- return u'%s -> %s' % (self.account.hruid, self.profile.hrpid)
+ def __str__(self):
+ return '%s -> %s' % (self.account.hruid, self.profile.hrpid)
# Account-related
# ===============
+@python_2_unicode_compatible
class AccountAuthOpenid(models.Model):
#id = models.IntegerField(primary_key=True)
account = models.ForeignKey(Account, unique=True, null=True, db_column='uid', blank=True)
url = models.CharField(max_length=255, unique=True)
class Meta:
- db_table = u'account_auth_openid'
+ db_table = 'account_auth_openid'
- def __unicode__(self):
- return u"%s at %s" % (self.account, self.url)
+ def __str__(self):
+ return "%s at %s" % (self.account, self.url)
+@python_2_unicode_compatible
class AccountLostPassword(models.Model):
certificat = models.CharField(max_length=96, primary_key=True)
account = models.ForeignKey(Account, null=True, db_column='uid', blank=True)
created = models.DateTimeField(null=True, blank=True)
class Meta:
- db_table = u'account_lost_passwords'
+ db_table = 'account_lost_passwords'
- def __unicode__(self):
- return u"%s on %s" % (self.account.hruid, self.created)
+ def __str__(self):
+ return "%s on %s" % (self.account.hruid, self.created)
+@python_2_unicode_compatible
class AccountXnetLostPassword(models.Model):
account = models.ForeignKey(Account, primary_key=True, db_column='uid')
date = models.DateTimeField(null=True, blank=True)
hash = models.CharField(max_length=96)
class Meta:
- db_table = u'account_xnet_lost_passwords'
+ db_table = 'account_xnet_lost_passwords'
- def __unicode__(self):
- return u"%s on %s" % (self.account.hruid, self.date)
+ def __str__(self):
+ return "%s on %s" % (self.account.hruid, self.date)
# Announces
# =========
+@python_2_unicode_compatible
class Announce(models.Model):
#id = models.IntegerField(primary_key=True)
account = models.ForeignKey(Account, null=True, db_column='uid', blank=True)
post_id = models.IntegerField(null=True, blank=True, editable=False,
help_text=u"NNTP post identifier")
class Meta:
- db_table = u'announces'
+ db_table = 'announces'
- def __unicode__(self):
- return u"%s: %s" % (self.id, self.titre)
+ def __str__(self):
+ return "%s: %s" % (self.id, self.titre)
+@python_2_unicode_compatible
class AnnouncePhoto(models.Model):
eid = models.ForeignKey(Announce, primary_key=True, db_column='eid')
attachmime = models.CharField(max_length=12)
x = models.IntegerField()
y = models.IntegerField()
class Meta:
- db_table = u'announce_photos'
+ db_table = 'announce_photos'
- def __unicode__(self):
- return u"%s (%s, %d x %d)" % (self.eid, self.attachmime, self.x, self.y)
+ def __str__(self):
+ return "%s (%s, %d x %d)" % (self.eid, self.attachmime, self.x, self.y)
+@python_2_unicode_compatible
class AnnounceRead(models.Model):
evt = models.ForeignKey(Announce)
account = models.ForeignKey(Account, db_column='uid')
pkey = models.CompositeField(evt, account, primary_key=True)
class Meta:
- db_table = u'announce_read'
+ db_table = 'announce_read'
- def __unicode__(self):
- return u"%s: %s" % (self.account, self.evt)
+ def __str__(self):
+ return "%s: %s" % (self.account, self.evt)
# Email routing
# =============
+@python_2_unicode_compatible
class EmailVirtual(models.Model):
email = models.CharField(max_length=255)
domain = models.ForeignKey(EmailVirtualDomain, db_column='domain')
type = models.CharField(max_length=21, blank=True)
expire = models.DateField()
class Meta:
- db_table = u'email_virtual'
+ db_table = 'email_virtual'
- def __unicode__(self):
- return u"%s@%s (%s)" % (self.email, self.domain, self.type)
+ def __str__(self):
+ return "%s@%s (%s)" % (self.email, self.domain, self.type)
+@python_2_unicode_compatible
class EmailRedirectAccount(models.Model):
account = models.ForeignKey(Account, db_column='uid')
redirect = models.CharField(max_length=765)
hash = models.CharField(max_length=96, blank=True)
allow_rewrite = models.BooleanField()
class Meta:
- db_table = u'email_redirect_account'
+ db_table = 'email_redirect_account'
- def __unicode__(self):
- return u"%s for %s (%s)" % (self.redirect, self.account.hruid, self.type)
+ def __str__(self):
+ return "%s for %s (%s)" % (self.redirect, self.account.hruid, self.type)
+@python_2_unicode_compatible
class EmailSourceAccount(models.Model):
email = models.CharField(max_length=255)
domain = models.ForeignKey(EmailVirtualDomain, db_column='domain')
flags = models.CharField(max_length=69)
expire = models.DateField(null=True, blank=True)
class Meta:
- db_table = u'email_source_account'
+ db_table = 'email_source_account'
- def __unicode__(self):
- return u"%s@%s (%s)" % (self.email, self.domain, self.type)
+ def __str__(self):
+ return "%s@%s (%s)" % (self.email, self.domain, self.type)
+@python_2_unicode_compatible
class EmailSourceOther(models.Model):
email = models.CharField(max_length=255)
domain = models.ForeignKey(EmailVirtualDomain, db_column='domain')
type = models.CharField(max_length=24, blank=True)
expire = models.DateField(null=True, blank=True)
class Meta:
- db_table = u'email_source_other'
+ db_table = 'email_source_other'
- def __unicode__(self):
- return u"%s@%s (%s)" % (self.email, self.domain, self.type)
+ def __str__(self):
+ return "%s@%s (%s)" % (self.email, self.domain, self.type)
+@python_2_unicode_compatible
class EmailRedirectOther(models.Model):
hrmid = models.ForeignKey(EmailSourceOther, db_column='hrmid')
redirect = models.CharField(max_length=765)
type = models.CharField(max_length=30)
action = models.CharField(max_length=54)
class Meta:
- db_table = u'email_redirect_other'
+ db_table = 'email_redirect_other'
- def __unicode__(self):
- return u"%s -> %s (%s)" % (self.hrmid, self.redirect, self.type)
+ def __str__(self):
+ return "%s -> %s (%s)" % (self.hrmid, self.redirect, self.type)
# innd-related
# ============
+@python_2_unicode_compatible
class InndForum(models.Model):
"""ACLs for innd"""
id_innd = models.AutoField(primary_key=True)
priority = models.IntegerField(null=True, blank=True)
comment = models.TextField(blank=True)
class Meta:
- db_table = u'forum_innd'
+ db_table = 'forum_innd'
- def __unicode__(self):
+ def __str__(self):
return "%d: %s" % (self.id_innd, self.account.hruid)
+@python_2_unicode_compatible
class ForumProfile(models.Model):
account = models.ForeignKey(Account, primary_key=True, db_column='uid')
name = models.CharField(max_length=192)
tree_read = models.CharField(max_length=24)
last_seen = models.DateTimeField()
class Meta:
- db_table = u'forum_profiles'
+ db_table = 'forum_profiles'
- def __unicode__(self):
- return u"%s: %s" % (self.account.hruid, self.name)
+ def __str__(self):
+ return "%s: %s" % (self.account.hruid, self.name)
+@python_2_unicode_compatible
class Forum(models.Model):
fid = models.IntegerField(primary_key=True)
name = models.CharField(max_length=192)
class Meta:
- db_table = u'forums'
+ db_table = 'forums'
- def __unicode__(self):
+ def __str__(self):
return self.name
+@python_2_unicode_compatible
class ForumSubs(models.Model):
forum = models.ForeignKey(Forum, db_column='fid')
account = models.ForeignKey(Account, db_column='uid')
pkey = models.CompositeField(forum, account, primary_key=True)
class Meta:
- db_table = u'forum_subs'
+ db_table = 'forum_subs'
- def __unicode__(self):
- return u"%s by %s" % (self.forum.name, self.account.hruid)
+ def __str__(self):
+ return "%s by %s" % (self.forum.name, self.account.hruid)
# Payments
# ========
+@python_2_unicode_compatible
class PaymentBankAccount(models.Model):
#id = models.IntegerField(primary_key=True)
asso = models.ForeignKey('Group', blank=True, null=True)
status = models.CharField(max_length=36)
bic = models.CharField(max_length=11)
class Meta:
- db_table = u'payment_bankaccounts'
+ db_table = 'payment_bankaccounts'
- def __unicode__(self):
- return u'%s: %s' % (self.asso.name, self.account)
+ def __str__(self):
+ return '%s: %s' % (self.asso.name, self.account)
+@python_2_unicode_compatible
class Payment(models.Model):
#id = models.IntegerField(primary_key=True)
text = models.CharField(max_length=765)
asso = models.ForeignKey('Group', null=True, blank=True)
rib = models.ForeignKey(PaymentBankAccount)
class Meta:
- db_table = u'payments'
+ db_table = 'payments'
- def __unicode__(self):
- return u"%s: %s" % (self.id, self.text)
+ def __str__(self):
+ return "%s: %s" % (self.id, self.text)
+@python_2_unicode_compatible
class PaymentCodeC(models.Model):
id = models.IntegerField(primary_key=True)
text = models.CharField(max_length=192)
class Meta:
- db_table = u'payment_codeC'
+ db_table = 'payment_codeC'
- def __unicode__(self):
+ def __str__(self):
return self.text
+@python_2_unicode_compatible
class PaymentCodeRCB(models.Model):
id = models.IntegerField(primary_key=True)
text = models.CharField(max_length=192)
codec = models.IntegerField(db_column='codeC') # Field name made lowercase.
class Meta:
- db_table = u'payment_codeRCB'
+ db_table = 'payment_codeRCB'
- def __unicode__(self):
+ def __str__(self):
return self.text
+@python_2_unicode_compatible
class PaymentMethod(models.Model):
id = models.IntegerField(primary_key=True)
text = models.CharField(max_length=96)
short_name = models.CharField(max_length=30)
flags = models.CharField(max_length=36, blank=True)
class Meta:
- db_table = u'payment_methods'
+ db_table = 'payment_methods'
- def __unicode__(self):
+ def __str__(self):
return self.short_name
+@python_2_unicode_compatible
class PaymentReconcilation(models.Model):
#id = models.IntegerField(primary_key=True)
method = models.ForeignKey(PaymentMethod)
comments = models.TextField()
recongroup_id = models.IntegerField(null=True, blank=True)
class Meta:
- db_table = u'payment_reconcilations'
+ db_table = 'payment_reconcilations'
- def __unicode__(self):
- return u"%s: %s" % (self.method, self.status)
+ def __str__(self):
+ return "%s: %s" % (self.method, self.status)
+@python_2_unicode_compatible
class PaymentTransaction(models.Model):
id = models.CharField(max_length=192, primary_key=True)
method = models.ForeignKey(PaymentMethod, null=True, blank=True)
recon = models.ForeignKey(PaymentReconcilation, null=True, blank=True)
display = models.IntegerField()
class Meta:
- db_table = u'payment_transactions'
+ db_table = 'payment_transactions'
- def __unicode__(self):
- return u"%s (%s)" % (self.fullref, self.ref)
+ def __str__(self):
+ return "%s (%s)" % (self.fullref, self.ref)
+@python_2_unicode_compatible
class PaymentTransfer(models.Model):
#id = models.IntegerField(primary_key=True)
recongroup_id = models.IntegerField()
message = models.CharField(max_length=765)
date = models.DateField(null=True, blank=True)
class Meta:
- db_table = u'payment_transfers'
+ db_table = 'payment_transfers'
- def __unicode__(self):
- return u"%s: %s" % (self.id, self.amount)
+ def __str__(self):
+ return "%s: %s" % (self.id, self.amount)
# Groups
# ======
+@python_2_unicode_compatible
class GroupDom(models.Model):
#id = models.IntegerField(primary_key=True)
name = models.TextField(db_column='nom')
cat = models.CharField(max_length=117)
class Meta:
- db_table = u'group_dom'
+ db_table = 'group_dom'
- def __unicode__(self):
- return u"%s :: %s" % (self.cat, self.name)
+ def __str__(self):
+ return "%s :: %s" % (self.cat, self.name)
+@python_2_unicode_compatible
class Group(models.Model):
#id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=765, db_column='nom')
disable_mails = models.BooleanField()
status = models.CharField(max_length=117)
class Meta:
- db_table = u'groups'
+ db_table = 'groups'
- def __unicode__(self):
+ def __str__(self):
return self.name
# -----------------
+@python_2_unicode_compatible
class GroupMember(models.Model):
asso = models.ForeignKey(Group)
account = models.ForeignKey(Account, db_column='uid')
position = models.CharField(max_length=54, blank=True)
flags = models.CharField(max_length=18)
class Meta:
- db_table = u'group_members'
+ db_table = 'group_members'
- def __unicode__(self):
- return u"%s to %s" % (self.account.hruid, self.asso.name)
+ def __str__(self):
+ return "%s to %s" % (self.account.hruid, self.asso.name)
+@python_2_unicode_compatible
class GroupMemberSubRequest(models.Model):
asso = models.ForeignKey(Group)
account = models.ForeignKey(Account, db_column='uid')
ts = models.DateTimeField()
reason = models.TextField(blank=True)
class Meta:
- db_table = u'group_member_sub_requests'
+ db_table = 'group_member_sub_requests'
- def __unicode__(self):
- return u"%s to %s" % (self.account.hruid, self.asso.name)
+ def __str__(self):
+ return "%s to %s" % (self.account.hruid, self.asso.name)
+@python_2_unicode_compatible
class GroupFormerMember(models.Model):
asso = models.ForeignKey(Group)
account = models.ForeignKey(Account, db_column='uid')
remember = models.IntegerField()
unsubsciption_date = models.DateField()
class Meta:
- db_table = u'group_former_members'
+ db_table = 'group_former_members'
- def __unicode__(self):
- return u"%s to %s" % (self.account.hruid, self.asso.name)
+ def __str__(self):
+ return "%s to %s" % (self.account.hruid, self.asso.name)
# Group::Announces
# ----------------
+@python_2_unicode_compatible
class GroupAnnounce(models.Model):
#id = models.IntegerField(primary_key=True)
account = models.ForeignKey(Account, null=True, db_column='uid', blank=True)
post_id = models.IntegerField(null=True, blank=True,
help_text=u"NNTP post ID")
class Meta:
- db_table = u'group_announces'
+ db_table = 'group_announces'
- def __unicode__(self):
- return u"%s: %s" % (self.asso.name, self.titre)
+ def __str__(self):
+ return "%s: %s" % (self.asso.name, self.titre)
+@python_2_unicode_compatible
class GroupAnnouncePhoto(models.Model):
eid = models.ForeignKey(GroupAnnounce, primary_key=True, db_column='eid')
attachmime = models.CharField(max_length=12)
x = models.IntegerField()
y = models.IntegerField()
class Meta:
- db_table = u'group_announces_photo'
+ db_table = 'group_announces_photo'
- def __unicode__(self):
- return u"%s (%s, %d x %d)" % (self.eid, self.attachmime, self.x, self.y)
+ def __str__(self):
+ return "%s (%s, %d x %d)" % (self.eid, self.attachmime, self.x, self.y)
+@python_2_unicode_compatible
class GroupAnnounceRead(models.Model):
announce = models.ForeignKey(GroupAnnounce)
account = models.ForeignKey(Account, db_column='uid')
pkey = models.CompositeField(announce, account, primary_key=True)
class Meta:
- db_table = u'group_announces_read'
+ db_table = 'group_announces_read'
- def __unicode__(self):
- return u"%s: %s" % (self.account.hruid, self.announce_id)
+ def __str__(self):
+ return "%s: %s" % (self.account.hruid, self.announce_id)
# Group::Event
# ------------
+@python_2_unicode_compatible
class GroupEvent(models.Model):
eid = models.IntegerField(primary_key=True)
asso = models.ForeignKey(Group, null=True, blank=True)
archive = models.BooleanField()
subscription_notification = models.CharField(max_length=24)
class Meta:
- db_table = u'group_events'
+ db_table = 'group_events'
- def __unicode__(self):
- return u"%s: %s" % (self.asso.name, self.intitule)
+ def __str__(self):
+ return "%s: %s" % (self.asso.name, self.intitule)
+@python_2_unicode_compatible
class GroupEventItem(models.Model):
event = models.ForeignKey(GroupEvent, db_column='eid')
item_id = models.IntegerField()
details = models.TextField()
montant = models.DecimalField(max_digits=12, decimal_places=2)
class Meta:
- db_table = u'group_event_items'
+ db_table = 'group_event_items'
- def __unicode__(self):
- return u"%s - %s" % (self.event, self.item_id)
+ def __str__(self):
+ return "%s - %s" % (self.event, self.item_id)
+@python_2_unicode_compatible
class GroupEventParticipant(models.Model):
event = models.ForeignKey(GroupEvent, db_column='eid')
item_id = models.IntegerField()
flags = models.CharField(max_length=42)
paid = models.FloatField()
class Meta:
- db_table = u'group_event_participants'
+ db_table = 'group_event_participants'
- def __unicode__(self):
- return u"%s to %s" % (self.account.hruid, self.item)
+ def __str__(self):
+ return "%s to %s" % (self.account.hruid, self.item)
# Group::misc
# -----------
+@python_2_unicode_compatible
class GroupAuth(models.Model):
#id = models.IntegerField(primary_key=True)
privkey = models.CharField(max_length=120, unique=True)
group = models.ForeignKey(Group, null=True, blank=True)
flags = models.CharField(max_length=63, blank=True)
class Meta:
- db_table = u'group_auth'
+ db_table = 'group_auth'
- def __unicode__(self):
+ def __str__(self):
return self.name
# =======
+@python_2_unicode_compatible
class IpWatch(models.Model):
state = models.CharField(max_length=27)
detection = models.DateField(null=True, blank=True)
ip = models.IntegerField(primary_key=True)
mask = models.IntegerField()
class Meta:
- db_table = u'ip_watch'
+ db_table = 'ip_watch'
- def __unicode__(self):
+ def __str__(self):
return self.ip
+@python_2_unicode_compatible
class LogAction(models.Model):
#id = models.IntegerField(primary_key=True)
text = models.CharField(max_length=96)
description = models.CharField(max_length=765)
class Meta:
- db_table = u'log_actions'
+ db_table = 'log_actions'
- def __unicode__(self):
+ def __str__(self):
return self.text
+@python_2_unicode_compatible
class LogSession(models.Model):
#id = models.IntegerField(primary_key=True)
auth = models.CharField(max_length=18)
ip = models.IntegerField()
forward_ip = models.IntegerField(null=True, blank=True)
class Meta:
- db_table = u'log_sessions'
+ db_table = 'log_sessions'
- def __unicode__(self):
- return u"%s: %s@%s" % (self.id, self.account.hruid, self.host)
+ def __str__(self):
+ return "%s: %s@%s" % (self.id, self.account.hruid, self.host)
+@python_2_unicode_compatible
class LogLastSession(models.Model):
account = models.ForeignKey(Account, primary_key=True, db_column='uid')
id = models.ForeignKey(LogSession, db_column='id')
class Meta:
- db_table = u'log_last_sessions'
+ db_table = 'log_last_sessions'
- def __unicode__(self):
+ def __str__(self):
return self.account.hruid
+@python_2_unicode_compatible
class LogEvent(models.Model):
stamp = models.DateTimeField(primary_key=True)
session = models.ForeignKey(LogSession, db_column='session')
action = models.ForeignKey(LogAction, db_column='action')
data = models.TextField(blank=True)
class Meta:
- db_table = u'log_events'
+ db_table = 'log_events'
- def __unicode__(self):
- return u"%s@%s: %s" % (self.session_id, self.stamp, self.action.text)
+ def __str__(self):
+ return "%s@%s: %s" % (self.session_id, self.stamp, self.action.text)
# Newsletters
# ===========
+@python_2_unicode_compatible
class Newsletter(models.Model):
#id = models.IntegerField(primary_key=True)
group = models.ForeignKey(Group, unique=True)
name = models.CharField(max_length=765)
criteria = models.CharField(max_length=42, blank=True)
class Meta:
- db_table = u'newsletters'
+ db_table = 'newsletters'
- def __unicode__(self):
+ def __str__(self):
return self.name
+@python_2_unicode_compatible
class NewsletterIssue(models.Model):
nlid = models.ForeignKey(Newsletter, unique=True, db_column='nlid')
#id = models.IntegerField(primary_key=True)
unsubscribe = models.IntegerField()
reply_to = models.CharField(max_length=765)
class Meta:
- db_table = u'newsletter_issues'
+ db_table = 'newsletter_issues'
- def __unicode__(self):
+ def __str__(self):
return self.title
+@python_2_unicode_compatible
class NewsletterCat(models.Model):
cid = models.AutoField(primary_key=True)
nlid = models.ForeignKey(Newsletter, db_column='nlid')
pos = models.IntegerField()
title = models.CharField(max_length=384)
class Meta:
- db_table = u'newsletter_cat'
+ db_table = 'newsletter_cat'
- def __unicode__(self):
+ def __str__(self):
return self.title
+@python_2_unicode_compatible
class NewsletterArt(models.Model):
issue = models.ForeignKey(NewsletterIssue, db_column='id')
aid = models.IntegerField()
body = models.TextField()
append = models.TextField()
class Meta:
- db_table = u'newsletter_art'
+ db_table = 'newsletter_art'
- def __unicode__(self):
- return u"%s: %s" % (self.issue_id, self.title)
+ def __str__(self):
+ return "%s: %s" % (self.issue_id, self.title)
+@python_2_unicode_compatible
class NewsletterIns(models.Model):
account = models.ForeignKey(Account, db_column='uid')
nl = models.ForeignKey(Newsletter, db_column='nlid')
last = models.ForeignKey(NewsletterIssue, null=True, db_column='last', blank=True)
hash = models.CharField(max_length=96, blank=True)
class Meta:
- db_table = u'newsletter_ins'
+ db_table = 'newsletter_ins'
- def __unicode__(self):
- return u"%s to %s" % (self.account.hruid, self.nl.title)
+ def __str__(self):
+ return "%s to %s" % (self.account.hruid, self.nl.title)
# Profile
# =======
+@python_2_unicode_compatible
class ProfileDisplay(models.Model):
profile = models.OneToOneField(Profile, primary_key=True, db_column='pid')
yourself = models.CharField(max_length=765)
sort_name = models.CharField(max_length=765)
promo = models.CharField(max_length=765)
class Meta:
- db_table = u'profile_display'
+ db_table = 'profile_display'
- def __unicode__(self):
+ def __str__(self):
return self.profile.hrpid
+@python_2_unicode_compatible
class ProfilePhone(models.Model):
LINK_ADDRESS = 'address'
LINK_PRO = 'pro'
comment = models.CharField(max_length=240)
class Meta:
- db_table = u'profile_phones'
+ db_table = 'profile_phones'
- def __unicode__(self):
- return u"%s: %s (%s)" % (self.profile.hrpid, self.display_tel, self.tel_type)
+ def __str__(self):
+ return "%s: %s (%s)" % (self.profile.hrpid, self.display_tel, self.tel_type)
@property
def is_address(self):
return is_ax_visible(self.pub)
+@python_2_unicode_compatible
class ProfilePhoto(models.Model):
profile = models.OneToOneField(Profile, primary_key=True, db_column='pid', related_name='photo')
attachmime = models.CharField(max_length=12)
pub = models.CharField(max_length=21)
last_update = models.DateTimeField()
class Meta:
- db_table = u'profile_photos'
+ db_table = 'profile_photos'
- def __unicode__(self):
+ def __str__(self):
return self.profile.hrpid
+@python_2_unicode_compatible
class ProfilePrivateName(models.Model):
profile = models.ForeignKey(Profile, db_column='pid', related_name='private_name')
type = models.CharField(max_length=27)
pkey = models.CompositeField(profile, type, id, primary_key=True)
name = models.CharField(max_length=765)
class Meta:
- db_table = u'profile_private_names'
+ db_table = 'profile_private_names'
- def __unicode__(self):
- return u"%s: %s" % (self.profile.hrpid, self.type)
+ def __str__(self):
+ return "%s: %s" % (self.profile.hrpid, self.type)
+@python_2_unicode_compatible
class ProfilePublicName(models.Model):
profile = models.OneToOneField(Profile, primary_key=True, db_column='pid', related_name='public_name')
lastname_initial = models.CharField(max_length=765)
firstname_ordinary = models.CharField(max_length=765)
pseudonym = models.CharField(max_length=765)
class Meta:
- db_table = u'profile_public_names'
+ db_table = 'profile_public_names'
- def __unicode__(self):
+ def __str__(self):
return self.profile.hrpid
# ------------------
+@python_2_unicode_compatible
class ProfileAddress(models.Model):
KIND_HOME = 'home'
through='ProfileAddressComponent', related_name='addresses')
class Meta:
- db_table = u'profile_addresses'
+ db_table = 'profile_addresses'
- def __unicode__(self):
+ def __str__(self):
if self.addr_type == self.KIND_HOME:
rel = self.profile.hrpid
elif self.addr_type == self.KIND_HQ:
rel = unicode(self.group)
else:
rel = u"%s at %s" % (self.profile.hrpid, self.pjob.company)
- return u"%s address %d for %s" % (
+ return "%s address %d for %s" % (
self.get_addr_type_display(), self.subid, rel)
@property
return self.addr_type == self.KIND_JOB
+@python_2_unicode_compatible
class ProfileAddressComponentEnum(models.Model):
#id = models.BigIntegerField(primary_key=True)
short_name = models.CharField(max_length=765)
long_name = models.CharField(max_length=765)
types = models.CharField(max_length=891)
class Meta:
- db_table = u'profile_addresses_components_enum'
+ db_table = 'profile_addresses_components_enum'
- def __unicode__(self):
- return u'%s (%s)' % (self.short_name, self.types)
+ def __str__(self):
+ return '%s (%s)' % (self.short_name, self.types)
+@python_2_unicode_compatible
class ProfileAddressComponent(models.Model):
profile = models.ForeignKey(Profile, db_column='pid')
job = models.ForeignKey('ProfileJobEnum', db_column='jobid')
address = models.ForeignKey(ProfileAddress, related_name='component_links',
aux_field='pkey')
class Meta:
- db_table = u'profile_addresses_components'
+ db_table = 'profile_addresses_components'
- def __unicode__(self):
- return u"%s (%s) for %s" % (
+ def __str__(self):
+ return "%s (%s) for %s" % (
self.component.long_name,
self.component.types,
self.address,
text = models.CharField(max_length=150)
url = models.CharField(max_length=765)
class Meta:
- db_table = u'profile_binet_enum'
+ db_table = 'profile_binet_enum'
class ProfileBinet(models.Model):
binet = models.ForeignKey(ProfileBinetEnum)
pkey = models.CompositeField(profile, binet, primary_key=True)
class Meta:
- db_table = u'profile_binets'
+ db_table = 'profile_binets'
class ProfileHobby(models.Model):
text = models.CharField(max_length=765)
pub = models.CharField(max_length=21)
class Meta:
- db_table = u'profile_hobby'
+ db_table = 'profile_hobby'
class ProfileNetworkingEnum(models.Model):
network_type = models.CharField(max_length=18)
link = models.CharField(max_length=765)
class Meta:
- db_table = u'profile_networking_enum'
+ db_table = 'profile_networking_enum'
class ProfileNetworking(models.Model):
address = models.CharField(max_length=765)
pub = models.CharField(max_length=21)
class Meta:
- db_table = u'profile_networking'
+ db_table = 'profile_networking'
# Profile::corps
# --------------
+@python_2_unicode_compatible
class ProfileCorpsEnum(models.Model):
#id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=255, unique=True)
abbreviation = models.CharField(max_length=15, unique=True)
still_exists = models.IntegerField()
class Meta:
- db_table = u'profile_corps_enum'
+ db_table = 'profile_corps_enum'
- def __unicode__(self):
+ def __str__(self):
return self.name
+@python_2_unicode_compatible
class ProfileCorpsRankEnum(models.Model):
#id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=255, unique=True)
abbreviation = models.CharField(max_length=15, unique=True)
class Meta:
- db_table = u'profile_corps_rank_enum'
+ db_table = 'profile_corps_rank_enum'
- def __unicode__(self):
+ def __str__(self):
return self.name
+@python_2_unicode_compatible
class ProfileCorps(models.Model):
profile = models.OneToOneField(Profile, primary_key=True, db_column='pid')
original = models.ForeignKey(ProfileCorpsEnum, db_column='original_corpsid', related_name='original_members')
# Ignored: corps is public information anyway.
corps_pub = models.CharField(max_length=21)
class Meta:
- db_table = u'profile_corps'
+ db_table = 'profile_corps'
- def __unicode__(self):
- return u"%s: %s" % (self.profile.hrpid, self.current.name)
+ def __str__(self):
+ return "%s: %s" % (self.profile.hrpid, self.current.name)
# Profile::edu
# ------------
+@python_2_unicode_compatible
class ProfileEducationEnum(models.Model):
#id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=255, unique=True, blank=True)
url = models.CharField(max_length=765, blank=True)
country = models.ForeignKey(GeolocCountry, null=True, db_column='country', blank=True)
class Meta:
- db_table = u'profile_education_enum'
+ db_table = 'profile_education_enum'
- def __unicode__(self):
+ def __str__(self):
return self.name
@property
return self.abbreviation or self.name
+@python_2_unicode_compatible
class ProfileEducationDegreeEnum(models.Model):
#id = models.IntegerField(primary_key=True)
degree = models.CharField(max_length=255, unique=True, blank=True)
abbreviation = models.CharField(max_length=765)
level = models.IntegerField()
class Meta:
- db_table = u'profile_education_degree_enum'
+ db_table = 'profile_education_degree_enum'
- def __unicode__(self):
+ def __str__(self):
return self.degree
+@python_2_unicode_compatible
class ProfileEducationFieldEnum(models.Model):
#id = models.IntegerField(primary_key=True)
field = models.CharField(max_length=255, unique=True, blank=True)
class Meta:
- db_table = u'profile_education_field_enum'
+ db_table = 'profile_education_field_enum'
- def __unicode__(self):
+ def __str__(self):
return self.field
+@python_2_unicode_compatible
class ProfileEducation(models.Model):
id = models.IntegerField()
profile = models.ForeignKey(Profile, db_column='pid', related_name='educations')
program = models.CharField(max_length=765, blank=True)
flags = models.CharField(max_length=81)
class Meta:
- db_table = u'profile_education'
+ db_table = 'profile_education'
- def __unicode__(self):
- return u"%s: %s" % (self.profile.hrpid, self.edu.name)
+ def __str__(self):
+ return "%s: %s" % (self.profile.hrpid, self.edu.name)
+@python_2_unicode_compatible
class ProfileEducationDegree(models.Model):
edu = models.ForeignKey(ProfileEducationEnum, db_column='eduid')
degree = models.ForeignKey(ProfileEducationDegreeEnum, db_column='degreeid')
pkey = models.CompositeField(edu, degree, primary_key=True)
class Meta:
- db_table = u'profile_education_degree'
+ db_table = 'profile_education_degree'
- def __unicode__(self):
- return u"%s - %s" % (self.edu, self.degree)
+ def __str__(self):
+ return "%s - %s" % (self.edu, self.degree)
# Profile::jobs
# -------------
+@python_2_unicode_compatible
class ProfileJobEnum(models.Model):
#id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=255, unique=True)
ax_code = models.BigIntegerField(null=True, db_column='AX_code', blank=True) # Field name made lowercase.
siren_code = models.CharField(max_length=9, null=True, db_column='SIREN_code', blank=True) # Field name made lowercase.
class Meta:
- db_table = u'profile_job_enum'
+ db_table = 'profile_job_enum'
- def __unicode__(self):
+ def __str__(self):
return self.name
@property
return self._address
+@python_2_unicode_compatible
class ProfileJob(models.Model):
id = models.IntegerField()
profile = models.ForeignKey(Profile, db_column='pid', related_name='jobs')
email_pub = models.CharField(max_length=21)
entry_year = models.CharField(max_length=12, blank=True)
class Meta:
- db_table = u'profile_job'
+ db_table = 'profile_job'
@property
def ax_visible(self):
def ax_visible_email(self):
return is_ax_visible(self.email_pub)
- def __unicode__(self):
- return u"%s at %s" % (self.profile.hrpid, self.company.name if self.company else '<NONE>')
+ def __str__(self):
+ return "%s at %s" % (self.profile.hrpid, self.company.name if self.company else '<NONE>')
# Profile::job::terms
# -------------------
+@python_2_unicode_compatible
class ProfileJobTermEnum(models.Model):
jtid = models.AutoField(primary_key=True)
name = models.CharField(max_length=765)
full_name = models.CharField(max_length=765)
class Meta:
- db_table = u'profile_job_term_enum'
+ db_table = 'profile_job_term_enum'
- def __unicode__(self):
+ def __str__(self):
return self.name
+@python_2_unicode_compatible
class ProfileJobTermRelation(models.Model):
jtid_1 = models.ForeignKey(ProfileJobTermEnum, db_column='jtid_1', related_name='relations_from')
jtid_2 = models.ForeignKey(ProfileJobTermEnum, db_column='jtid_2', related_name='relations_to')
computed = models.CharField(max_length=24)
pkey = models.CompositeField(jtid_1, jtid_2, computed, primary_key=True)
class Meta:
- db_table = u'profile_job_term_relation'
+ db_table = 'profile_job_term_relation'
- def __unicode__(self):
- return u"%s <-> %s" % (self.jtid_1.name, self.jtid_2.name)
+ def __str__(self):
+ return "%s <-> %s" % (self.jtid_1.name, self.jtid_2.name)
+@python_2_unicode_compatible
class ProfileJobTermSearch(models.Model):
search = models.CharField(max_length=150)
job_term = models.ForeignKey(ProfileJobTermEnum, db_column='jtid')
pkey = models.CompositeField(search, job_term, primary_key=True)
class Meta:
- db_table = u'profile_job_term_search'
+ db_table = 'profile_job_term_search'
- def __unicode__(self):
- return u"%s => %s" % (self.search, self.job_term.name)
+ def __str__(self):
+ return "%s => %s" % (self.search, self.job_term.name)
+@python_2_unicode_compatible
class ProfileJobTerm(models.Model):
profile = models.ForeignKey(Profile, db_column='pid')
company = models.ForeignKey(ProfileJobEnum, db_column='jid')
computed = models.CharField(max_length=24)
pkey = models.CompositeField(profile, company, job_term, primary_key=True)
class Meta:
- db_table = u'profile_job_term'
+ db_table = 'profile_job_term'
- def __unicode__(self):
- return u"%s at %s: %s" % (self.profile.hrpid, self.company.name, self.job_term.name)
+ def __str__(self):
+ return "%s at %s: %s" % (self.profile.hrpid, self.company.name, self.job_term.name)
+@python_2_unicode_compatible
class ProfileJobEntrepriseTerm(models.Model):
job = models.ForeignKey(ProfileJobEnum, db_column='eid')
job_term = models.ForeignKey(ProfileJobTermEnum, db_column='jtid')
pkey = models.CompositeField(job, job_term, primary_key=True)
class Meta:
- db_table = u'profile_job_entreprise_term'
+ db_table = 'profile_job_entreprise_term'
- def __unicode__(self):
- return u"%s: %s" % (self.job.name, self.job_term.name)
+ def __str__(self):
+ return "%s: %s" % (self.job.name, self.job_term.name)
# Profile::skills
# ---------------
+@python_2_unicode_compatible
class ProfileLangSkillEnum(models.Model):
iso_639_2b = models.CharField(max_length=9, primary_key=True)
language = models.CharField(max_length=765)
iso_639_2t = models.CharField(max_length=9)
iso_639_1 = models.CharField(max_length=6, blank=True)
class Meta:
- db_table = u'profile_langskill_enum'
+ db_table = 'profile_langskill_enum'
- def __unicode__(self):
+ def __str__(self):
return self.iso_639_2b
+@python_2_unicode_compatible
class ProfileLangSkill(models.Model):
profile = models.ForeignKey(Profile, db_column='pid')
lang = models.ForeignKey(ProfileLangSkillEnum, db_column='lid')
pkey = models.CompositeField(profile, lang, primary_key=True)
level = models.IntegerField(null=True, blank=True)
class Meta:
- db_table = u'profile_langskills'
+ db_table = 'profile_langskills'
- def __unicode__(self):
- return u"%s: %s" % (self.profile.hrpid, self.lang.iso_639_2b)
+ def __str__(self):
+ return "%s: %s" % (self.profile.hrpid, self.lang.iso_639_2b)
+@python_2_unicode_compatible
class ProfileSkillEnum(models.Model):
id = models.CharField(max_length=9, primary_key=True)
text_fr = models.CharField(max_length=330)
flags = models.CharField(max_length=15)
axfreetext = models.TextField()
class Meta:
- db_table = u'profile_skill_enum'
+ db_table = 'profile_skill_enum'
- def __unicode__(self):
+ def __str__(self):
return self.text_en
+@python_2_unicode_compatible
class ProfileSkill(models.Model):
profile = models.ForeignKey(Profile, db_column='pid')
skill = models.ForeignKey(ProfileSkillEnum, db_column='cid')
pkey = models.CompositeField(profile, skill, primary_key=True)
level = models.CharField(max_length=54)
class Meta:
- db_table = u'profile_skills'
+ db_table = 'profile_skills'
- def __unicode__(self):
- return u"%s: %s" % (self.profile.hrpid, self.skill.text_en)
+ def __str__(self):
+ return "%s: %s" % (self.profile.hrpid, self.skill.text_en)
# Profile::medals
img = models.CharField(max_length=765, blank=True)
flags = models.CharField(max_length=63)
class Meta:
- db_table = u'profile_medal_enum'
+ db_table = 'profile_medal_enum'
class ProfileMedalGradeEnum(models.Model):
text = models.CharField(max_length=765, blank=True)
pos = models.IntegerField()
class Meta:
- db_table = u'profile_medal_grade_enum'
+ db_table = 'profile_medal_grade_enum'
class ProfileMedal(models.Model):
pkey = models.CompositeField(profile, medal, gid, primary_key=True)
level = models.CharField(max_length=18)
class Meta:
- db_table = u'profile_medals'
+ db_table = 'profile_medals'
# Profile::mentor
profile = models.OneToOneField(Profile, primary_key=True, db_column='pid')
expertise = models.TextField()
class Meta:
- db_table = u'profile_mentor'
+ db_table = 'profile_mentor'
class ProfileMentorCountry(models.Model):
country = models.ForeignKey(GeolocCountry, db_column='country')
pkey = models.CompositeField(profile, country, primary_key=True)
class Meta:
- db_table = u'profile_mentor_country'
+ db_table = 'profile_mentor_country'
class ProfileMentorTerm(models.Model):
job_term = models.ForeignKey(ProfileJobTermEnum, db_column='jtid')
pkey = models.CompositeField(profile, job_term, primary_key=True)
class Meta:
- db_table = u'profile_mentor_term'
+ db_table = 'profile_mentor_term'
# Profile::partner
has_directory = models.IntegerField()
has_bulkmail = models.IntegerField()
class Meta:
- db_table = u'profile_partnersharing_enum'
+ db_table = 'profile_partnersharing_enum'
class ProfilePartnersharingSetting(models.Model):
allow_email = models.CharField(max_length=18, blank=True)
last_connection = models.DateTimeField(null=True, blank=True)
class Meta:
- db_table = u'profile_partnersharing_settings'
+ db_table = 'profile_partnersharing_settings'
class ProfilePhotoToken(models.Model):
token = models.CharField(max_length=765)
expires = models.DateTimeField()
class Meta:
- db_table = u'profile_photo_tokens'
+ db_table = 'profile_photo_tokens'
# Profile::misc
name = models.CharField(max_length=765, blank=True)
name_type = models.IntegerField(null=True, blank=True)
class Meta:
- db_table = u'profile_merge_issues'
+ db_table = 'profile_merge_issues'
class ProfileModification(models.Model):
type = models.CharField(max_length=33)
timestamp = models.DateTimeField()
class Meta:
- db_table = u'profile_modifications'
+ db_table = 'profile_modifications'
class ProfileVisibilityEnum(models.Model):
best_display_level = models.CharField(max_length=21, blank=True)
display_levels = models.CharField(max_length=72, blank=True)
class Meta:
- db_table = u'profile_visibility_enum'
+ db_table = 'profile_visibility_enum'
profile = models.OneToOneField(Profile, primary_key=True, db_column='pid')
message = models.TextField()
class Meta:
- db_table = u'profile_deltaten'
+ db_table = 'profile_deltaten'
# Reminders
remind_delay_no = models.IntegerField()
remind_delay_dismiss = models.IntegerField()
class Meta:
- db_table = u'reminder_type'
+ db_table = 'reminder_type'
class Reminder(models.Model):
remind_last = models.DateTimeField()
remind_next = models.DateTimeField(null=True, blank=True)
class Meta:
- db_table = u'reminder'
+ db_table = 'reminder'
class ReminderTip(models.Model):
promo_max = models.IntegerField()
state = models.CharField(max_length=18)
class Meta:
- db_table = u'reminder_tips'
+ db_table = 'reminder_tips'
# Surveys
mode = models.IntegerField()
promos = models.CharField(max_length=765)
class Meta:
- db_table = u'surveys'
+ db_table = 'surveys'
class SurveyVote(models.Model):
survey = models.ForeignKey(Survey)
account = models.ForeignKey(Account, null=True, db_column='uid', blank=True)
class Meta:
- db_table = u'survey_votes'
+ db_table = 'survey_votes'
class SurveyAnswer(models.Model):
question_id = models.IntegerField()
answer = models.TextField()
class Meta:
- db_table = u'survey_answers'
+ db_table = 'survey_answers'
# GApps
r_last_login = models.DateField(null=True, blank=True)
r_last_webmail = models.DateField(null=True, blank=True)
class Meta:
- db_table = u'gapps_accounts'
+ db_table = 'gapps_accounts'
class GappsNickname(models.Model):
g_account_name = models.CharField(max_length=768)
g_nickname = models.CharField(max_length=255, primary_key=True)
class Meta:
- db_table = u'gapps_nicknames'
+ db_table = 'gapps_nicknames'
class GappsQueue(models.Model):
r_softfail_count = models.IntegerField()
r_result = models.CharField(max_length=768, blank=True)
class Meta:
- db_table = u'gapps_queue'
+ db_table = 'gapps_queue'
class GappsReporting(models.Model):
usage_in_bytes = models.BigIntegerField(null=True, blank=True)
quota_in_mb = models.IntegerField(null=True, blank=True)
class Meta:
- db_table = u'gapps_reporting'
+ db_table = 'gapps_reporting'
actions = models.CharField(max_length=105)
last = models.DateTimeField()
class Meta:
- db_table = u'watch'
+ db_table = 'watch'
class WatchGroup(models.Model):
group = models.ForeignKey(Group, db_column='groupid')
pkey = models.CompositeField(account, group, primary_key=True)
class Meta:
- db_table = u'watch_group'
+ db_table = 'watch_group'
class WatchNonins(models.Model):
watched = models.ForeignKey(Account, db_column='ni', related_name='watched_by')
pkey = models.CompositeField(account, watched, primary_key=True)
class Meta:
- db_table = u'watch_nonins'
+ db_table = 'watch_nonins'
class WatchProfile(models.Model):
field = models.CharField(max_length=36)
pkey = models.CompositeField(profile, field, primary_key=True)
class Meta:
- db_table = u'watch_profile'
+ db_table = 'watch_profile'
class WatchPromo(models.Model):
promo = models.IntegerField()
pkey = models.CompositeField(account, promo, primary_key=True)
class Meta:
- db_table = u'watch_promo'
+ db_table = 'watch_promo'
# Postfix
state = models.CharField(max_length=21, blank=True)
text = models.TextField()
class Meta:
- db_table = u'mx_watch'
+ db_table = 'mx_watch'
class PostfixBlacklist(models.Model):
email = models.CharField(max_length=255, primary_key=True)
reject_text = models.CharField(max_length=192)
class Meta:
- db_table = u'postfix_blacklist'
+ db_table = 'postfix_blacklist'
class PostfixMailseen(models.Model):
create_time = models.DateTimeField()
release = models.CharField(max_length=18)
class Meta:
- db_table = u'postfix_mailseen'
+ db_table = 'postfix_mailseen'
class PostfixWhitelist(models.Model):
email = models.CharField(max_length=255, primary_key=True)
class Meta:
- db_table = u'postfix_whitelist'
+ db_table = 'postfix_whitelist'
# Register
message_data = models.CharField(max_length=192, blank=True)
personal_notes = models.TextField(blank=True)
class Meta:
- db_table = u'register_marketing'
+ db_table = 'register_marketing'
class RegisterMstat(models.Model):
sender = models.ForeignKey(Account, null=True, db_column='sender', blank=True, related_name='sent_marketings_stats')
success = models.DateField()
class Meta:
- db_table = u'register_mstats'
+ db_table = 'register_mstats'
class RegisterPending(models.Model):
hash = models.CharField(max_length=36)
services = models.CharField(max_length=78)
class Meta:
- db_table = u'register_pending'
+ db_table = 'register_pending'
class RegisterPendingXnet(models.Model):
sender_name = models.CharField(max_length=765)
group_name = models.CharField(max_length=765)
class Meta:
- db_table = u'register_pending_xnet'
+ db_table = 'register_pending_xnet'
class RegisterSubs(models.Model):
domain = models.CharField(max_length=192)
pkey = models.CompositeField(account, type, sub, domain, primary_key=True)
class Meta:
- db_table = u'register_subs'
+ db_table = 'register_subs'
# Search
result = models.TextField()
generated = models.DateTimeField()
class Meta:
- db_table = u'search_autocomplete'
+ db_table = 'search_autocomplete'
class SearchName(models.Model):
flags = models.CharField(max_length=18)
general_type = models.CharField(max_length=27)
class Meta:
- db_table = u'search_name'
+ db_table = 'search_name'
# Requests
profile = models.ForeignKey(Profile, null=True, db_column='pid', blank=True)
pkey = models.CompositeField(account, stamp, type, primary_key=True)
class Meta:
- db_table = u'requests'
+ db_table = 'requests'
class RequestAnswer(models.Model):
title = models.CharField(max_length=150)
answer = models.TextField()
class Meta:
- db_table = u'requests_answers'
+ db_table = 'requests_answers'
class RequestHidden(models.Model):
account = models.ForeignKey(Account, primary_key=True, db_column='uid')
hidden_requests = models.TextField()
class Meta:
- db_table = u'requests_hidden'
+ db_table = 'requests_hidden'
# Misc
date = models.DateField()
bits = models.CharField(max_length=48)
class Meta:
- db_table = u'axletter'
+ db_table = 'axletter'
class Carva(models.Model):
account = models.ForeignKey(Account, primary_key=True, db_column='uid')
url = models.CharField(max_length=765)
class Meta:
- db_table = u'carvas'
+ db_table = 'carvas'
class Contact(models.Model):
contact = models.ForeignKey(Profile, db_column='contact')
pkey = models.CompositeField(account, contact, primary_key=True)
class Meta:
- db_table = u'contacts'
+ db_table = 'contacts'
class Downtime(models.Model):
description = models.TextField()
services = models.CharField(max_length=54)
class Meta:
- db_table = u'downtimes'
+ db_table = 'downtimes'
class EmailListModerate(models.Model):
message = models.TextField(blank=True)
handler = models.IntegerField(null=True, blank=True)
class Meta:
- db_table = u'email_list_moderate'
+ db_table = 'email_list_moderate'
class EmailSendSave(models.Model):
account = models.OneToOneField(Account, primary_key=True, db_column='uid')
data = models.TextField()
class Meta:
- db_table = u'email_send_save'
+ db_table = 'email_send_save'
class EmailWatch(models.Model):
account = models.ForeignKey(Account, null=True, db_column='uid', blank=True)
description = models.TextField()
class Meta:
- db_table = u'email_watch'
+ db_table = 'email_watch'
class GeolocLanguage(models.Model):
country = models.CharField(max_length=765, blank=True)
countryplain = models.CharField(max_length=765, db_column='countryPlain', blank=True) # Field name made lowercase.
class Meta:
- db_table = u'geoloc_languages'
+ db_table = 'geoloc_languages'
class HomonymList(models.Model):
account = models.ForeignKey(Account, db_column='uid')
pkey = models.CompositeField(hrmid, account, primary_key=True)
class Meta:
- db_table = u'homonyms_list'
+ db_table = 'homonyms_list'
class UrlShortener(models.Model):
alias = models.CharField(max_length=255, primary_key=True)
url = models.TextField()
class Meta:
- db_table = u'url_shortener'
-
+ db_table = 'url_shortener'