mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Enabled event create button
Added MIC field to the event form Added the ability to specify the fields you want to query in an api request Changes to the user profile to enable queries via the API
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import hashlib
|
||||
import datetime
|
||||
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import AbstractUser
|
||||
from django.conf import settings
|
||||
import hashlib
|
||||
import reversion
|
||||
import datetime
|
||||
|
||||
|
||||
|
||||
# Create your models here.
|
||||
@@ -18,6 +20,9 @@ class Profile(AbstractUser):
|
||||
url = "https://www.gravatar.com/avatar/" + hashlib.md5(self.email).hexdigest() + "?d=identicon&s=500"
|
||||
return url
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self.get_full_name() + ' "' + self.initials + '"'
|
||||
|
||||
class RevisionMixin(object):
|
||||
@property
|
||||
@@ -163,7 +168,7 @@ class Event(models.Model, RevisionMixin):
|
||||
)
|
||||
|
||||
name = models.CharField(max_length=255)
|
||||
person = models.ForeignKey('Person')
|
||||
person = models.ForeignKey('Person', null=True, blank=True)
|
||||
organisation = models.ForeignKey('Organisation', blank=True, null=True)
|
||||
venue = models.ForeignKey('Venue')
|
||||
description = models.TextField(blank=True, null=True)
|
||||
|
||||
Reference in New Issue
Block a user