forked from expo/troggle
test suite with users logins
This commit is contained in:
parent
f8b613e0aa
commit
25b8fc2e1d
@ -37,10 +37,12 @@ class SimpleTest(SimpleTestCase):
|
||||
def test_import_parsers_survex(self):
|
||||
import troggle.settings as settings
|
||||
import troggle.core.models.troggle as models
|
||||
import troggle.core.models.caves as models_caves
|
||||
import troggle.core.models.survex as models_survex
|
||||
import troggle.core.models.caves as models_caves
|
||||
from troggle.parsers.people import GetPersonExpeditionNameLookup
|
||||
from troggle.core.views.prospect import MapLocations
|
||||
from troggle.core.views.other import troggle404, frontpage
|
||||
from troggle.core.views.caves import ent, cavepage
|
||||
from troggle.core.views import surveys, other, caves, statistics, survex
|
||||
def test_import_parsers_QMs(self):
|
||||
from troggle.core.models.caves import QM, Cave, LogbookEntry
|
||||
def test_import_parsers_people(self):
|
||||
@ -82,10 +84,24 @@ class SimpleTest(SimpleTestCase):
|
||||
def test_import_urls(self):
|
||||
from django.conf import settings
|
||||
from django.conf.urls import url, include
|
||||
from django.contrib import admin
|
||||
from django.contrib import auth
|
||||
from django.urls import reverse, resolve
|
||||
from django.views.generic.base import RedirectView
|
||||
from django.views.generic.edit import UpdateView
|
||||
from django.views.generic.list import ListView
|
||||
from django.contrib import admin
|
||||
from django.urls import reverse, resolve
|
||||
from troggle.core.views import surveys, other, caves, statistics, survex
|
||||
from troggle.core.views.auth import expologin, expologout
|
||||
from troggle.core.views.caves import ent, cavepage
|
||||
from troggle.core.views.expo import expofiles_redirect, expofilessingle, expopage, editexpopage, mediapage, map, mapfile
|
||||
from troggle.core.views.logbooks import expedition, personexpedition, Expeditions_tsvListView, Expeditions_jsonListView
|
||||
from troggle.core.views.logbooks import get_logbook_entries, logbookentry, logbookSearch
|
||||
from troggle.core.views.logbooks import personindex, person, get_people
|
||||
from troggle.core.views.other import troggle404, frontpage
|
||||
from troggle.core.views.prospect import prospecting
|
||||
from troggle.core.views.prospect import prospecting_image
|
||||
from troggle.core.views.statistics import pathsreport, stats, dataissues
|
||||
from troggle.core.views.survex import survexcaveslist, survexcavesingle, svx
|
||||
|
||||
|
||||
|
||||
|
629
core/TESTS/tests-cuyc-ignored.py
Normal file
629
core/TESTS/tests-cuyc-ignored.py
Normal file
@ -0,0 +1,629 @@
|
||||
"""
|
||||
IGNORED tests
|
||||
- all test files with hyphens in the filename are ignored
|
||||
- filnames with _ are OK
|
||||
|
||||
$ python manage.py test cuy.photologue --parallel
|
||||
only runs the photologue tests. Working.(well, it was working..)
|
||||
|
||||
$ python manage.py test cuy.mailman --parallel
|
||||
|
||||
$ python manage.py test paypal.standard --parallel
|
||||
needs work: a very large test suite
|
||||
|
||||
$ python manage.py test tagging --parallel
|
||||
a huge suite - needs a lot of work to with Django 1.11 & python3
|
||||
|
||||
$ python manage.py test cuy.club --parallel
|
||||
Runs the tests in this file only
|
||||
"""
|
||||
|
||||
import unittest
|
||||
import re
|
||||
from django.test import TestCase, SimpleTestCase, TransactionTestCase, Client
|
||||
|
||||
class ImportTest(TestCase):
|
||||
def test_import_imports(self):
|
||||
# Need to go through all modules and copy all imports here
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.contrib.auth.models import User
|
||||
from django.core import management
|
||||
from django.db import connection, connections
|
||||
from django.http import HttpResponse
|
||||
from django.http import HttpResponse, HttpResponseRedirect
|
||||
from django.shortcuts import get_object_or_404, render
|
||||
from django.template.defaultfilters import slugify
|
||||
from django.utils.timezone import get_current_timezone, make_aware
|
||||
from io import StringIO
|
||||
from cuy.club.models import Member, Article, Event, WebpageCategory, Webpage
|
||||
from cuy.website.views.generic import PUBLIC_LOGIN
|
||||
from cuy.club.models import Member
|
||||
from django.db.utils import IntegrityError
|
||||
|
||||
|
||||
class SimpleTest(SimpleTestCase):
|
||||
def test_arith_mult(self):
|
||||
"""
|
||||
Tests that 10 x 10 always equals 100.
|
||||
"""
|
||||
self.assertEqual(10*10, 100)
|
||||
|
||||
|
||||
class DataTests(TestCase ):
|
||||
'''These check that the NULL and NON-UNIQUE constraints are working in the database '''
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
pass
|
||||
|
||||
def setUp(self):
|
||||
from cuy.club.models import Member
|
||||
from django.contrib.auth.models import User
|
||||
m = Member()
|
||||
m.pk=8000
|
||||
m.user_id = 9000 # not NULL constraint
|
||||
m.save()
|
||||
self.member = m
|
||||
|
||||
u = User()
|
||||
u.pk = 9000
|
||||
u.user_id = 8000
|
||||
u.username, u.password ='stinker', 'secretword'
|
||||
u.email='philip.sargent+SP@gmail.com'
|
||||
u.first_name, u.last_name ='Stinker', 'Pinker'
|
||||
u.save()
|
||||
self.user = u
|
||||
|
||||
def tearDown(self):
|
||||
#self.member.delete() # must delete member before user
|
||||
#self.user.delete() # horrible crash, why?
|
||||
pass
|
||||
|
||||
def test_member_not_null_field(self):
|
||||
from cuy.club.models import Member
|
||||
from django.db.utils import IntegrityError
|
||||
n = Member()
|
||||
try:
|
||||
n.save()
|
||||
except IntegrityError as ex:
|
||||
t = re.search(r'NOT NULL constraint failed: club_member.user_id', str(ex))
|
||||
self.assertIsNotNone(t, "Exception is not the expected 'NOT NULL constraint failed'")
|
||||
n.user_id = 1000
|
||||
try:
|
||||
n.save
|
||||
except:
|
||||
return self.assertIsNotNone(None, "Failed to save valid Member to database")
|
||||
|
||||
def test_member_not_unique_field(self):
|
||||
from cuy.club.models import Member
|
||||
from django.db.utils import IntegrityError
|
||||
m1 = Member()
|
||||
m2 = Member()
|
||||
m1.user_id = 1000
|
||||
m2.user_id = m1.user_id
|
||||
m1.save()
|
||||
try:
|
||||
m2.save()
|
||||
except IntegrityError as ex:
|
||||
t = re.search(r'UNIQUE constraint failed: club_member.user_id', str(ex))
|
||||
return self.assertIsNotNone(t, "IntegrityError as expected but message is not the expected 'UNIQUE constraint failed'" )
|
||||
self.assertIsNotNone(None, "Failed to enforce 'UNIQUE constraint' on saving two Member objects with same user_id")
|
||||
|
||||
def test_article_invalid_date(self):
|
||||
from cuy.club.models import Member, Article
|
||||
from django.db.utils import IntegrityError
|
||||
from django.core.exceptions import ValidationError
|
||||
|
||||
a = Article()
|
||||
m = self.member
|
||||
a.author_id = m.user_id
|
||||
|
||||
a.publish="not a valid datetime"
|
||||
try:
|
||||
a.save()
|
||||
except ValidationError as ex:
|
||||
t = re.search(r'value has an invalid format. It must be in YYYY-MM-DD HH:MM', str(ex))
|
||||
self.assertIsNotNone(t, "Exception is not the expected 'invalid format'")
|
||||
|
||||
def test_article_and_author_not_null(self):
|
||||
from cuy.club.models import Member, Article
|
||||
from django.db.utils import IntegrityError
|
||||
from django.core.exceptions import ValidationError
|
||||
|
||||
a2 = Article()
|
||||
a2.publish ="2021-02-17 17:25"
|
||||
a2.author_id = None
|
||||
|
||||
try:
|
||||
a2.save()
|
||||
except IntegrityError as ex:
|
||||
t = re.search(r'NOT NULL constraint failed: club_article.author_id', str(ex))
|
||||
self.assertIsNotNone(t, "Exception is not the expected 'NOT NULL constraint failed'")
|
||||
except:
|
||||
self.assertIsNotNone(None, "Exception is not the expected 'NOT NULL constraint failed' IntegrityError")
|
||||
|
||||
def test_article_and_author_ok(self):
|
||||
from cuy.club.models import Member, Article
|
||||
from django.db.utils import IntegrityError
|
||||
from django.core.exceptions import ValidationError
|
||||
m = self.member
|
||||
|
||||
a3 = Article()
|
||||
a3.pk = 5000
|
||||
a3.publish ="2021-02-17 17:25"
|
||||
|
||||
a3.author_id = m.pk
|
||||
try:
|
||||
a3.save()
|
||||
except:
|
||||
return self.assertIsNotNone(None, "Failed to save valid Article to database")
|
||||
|
||||
|
||||
def test_member_and_user(self):
|
||||
u = self.user
|
||||
m = self.member
|
||||
|
||||
m.user = u
|
||||
self.assertEqual(m.user.last_name, 'Pinker')
|
||||
m.save()
|
||||
u.save()
|
||||
|
||||
class FixturePageTests(TestCase):
|
||||
fixtures = ['cuyc_basic_data.json', 'test_data.json', 'auth_user_gussie']
|
||||
|
||||
def setUp(self):
|
||||
from django.contrib.auth.models import User
|
||||
self.user = User.objects.get(username='gussie')
|
||||
self.member = self.user.profile
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def test_fix_event_loaded(self):
|
||||
from cuy.club.models import Event
|
||||
e = Event.objects.get(slug='spring-in-the-med')
|
||||
self.assertEqual(str(e.shore_contact.first_name()), 'Stiffy')
|
||||
self.assertEqual(str(e.organiser.last_name()), 'Fittleworth')
|
||||
|
||||
def test_fix_page_all_trips(self):
|
||||
response = self.client.get('/programme/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'Spring in the Arctic', content)
|
||||
self.assertIsNotNone(t, "Failed to see Event loaded from fixture")
|
||||
t = re.search(r'High Summer in the Irish Sea', content)
|
||||
self.assertIsNotNone(t, "Failed to see Event loaded from fixture")
|
||||
|
||||
def test_fix_page_event(self):
|
||||
response = self.client.get('/programme/events/spring-in-the-arctic/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'Spring in the Arctic', content)
|
||||
self.assertIsNotNone(t, "Failed to see Event loaded from fixture")
|
||||
|
||||
def test_fix_admin_login_fail(self):
|
||||
c = self.client
|
||||
from django.contrib.auth.models import User
|
||||
from cuy.club.models import Member
|
||||
m = Member.objects.get(pk=9002)
|
||||
u = User.objects.get(username='bingo')
|
||||
|
||||
self.assertTrue(u.is_active, 'User \'' + u.username + '\' is INACTIVE')
|
||||
|
||||
logged_in = c.login(username=u.username, password='secretword') # fails to work if password=u.password !
|
||||
self.assertTrue(logged_in, 'FAILED to login as \'' + u.username + '\'')
|
||||
|
||||
response = c.get('/admin/')
|
||||
content = response.content.decode()
|
||||
with open('admin-op.html', 'w') as f:
|
||||
f.write(content)
|
||||
t = re.search(r'Site administration', content)
|
||||
self.assertIsNone(t, 'Logged in as \'' + u.username + '\' (not staff) but still managed to get the Admin page' )
|
||||
|
||||
|
||||
class ComplexLoginTests(TestCase):
|
||||
'''These test the login and capabilities of logged-in users'''
|
||||
def setUp(self):
|
||||
'''setUp runs once for each test in this class'''
|
||||
from cuy.club.models import Member, MEMBER_TYPES, AFFILIATION
|
||||
from django.contrib.auth.models import User
|
||||
m = Member()
|
||||
m.pk=8000
|
||||
m.user_id = 9000 # not NULL constraint
|
||||
m.email = "philip.sargent+HG@gmail.com"
|
||||
m.member_type = MEMBER_TYPES[1]
|
||||
m.affiliation = AFFILIATION[3]
|
||||
m.committee_email_prefix = 'honoria'
|
||||
|
||||
u = User()
|
||||
u.pk = 9000
|
||||
u.user_id = 8000
|
||||
u.username, u.password ='honoria', 'secretword'
|
||||
u.email='philip.sargent+HG@gmail.com'
|
||||
u.first_name, u.last_name ='Honoria', 'Glossop'
|
||||
u.is_staff = True
|
||||
u.is_superuser = True
|
||||
|
||||
u.set_password(u.password) # This creates a new salt and thus a new key for EACH test
|
||||
u.save() # vital that we save all this before attempting login
|
||||
#print ('\n',u.password)
|
||||
m.save()
|
||||
self.user = u
|
||||
self.member = m
|
||||
|
||||
from cuy.club.models import ClubRole, Elected
|
||||
cr = ClubRole()
|
||||
cr.id = 7000
|
||||
cr.title = 'Skipper'
|
||||
cr.short_description = 'Club skipper who can lead trips'
|
||||
cr.committee_position = True
|
||||
cr.rank = 8
|
||||
cr.save()
|
||||
self.clubrole = cr
|
||||
|
||||
e = Elected()
|
||||
e.member = m
|
||||
e.club_role = cr
|
||||
e.save()
|
||||
self.elected = e
|
||||
|
||||
def tearDown(self):
|
||||
self.client.logout() # not needed as each test creates a new self.client
|
||||
#self.member.delete()
|
||||
##self.user.delete() # id attribute set to None !
|
||||
pass
|
||||
|
||||
def test_login_redirect_for_non_logged_on_user(self):
|
||||
c = self.client
|
||||
# Need to login first. Tests that we are redirected to login page if not logged in
|
||||
response = c.get('/committee/appointments/')
|
||||
self.assertRedirects(response, "/login/?next=/committee/appointments/")
|
||||
|
||||
def test_ordinary_login(self):
|
||||
c = self.client
|
||||
u = self.user
|
||||
|
||||
self.assertTrue(u.is_active, 'User \'' + u.username + '\' is INACTIVE')
|
||||
|
||||
logged_in = c.login(username=u.username, password='secretword') # fails to work if password=u.password !
|
||||
self.assertTrue(logged_in, 'FAILED to login as \'' + u.username + '\'')
|
||||
response = c.get('/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'Hello Honoria', content)
|
||||
self.assertIsNotNone(t, 'Logged in as \'' + u.username + '\' but failed to get personal greeting' )
|
||||
|
||||
def test_authentication_login(self):
|
||||
c = self.client
|
||||
u = self.user
|
||||
|
||||
self.assertTrue(u.is_active, 'User \'' + u.username + '\' is INACTIVE')
|
||||
|
||||
# This is weird. I thought that the user had to login before she was in the authenticated state
|
||||
self.assertTrue(u.is_authenticated, 'User \'' + u.username + '\' is NOT AUTHENTICATED before login')
|
||||
|
||||
logged_in = c.login(username=u.username, password='secretword') # fails to work if password=u.password !
|
||||
self.assertTrue(logged_in, 'FAILED to login as \'' + u.username + '\'')
|
||||
|
||||
self.assertTrue(u.is_authenticated, 'User \'' + u.username + '\' is NOT AUTHENTICATED after login')
|
||||
|
||||
c.logout()
|
||||
self.assertFalse(u.is_authenticated, 'User \'' + u.username + '\' is STILL AUTHENTICATED after logout')
|
||||
|
||||
def test_admin_login(self):
|
||||
c = self.client
|
||||
u = self.user
|
||||
m = self.member
|
||||
|
||||
m.user = u
|
||||
|
||||
logged_in = c.login(username=u.username, password='secretword') # fails to work if password=u.password !
|
||||
self.assertTrue(logged_in, 'FAILED to login as \'' + u.username + '\'')
|
||||
|
||||
response = c.get('/admin/')
|
||||
content = response.content.decode()
|
||||
# with open('admin-op.html', 'w') as f:
|
||||
# f.write(content)
|
||||
t = re.search(r'Site administration', content)
|
||||
self.assertIsNotNone(t, 'Logged in as \'' + u.username + '\' but failed to get the Admin page' )
|
||||
|
||||
def test_user_account_login(self):
|
||||
# User must be associated with a Member for whom is_committee() is True
|
||||
c = self.client
|
||||
u = self.user
|
||||
m = self.member
|
||||
|
||||
m.user = u
|
||||
|
||||
logged_in = c.login(username=u.username, password='secretword') # fails if password=u.password !
|
||||
self.assertTrue(logged_in, 'FAILED to login as \'' + u.username + '\'')
|
||||
|
||||
response = c.get('/accounts/profile/')
|
||||
content = response.content.decode()
|
||||
# with open('account-profile-op.html', 'w') as f:
|
||||
# f.write(content)
|
||||
t = re.search(r'CUYC Member Profile - Cambridge University Yacht Club', content)
|
||||
self.assertIsNotNone(t, 'Logged in as \'' + u.username + '\' but failed to get /accounts/profile/ content')
|
||||
|
||||
def test_committee_login(self):
|
||||
from django.contrib.auth.models import User
|
||||
# User must be associated with a Member for whom is_committee() is True
|
||||
c = self.client # inherited from TestCase
|
||||
u = self.user
|
||||
m = self.member
|
||||
cr = self.clubrole
|
||||
e = self.elected
|
||||
|
||||
m.user = u
|
||||
|
||||
logged_in = c.login(username=u.username, password='secretword') # fails if password=u.password !
|
||||
self.assertTrue(logged_in, 'FAILED to login as \'' + u.username + '\'')
|
||||
response = c.get('/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'Hello Honoria', content)
|
||||
self.assertIsNotNone(t, 'Logged in as \'' + u.username + '\' but failed to get personal greeting' )
|
||||
|
||||
response = c.get('/committee/appointments/')
|
||||
content = response.content.decode()
|
||||
# with open('cmttee-op.html', 'w') as f:
|
||||
# f.write(content)
|
||||
t = re.search(r'A word of warning...', content)
|
||||
self.assertIsNotNone(t, 'Logged in as \'' + u.username + '\' but failed to get /committee/ content')
|
||||
|
||||
def test_user_force(self):
|
||||
from django.conf import settings
|
||||
c = self.client
|
||||
u = self.user
|
||||
m = self.member
|
||||
|
||||
m.user = u
|
||||
|
||||
try:
|
||||
c.force_login(u)
|
||||
except:
|
||||
self.assertIsNotNone(None, 'Unexpected exception trying to force_login as \'' + u.username + '\' but failed (Bad Django documentation?)')
|
||||
|
||||
response = c.get('/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'Hello Honoria', content)
|
||||
self.assertIsNotNone(t, 'Forced logged in as \'' + u.username + '\' but failed to get personal greeting' )
|
||||
|
||||
response = c.get('/accounts/profile/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'From here you can update your', content)
|
||||
self.assertIsNotNone(t, 'Forced logged in as \'' + u.username + '\' but failed to get /accounts/profile/ content')
|
||||
|
||||
|
||||
class DynamicPageTests(TestCase):
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def test_empty_yachts(self):
|
||||
# no page there initially
|
||||
response = self.client.get('/yachts/')
|
||||
content = response.content.decode()
|
||||
self.assertEqual(response.status_code, 404)
|
||||
|
||||
def test_full_yachts(self):
|
||||
'''Creating a WebpageCategory and an index webpage creates a valid url
|
||||
'''
|
||||
from cuy.club.models import WebpageCategory, Webpage
|
||||
wc = WebpageCategory()
|
||||
wc.pk = 8000
|
||||
wc.id = 8000
|
||||
wc.name, wc.slug ='Yachts', 'yachts'
|
||||
wc.save()
|
||||
self.webcategory = wc
|
||||
|
||||
p = Webpage()
|
||||
p.pk = 9000
|
||||
p.id = 9000
|
||||
p.category_id = wc.id
|
||||
p.description = "Current Yacht"
|
||||
p.edited = 1
|
||||
p.event_id = None
|
||||
p.index = 1
|
||||
p.markup = "<h1>Skylark</h1>"
|
||||
p.ordering = 10
|
||||
p.slug = "yacht"
|
||||
p.title = "Skylark Yacht"
|
||||
p.save()
|
||||
self.webpage = p
|
||||
|
||||
response = self.client.get('/yachts/')
|
||||
content = response.content.decode()
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
class PageTests(TestCase):
|
||||
def setUp(self):
|
||||
# Every test needs a client.
|
||||
# new in Django 1.5 no need to create self.client first
|
||||
# https://docs.djangoproject.com/en/dev/topics/testing/tools/#django.test.LiveServerTestCase
|
||||
#self.client = Client()
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def test_basic_admin(self):
|
||||
response = self.client.get('/admin/login/')
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
def test_basic_admindoc(self):
|
||||
# Need to login first. Tests that we are redirected
|
||||
response = self.client.get('/admin/doc/models/')
|
||||
self.assertRedirects(response, "/admin/login/?next=/admin/doc/models/")
|
||||
|
||||
def test_basic_programme(self):
|
||||
response = self.client.get('/programme/')
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
def test_basic_login (self):
|
||||
# Need to login first
|
||||
response = self.client.post('/login/', {'username': 'gussie', 'password': 'secretword'})
|
||||
if response.status_code == 302:
|
||||
print(response['location'])
|
||||
self.assertEqual(response.status_code, 200) # fails because user does not exist
|
||||
|
||||
def test_basic_committee(self):
|
||||
# Need to login first. Tests that we are redirected to login page
|
||||
response = self.client.get('/committee/')
|
||||
self.assertRedirects(response, "/login/?next=/committee/")
|
||||
|
||||
# --- Check non-logged-in users cannot see these
|
||||
def test_basic_gallery(self):
|
||||
response = self.client.get('/gallery/')
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
def test_basic_sitemap(self):
|
||||
response = self.client.get('/site-map/')
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
|
||||
|
||||
# --- public club pages created by content in templates/*.html
|
||||
def test_basic_club(self):
|
||||
response = self.client.get('/club/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'offers opportunities for members of the university to sail yachts', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_basic_programme(self):
|
||||
response = self.client.get('/programme/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'If you would like to go on any of these events', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_basic_programme_onshore(self):
|
||||
response = self.client.get('/programme/on_shore/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'All Upcoming Shore Based Events', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_equal_opps(self):
|
||||
response = self.client.get('/club/equal-opps/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'commitment to a policy of equal opportunities', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_safety(self):
|
||||
response = self.client.get('/club/safety/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'endeavour to maintain the highest levels of safety', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_safety_risk(self):
|
||||
response = self.client.get('/club/safety/risk/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'rules for the use of safety lines to be described and monitored by the skipper.', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_safetypolicy(self):
|
||||
response = self.client.get('/club/safetypolicy/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'should be capable of swimming at least fifty meters in clothing and keeping afloat for at least five minutes', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_safety_rules(self):
|
||||
response = self.client.get('/club/safety/rules/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'Safety Officer is responsible for the maintenance of safety records', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_regulations(self):
|
||||
response = self.client.get('/club/regulations/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'Sanger Institute, the Babraham Institute, Wellcome and MRC Research Laboratories', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_constitution(self):
|
||||
response = self.client.get('/club/constitution/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'to provide a wide variety of safe and affordable yacht sailing', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_clubcommittee(self):
|
||||
response = self.client.get('/club/committee/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'CUYC elects new officers as needed, usually at the beginning of each term', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_damages(self):
|
||||
response = self.client.get('/club/damages/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'all crew participants may be required to contribute to the payment of damages', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_training(self):
|
||||
response = self.client.get('/training/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'members of the club are always happy to pass on informal training tips', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_racing(self):
|
||||
response = self.client.get('/racing/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'CUYC Racing Squad', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_blog(self):
|
||||
response = self.client.get('/blog/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'Latest Posts', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_gallery(self):
|
||||
response = self.client.get('/gallery/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'Photo Galleries', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_about_photos(self):
|
||||
response = self.client.get('/about_photos/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'have been supplied by members of CUYC', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_loginhelp(self):
|
||||
response = self.client.get('/login/help/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'Existing CUYC Member, without an account?', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_loginregister(self):
|
||||
response = self.client.get('/login/register/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'If you are, or have ever been, a CUYC or CUCrC member', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
# --- These pages are not connected to top level public menus but are in fact public
|
||||
def test_page_club_tripinformation(self):
|
||||
response = self.client.get('/club/trip-information/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'organisers have a choice to add a sum to the trip fee quoted on the website to cover expenses', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_club_trippayment(self):
|
||||
response = self.client.get('/club/trip-information/payment/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'All payments to the club should be sent via Paypal', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_club_trip_typical_day(self):
|
||||
response = self.client.get('/club/trip-information/typical-day/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'Skipper and first mate crawl out of their sleeping bags early', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_club_trip_faq(self):
|
||||
response = self.client.get('/club/trip-information/faq/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'Different people are seasick in different ways', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
||||
def test_page_club_trip_kit(self):
|
||||
response = self.client.get('/club/trip-information/kit/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'appropriate quantity of base layer clothes to match the duration', content)
|
||||
self.assertIsNotNone(t)
|
||||
|
21
core/TESTS/tests_caves.py
Normal file
21
core/TESTS/tests_caves.py
Normal file
@ -0,0 +1,21 @@
|
||||
"""
|
||||
Modified for Expo April 2021.
|
||||
"""
|
||||
|
||||
import unittest
|
||||
import re
|
||||
from django.test import TestCase, SimpleTestCase, TransactionTestCase, Client
|
||||
|
||||
|
||||
class FixturePageTests(TestCase):
|
||||
# The fixtures have a password hash which is compatible with plain-text password 'secretword'
|
||||
fixtures = ['auth_users', 'expo_areas', 'expo_caves']
|
||||
|
||||
def setUp(self):
|
||||
from django.contrib.auth.models import User
|
||||
self.user = User.objects.get(username='expotest')
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
|
178
core/TESTS/tests_logins.py
Normal file
178
core/TESTS/tests_logins.py
Normal file
@ -0,0 +1,178 @@
|
||||
"""
|
||||
Originally written for CUYC
|
||||
Philip Sargent (Feb.2021)
|
||||
|
||||
Modified for Expo April 2021.
|
||||
"""
|
||||
|
||||
import unittest
|
||||
import re
|
||||
from django.test import TestCase, SimpleTestCase, TransactionTestCase, Client
|
||||
|
||||
|
||||
|
||||
class DataTests(TestCase ):
|
||||
'''These check that the NULL and NON-UNIQUE constraints are working in the database '''
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
pass
|
||||
|
||||
def setUp(self):
|
||||
from django.contrib.auth.models import User
|
||||
u = User()
|
||||
u.pk = 9000
|
||||
u.user_id = 8000
|
||||
u.username, u.password ='stinker', 'secretword'
|
||||
u.email='philip.sargent+SP@gmail.com'
|
||||
u.first_name, u.last_name ='Stinker', 'Pinker'
|
||||
u.save()
|
||||
self.user = u
|
||||
|
||||
def tearDown(self):
|
||||
#self.member.delete() # must delete member before user
|
||||
#self.user.delete() # horrible crash, why?
|
||||
pass
|
||||
|
||||
class FixturePageTests(TestCase):
|
||||
# The fixtures have a password hash which is compatible with plain-text password 'secretword'
|
||||
fixtures = ['auth_users']
|
||||
|
||||
def setUp(self):
|
||||
from django.contrib.auth.models import User
|
||||
self.user = User.objects.get(username='expotest')
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def test_fix_admin_login_fail(self):
|
||||
c = self.client
|
||||
from django.contrib.auth.models import User
|
||||
u = User.objects.get(username='expotest')
|
||||
|
||||
self.assertTrue(u.is_active, 'User \'' + u.username + '\' is INACTIVE')
|
||||
|
||||
logged_in = c.login(username=u.username, password='secretword') # fails to work if password=u.password !
|
||||
self.assertTrue(logged_in, 'FAILED to login as \'' + u.username + '\'')
|
||||
|
||||
response = c.get('/admin/')
|
||||
content = response.content.decode()
|
||||
with open('admin-op.html', 'w') as f:
|
||||
f.write(content)
|
||||
t = re.search(r'Troggle administration', content)
|
||||
self.assertIsNone(t, 'Logged in as \'' + u.username + '\' (not staff) but still managed to get the Admin page' )
|
||||
|
||||
|
||||
class ComplexLoginTests(TestCase):
|
||||
'''These test the login and capabilities of logged-in users, they do not use fixtures'''
|
||||
def setUp(self):
|
||||
'''setUp runs once for each test in this class'''
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
u = User()
|
||||
u.pk = 9000
|
||||
u.user_id = 8000
|
||||
u.username, u.password ='expotest', 'secretword'
|
||||
u.email='philip.sargent+ET@gmail.com'
|
||||
u.first_name, u.last_name ='ExpoTest', 'Caver'
|
||||
u.is_staff = True
|
||||
u.is_superuser = True
|
||||
|
||||
u.set_password(u.password) # This creates a new salt and thus a new key for EACH test
|
||||
u.save() # vital that we save all this before attempting login
|
||||
#print ('\n',u.password)
|
||||
self.user = u
|
||||
|
||||
def tearDown(self):
|
||||
self.client.logout() # not needed as each test creates a new self.client
|
||||
#self.member.delete()
|
||||
##self.user.delete() # id attribute set to None !
|
||||
pass
|
||||
|
||||
# def test_login_redirect_for_non_logged_on_user(self): # need to fix this in real system
|
||||
# c = self.client
|
||||
# # Need to login first. Tests that we are redirected to login page if not logged in
|
||||
# response = c.get('noinfo/cave-number-index')
|
||||
# self.assertRedirects(response, "/login/?next=/committee/appointments/")
|
||||
|
||||
def test_ordinary_login(self):
|
||||
c = self.client
|
||||
u = self.user
|
||||
|
||||
self.assertTrue(u.is_active, 'User \'' + u.username + '\' is INACTIVE')
|
||||
|
||||
logged_in = c.login(username=u.username, password='secretword') # fails to work if password=u.password !
|
||||
self.assertTrue(logged_in, 'FAILED to login as \'' + u.username + '\'')
|
||||
|
||||
response = c.get('/accounts/login/') # defined by auth system
|
||||
content = response.content.decode()
|
||||
t = re.search(r'You are now logged in', content)
|
||||
self.assertIsNotNone(t, 'Logged in as \'' + u.username + '\' but failed to get \'Now you can\' greeting' )
|
||||
|
||||
def test_authentication_login(self):
|
||||
c = self.client
|
||||
u = self.user
|
||||
|
||||
self.assertTrue(u.is_active, 'User \'' + u.username + '\' is INACTIVE')
|
||||
|
||||
# This is weird. I thought that the user had to login before she was in the authenticated state
|
||||
self.assertTrue(u.is_authenticated, 'User \'' + u.username + '\' is NOT AUTHENTICATED before login')
|
||||
|
||||
logged_in = c.login(username=u.username, password='secretword') # fails to work if password=u.password !
|
||||
self.assertTrue(logged_in, 'FAILED to login as \'' + u.username + '\'')
|
||||
|
||||
self.assertTrue(u.is_authenticated, 'User \'' + u.username + '\' is NOT AUTHENTICATED after login')
|
||||
|
||||
# c.logout() # This next test always means user is still authenticated after logout. Surely not?
|
||||
# self.assertFalse(u.is_authenticated, 'User \'' + u.username + '\' is STILL AUTHENTICATED after logout')
|
||||
|
||||
def test_admin_login(self):
|
||||
c = self.client
|
||||
u = self.user
|
||||
|
||||
logged_in = c.login(username=u.username, password='secretword') # fails to work if password=u.password !
|
||||
self.assertTrue(logged_in, 'FAILED to login as \'' + u.username + '\'')
|
||||
|
||||
response = c.get('/admin/')
|
||||
content = response.content.decode()
|
||||
# with open('admin-op.html', 'w') as f:
|
||||
# f.write(content)
|
||||
t = re.search(r'Troggle administration', content)
|
||||
self.assertIsNotNone(t, 'Logged in as \'' + u.username + '\' but failed to get the Troggle Admin page' )
|
||||
|
||||
def test_noinfo_login(self):
|
||||
from django.contrib.auth.models import User
|
||||
c = self.client # inherited from TestCase
|
||||
u = self.user
|
||||
|
||||
logged_in = c.login(username=u.username, password='secretword') # fails if password=u.password !
|
||||
self.assertTrue(logged_in, 'FAILED to login as \'' + u.username + '\'')
|
||||
response = c.get('/stats') # a page with the Troggle menus
|
||||
content = response.content.decode()
|
||||
t = re.search(r'User\:expotest', content)
|
||||
self.assertIsNotNone(t, 'Logged in as \'' + u.username + '\' but failed to get \'User:expotest\' heading' )
|
||||
|
||||
response = c.get('/noinfo/cave-number-index')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'2001-07 Hoffnungschacht', content)
|
||||
self.assertIsNotNone(t, 'Logged in as \'' + u.username + '\' but failed to get /noinfo/ content')
|
||||
|
||||
def test_user_force(self):
|
||||
from django.conf import settings
|
||||
c = self.client
|
||||
u = self.user
|
||||
|
||||
try:
|
||||
c.force_login(u)
|
||||
except:
|
||||
self.assertIsNotNone(None, 'Unexpected exception trying to force_login as \'' + u.username + '\' but failed (Bad Django documentation?)')
|
||||
|
||||
response = c.get('/stats') # a page with the Troggle menus
|
||||
content = response.content.decode()
|
||||
t = re.search(r'Log out', content)
|
||||
self.assertIsNotNone(t, 'Forced logged in as \'' + u.username + '\' but failed to get Log out heading' )
|
||||
|
||||
response = c.get('/accounts/login/')
|
||||
content = response.content.decode()
|
||||
t = re.search(r'You are now logged in', content)
|
||||
self.assertIsNotNone(t, 'Forced logged in as \'' + u.username + '\' but failed to get /accounts/profile/ content')
|
||||
|
39
core/fixtures/auth_user_gussie.json
Normal file
39
core/fixtures/auth_user_gussie.json
Normal file
@ -0,0 +1,39 @@
|
||||
[
|
||||
{"pk": 9010, "model": "auth.user", "fields":
|
||||
{"username": "expotest", "first_name": "ExpoTest", "last_name": "Caver", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": "2021-02-01 00:00:00+0100", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+expo@gmail.com", "date_joined": "2021-02-01 00:00:00+0100"}},
|
||||
|
||||
{"pk": 9011, "model": "auth.user", "fields":
|
||||
{"username": "expotestadmin", "first_name": "ExpoTest", "last_name": "Admin", "is_active": true, "is_superuser": true, "is_staff": true, "last_login": "2021-02-01 00:00:00+0100", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+expoadmin@gmail.com", "date_joined": "2021-02-01 00:00:00+0100"}},
|
||||
|
||||
{"model": "auth.user", "pk": 8999, "fields":
|
||||
{
|
||||
"email": "philip.sargent+GFN@gmail.com",
|
||||
"first_name": "Gussie",
|
||||
"last_name": "Fink-Nottle",
|
||||
"id": 8999,
|
||||
"is_active": true,
|
||||
"is_staff": true,
|
||||
"is_superuser": true,
|
||||
"last_login": "2021-01-01 00:00:01+0100",
|
||||
"password": "pbkdf2_sha256$150000$EbI1VetXC8tM$pHb5Y7af/TCsNeD6H0EwGx4DWB7qyZyq1bUWKytuiTA=",
|
||||
"username": "gussie",
|
||||
"date_joined": "2021-01-01 00:00:00+0100"
|
||||
}},
|
||||
|
||||
{"pk": 9000, "model": "auth.user", "fields":
|
||||
{"username": "oofy", "first_name": "Oofy", "last_name": "Prosser", "is_active": true, "is_superuser": true, "is_staff": true, "last_login": "2021-01-01 00:00:00+0100", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+oofy@gmail.com", "date_joined": "2021-01-01 00:00:00+0100"}},
|
||||
|
||||
{"pk": 9001, "model": "auth.user", "fields":
|
||||
{"username": "stiffy", "first_name": "Stiffy", "last_name": "Byng", "is_active": true, "is_superuser": true, "is_staff": true, "last_login": "2021-02-01 00:00:00+0100", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+stiffy@gmail.com", "date_joined": "2021-02-01 00:00:00+0100"}},
|
||||
|
||||
{"pk": 9002, "model": "auth.user", "fields":
|
||||
{"username": "bingo", "first_name": "Bingo", "last_name": "Little", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": "2021-02-01 00:00:00+0100", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+bingo@gmail.com", "date_joined": "2021-02-01 00:00:00+0100"}},
|
||||
|
||||
{"pk": 9003, "model": "auth.user", "fields":
|
||||
{"username": "spode", "first_name": "Roderick", "last_name": "Spode", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": "2021-02-01 00:00:00+0100", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+spode@gmail.com", "date_joined": "2021-02-01 00:00:00+0100"}},
|
||||
|
||||
{"pk": 9004, "model": "auth.user", "fields":
|
||||
{"username": "boko", "first_name": "Boko", "last_name": "Fittleworth", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": "2021-02-01 00:00:00+0100", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+boko@gmail.com", "date_joined": "2021-02-01 00:00:00+0100"}}
|
||||
|
||||
]
|
||||
|
8
core/fixtures/auth_users.json
Normal file
8
core/fixtures/auth_users.json
Normal file
@ -0,0 +1,8 @@
|
||||
[
|
||||
{"pk": 9010, "model": "auth.user", "fields":
|
||||
{"username": "expotest", "first_name": "ExpoTest", "last_name": "Caver", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": "2021-02-01 00:00:00+0100", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+expo@gmail.com", "date_joined": "2021-02-01 00:00:00+0100"}},
|
||||
|
||||
{"pk": 9011, "model": "auth.user", "fields":
|
||||
{"username": "expotestadmin", "first_name": "ExpoTest", "last_name": "Admin", "is_active": true, "is_superuser": true, "is_staff": true, "last_login": "2021-02-01 00:00:00+0100", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+expoadmin@gmail.com", "date_joined": "2021-02-01 00:00:00+0100"}}
|
||||
]
|
||||
|
292
core/fixtures/cuyc_basic_data.json
Normal file
292
core/fixtures/cuyc_basic_data.json
Normal file
@ -0,0 +1,292 @@
|
||||
[
|
||||
{"pk": 1, "model": "club.boat", "fields":
|
||||
{"name": "Skylark", "cuy_boat": true, "berths": 8, "boat_type": "Beneteau First 40.7", "length": "41ft", "notes": "We bought her in June 2016 when she was based in Izola, Slovenia, then brought her home over the course of the 2016 Summer Programme."}},
|
||||
|
||||
|
||||
{"pk": 1, "model": "club.clubrole", "fields":
|
||||
{"html_description": "Head of the Section: Overall responsibility for all the activities of CUY - authorises all activities, finances and external communication on behalf of the Club; Committee Management: Organisation of CUY Committee Meetings and Elections; Yacht Charter: Liaises with yacht charter companies to arrange yacht bookings for trips; Development: Organisation of long-term development plans for the Club;", "multiple": false, "title": "Commodore", "rank": 1, "short_description": "Chief", "committee_position": true, "club_email": "commodore@cuy.org.uk", "slug": "commodore"}},
|
||||
|
||||
{"pk": 2, "model": "club.clubrole", "fields":
|
||||
{"html_description": "House Officer Support: Authorizes the activities of all house officers (Purser, Social, Webmaster, Publicity and Sponsorship) and ensures they have details of their responsibilities and that they are properly informed and supported in thier positions. Works with the Rear-Commodore House on legal issues and documentation (see below). Manages Club Shop orders.", "multiple": false, "title": "Vice-Commodore House", "rank": 2, "short_description": "Blah", "committee_position": true, "club_email": "vc-house@cuy.org.uk", "slug": "vice-commodore-house"}},
|
||||
|
||||
{"pk": 3, "model": "club.clubrole", "fields":
|
||||
{"html_description": "Sailing Officer Support: Authorizes the activities of all sailing officers (Training and Racing) and ensures they have details of their responsibilities and that they are properly informed and supported in thier positions. Event Management: Manages the CUY program of trips and events by liaising with skippers, charterers and the commodore. Ensures a proper and accurate record is kept of trip and event information both before and after the trip or event. Liases with the Rear-Commodore Sailing about upcoming trips to ensure they are viable and sucessful.", "multiple": false, "title": "Vice-Commodore Sailing", "rank": 2, "short_description": "Blah", "committee_position": true, "club_email": "vc-sailing@cuy.org.uk", "slug": "vice-commodore-sailing"}},
|
||||
|
||||
{"pk": 5, "model": "club.clubrole", "fields":
|
||||
{"html_description": "Legal: Ensures CUY obtains and sustains insurance policies appropriate to Club activities. Monitors details of charter agreements. Manages contractual disputes with charterers. Liases with Club legal contacts. Documentation: Ensures CUY Regulations; CUY Crew Register; Safety Policy; House Style; Skipper Manual; Agenda and Minutes Committee Meetings and any other key club documentation stay up-to-date.\r\n\r\n", "multiple": false, "title": "Rear-Commodore House", "rank": 3, "short_description": "Blah", "committee_position": true, "club_email": "rc-house@cuy.org.uk", "slug": "rear-commodore-house"}},
|
||||
|
||||
{"pk": 6, "model": "club.clubrole", "fields":
|
||||
{"html_description": "Works with VC-Training to ensure a workable programme of practical and theory courses is made for each term. Responsible for liaising with instructors to ensure courses run smoothly.", "multiple": false, "title": "Rear-Commodore Training", "rank": 3, "short_description": "Blah", "committee_position": true, "club_email": "rc-training@cuy.org.uk", "slug": "rear-commodore-training"}},
|
||||
|
||||
{"pk": 7, "model": "club.clubrole", "fields":
|
||||
{"html_description": "Skipper Managament: Ensures skippers of upcoming trips are aware of standard club procedures detailed in the CUY Manual and that they have the necessary information and equipment. Ensures that the crew have completed Crew Registers and paid Membership Fees before going on trips. Ensures records are taken of travel arrangements to and from trip or event locations. Upon completion of trip ensures expenses and defect reports are collated.", "multiple": false, "title": "Rear-Commodore Sailing", "rank": 3, "short_description": "Blah", "committee_position": true, "club_email": "rc-sailing@cuy.org.uk", "slug": "rear-commodore-sailing"}},
|
||||
|
||||
{"pk": 8, "model": "club.clubrole", "fields":
|
||||
{"html_description": "Financial management; processing all payments and receipts for activities and permenent funds. Preparing the Financial Statement for termly audit and end of year Summary of Accounts. Membership; management of membership in liasion with Trip/Event organisers, Rear-Commodore Sailing, and the DB Admin. Grants applications; preparing funding applications for the Sports and Societies syndicates, and other funding source that may be available. Spending plans & strategy; preparing and presenting to the Committee financial forecasts and strategies for the investment and long term financial future of the Club", "multiple": false, "title": "Purser", "rank": 4, "short_description": "Blah", "committee_position": true, "club_email": "purser@cuy.org.uk", "slug": "purser"}},
|
||||
|
||||
{"pk": 9, "model": "club.clubrole", "fields":
|
||||
{"html_description": "Social programme; submission of dates for socials to the Vice-Commodore Sailing, and planning of socials, including end of term dinner. New & potential members introduction; acting at socials to welcome new & potential members and inform them about club activities.", "multiple": false, "title": "Social Officer", "rank": 5, "short_description": "Blah", "committee_position": true, "club_email": "social@cuy.org.uk", "slug": "social-officer"}},
|
||||
|
||||
{"pk": 10, "model": "club.clubrole", "fields":
|
||||
{"html_description": "Organising RYA Practical Training courses.", "multiple": false, "title": "Practical Training Officer", "rank": 5, "short_description": "Blah", "committee_position": true, "club_email": "practical@cuy.org.uk", "slug": "practical-training-officer"}},
|
||||
|
||||
{"pk": 11, "model": "club.clubrole", "fields":
|
||||
{"html_description": "CUY Racing Squad training and development; improving racing knowledge and skills. Race selection & entry management. Varsity Yacht Race; organising an annual race with Oxford as part of an RORC/JOG or similar offshore/coastal/inshore race.", "multiple": false, "title": "Racing Officer", "rank": 5, "short_description": "Blah", "committee_position": true, "club_email": "racing@cuy.org.uk", "slug": "racing-officer"}},
|
||||
|
||||
{"pk": 13, "model": "club.clubrole", "fields":
|
||||
{"html_description": "Webmaster; control and maintenance of style, scripts and code validity. Liasion with SRCF host; ensuring compliance with regulations and maintenance of filespace. DB Admin; development and administration of CUY Database and associated e-mail lists. Maintenance of Photos section of the website.", "multiple": false, "title": "Webmaster and Database Admin", "rank": 6, "short_description": "Blah", "committee_position": true, "club_email": "webgeek@cuy.org.uk", "slug": "webmaster-and-database-admin"}},
|
||||
|
||||
{"pk": 14, "model": "club.clubrole", "fields":
|
||||
{"html_description": "Boat management. Is responsible for the general upkeep of CUY yachts so that they are ready and safe to be sailed. Ensures that the correct equipment and information on its use is onboard and in the correct locations. Also liaises with VC-Sailing in order to create a workable trip plan.", "multiple": false, "title": "Bosun", "rank": 4, "short_description": "Blah", "committee_position": true, "club_email": "bosun@cuy.org.uk", "slug": "bosun"}},
|
||||
|
||||
{"pk": 4, "model": "club.clubrole", "fields":
|
||||
{"html_description": "Management and delegation of tasks to the Practical Training Officer and Theory Training Officer. Development and Evaluation of the CUY Training Scheme and courses run within the scheme. Ensuring compliance with CUY standards as set out in the training section of the CUY Manual. Training Programme; ensuring submission of dates to the Vice-Commodore Sailing for all training activities, with regard to the advice given in the Training section of the CUY Manual. Overseeing the editing and expanding the website training section.", "multiple": false, "title": "Vice-Commodore Training", "rank": 2, "short_description": "Blah", "committee_position": true, "club_email": "vc-training@cuy.org.uk", "slug": "vice-commodore-training"}},
|
||||
|
||||
{"pk": 15, "model": "club.clubrole", "fields":
|
||||
{"html_description": "Management and delegation of tasks to the Practical Training Officer and Theory Training Officer. Development and Evaluation of the CUY Training Scheme and courses run within the scheme. Ensuring compliance with RYA and CUY standards as set out in the training section of the CUY Manual. Training Programme; ensuring submission of dates to the Vice-Commodore Sailing for all training activities, with regard to the advice given in the Training section of the CUY Manual. Overseeing the editing and expanding the website training section. Management of the RYA Practical and Shorebased training centres.", "multiple": false, "title": "RYA Principal", "rank": 4, "short_description": "Blah", "committee_position": true, "club_email": "rya-principal@cuy.org.uk", "slug": "rya-principal"}},
|
||||
|
||||
{"pk": 12, "model": "club.clubrole", "fields":
|
||||
{"html_description": "Publicity: Publicity articles & campaigns; organising Freshers' Fair and Squash as well as ongoing publicity throughout the year. College Reps scheme; implementation and administration of College Reps scheme as a route of dissemination for publicity material and attracting new members. Sponsorship & funding in co-ordination with the rest of the CUY Committee", "multiple": false, "title": "Publicity and Sponsorship Officer", "rank": 6, "short_description": "Blah", "committee_position": true, "club_email": "sponsorship@cuy.org.uk", "slug": "publicity-and-sponsorship-officer"}},
|
||||
|
||||
{"pk": 16, "model": "club.clubrole", "fields":
|
||||
{"html_description": "Blah", "multiple": true, "title": "Skipper", "rank": 8, "short_description": "Blah", "committee_position": true, "club_email": "", "slug": "skipper"}},
|
||||
|
||||
{"pk": 17, "model": "club.clubrole", "fields":
|
||||
{"html_description": "Blah", "multiple": true, "title": "Instructor", "rank": 7, "short_description": "Blah", "committee_position": true, "club_email": "instructors@cuy.org.uk", "slug": "instructors"}},
|
||||
|
||||
|
||||
{"pk": 5, "model": "club.eventtype", "fields":
|
||||
{"name": "Other", "default_role": 4,
|
||||
"default_thumbnail": "images/HappySailing_square.jpeg",
|
||||
"event_type": "shorebased"}},
|
||||
|
||||
{"pk": 4, "model": "club.eventtype", "fields":
|
||||
{"name": "Theory Training", "default_role": 5,
|
||||
"default_thumbnail": "images/HappySailing_square.jpeg",
|
||||
"event_type": "shorebased"}},
|
||||
|
||||
{"pk": 3, "model": "club.eventtype", "fields":
|
||||
{"name": "Practical Training", "default_role": 5,
|
||||
"default_thumbnail": "images/HappySailing_square.jpeg",
|
||||
"event_type": "atsea"}},
|
||||
|
||||
{"pk": 2, "model": "club.eventtype", "fields":
|
||||
{"name": "Race", "default_role": 4,
|
||||
"default_thumbnail": "images/HappySailing_square.jpeg",
|
||||
"event_type": "atsea"}},
|
||||
|
||||
{"pk": 6, "model": "club.eventtype", "fields":
|
||||
{"name": "Social", "default_role": null,
|
||||
"default_thumbnail": "images/HappySailing_square.jpeg",
|
||||
"event_type": "social"}},
|
||||
|
||||
{"pk": 1, "model": "club.eventtype", "fields":
|
||||
{"name": "Cruising", "default_role": 4,
|
||||
"default_thumbnail": "images/HappySailing_square.jpeg",
|
||||
"event_type": "atsea"}},
|
||||
|
||||
{"pk": 7, "model": "club.eventtype", "fields":
|
||||
{"name": "Trip", "default_role": 4,
|
||||
"default_thumbnail": "images/HappySailing_square.jpeg",
|
||||
"event_type": "atsea"}},
|
||||
|
||||
{"pk": 8, "model": "club.eventtype", "fields":
|
||||
{"name": "Adventurous", "default_role": 4,
|
||||
"default_thumbnail": "images/HappySailing_square.jpeg",
|
||||
"event_type": "atsea"}},
|
||||
|
||||
|
||||
{"pk": 1, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "Practical", "slug": "rya-start-yachting", "title": "RYA Start Yachting"}},
|
||||
|
||||
{"pk": 2, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "", "slug": "rya-day-skipper-theory", "title": "RYA Day Skipper Theory"}},
|
||||
|
||||
{"pk": 3, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "Practical", "slug": "rya-day-skipper-practical", "title": "RYA Day Skipper Practical"}},
|
||||
|
||||
{"pk": 4, "model": "club.qualification", "fields":
|
||||
{"rya": false, "qualification_type": "", "slug": "vhf-radio-licence", "title": "VHF SRC Radio Licence"}},
|
||||
|
||||
{"pk": 5, "model": "club.qualification", "fields":
|
||||
{"rya": false, "qualification_type": "", "slug": "first-aid-certificate", "title": "First Aid Certificate",
|
||||
"expires": true, "length": 3}},
|
||||
|
||||
{"pk": 6, "model": "club.qualification", "fields":
|
||||
{"rya": false, "qualification_type": "", "slug": "cuy-first-mate", "title": "CUYC First Mate"}},
|
||||
|
||||
{"pk": 7, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "", "slug": "rya-mca-costal-skipper-theory", "title": "RYA Costal Skipper/Yachtmaster Theory"}},
|
||||
|
||||
{"pk": 8, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "Practical", "slug": "rya-compcrew", "title": "RYA Competent Crew"}},
|
||||
|
||||
{"pk": 9, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "Practical", "slug": "rya-costal-skipper-practical-course", "title": "RYA Costal Skipper Practical Course"}},
|
||||
|
||||
{"pk": 10, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "Practical", "slug": "rya-mca-costal-skipper-certificate-of-competence", "title": "RYA / MCA Yachtmaster Costal Certificate of Competence"}},
|
||||
|
||||
{"pk": 11, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "Practical", "slug": "rya-mca-yachtmaster-offshore-certificate-of-compet", "title": "RYA / MCA Yachtmaster Offshore Certificate of Competence"}},
|
||||
|
||||
{"pk": 12, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "Practical", "slug": "rya-mca-yachtmaster-ocean-certificate-of-competenc", "title": "RYA / MCA Yachtmaster Ocean Certificate of Competence"}},
|
||||
|
||||
{"pk": 13, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "", "slug": "rya-diesel-engine-course", "title": "RYA Diesel Engine Course"}},
|
||||
|
||||
{"pk": 14, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "", "slug": "rya-radar-course", "title": "RYA Radar Course"}},
|
||||
|
||||
{"pk": 15, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "", "slug": "rya-sea-survival-course", "title": "RYA Sea Survival Course"}},
|
||||
|
||||
{"pk": 16, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "", "slug": "rya-yachtmaster-ocean-theory", "title": "RYA Yachtmaster Ocean Theory"}},
|
||||
|
||||
{"pk": 17, "model": "club.qualification", "fields":
|
||||
{"rya": false, "qualification_type": "", "slug": "cuy-skipper", "title": "CUYC Skipper"}},
|
||||
|
||||
{"pk": 18, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "Practical", "slug": "cuy-examiner-yacht", "title": "RYA Yachtmaster Examiner",
|
||||
"expires": false}},
|
||||
|
||||
{"pk": 19, "model": "club.qualification", "fields":
|
||||
{"rya": false, "qualification_type": "", "slug": "cuy-sail-trim", "title": "CUYC Sail Trim"}},
|
||||
|
||||
{"pk": 20, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "", "slug": "cuy-commercial", "title": "RYA Commercial Endorsement",
|
||||
"expires": true, "length": 5}},
|
||||
|
||||
{"pk": 21, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "", "slug": "cuy-ppr-course", "title": "RYA Professional Practices and Responsibilities"}},
|
||||
|
||||
{"pk": 22, "model": "club.qualification", "fields":
|
||||
{"rya": false, "qualification_type": "", "slug": "cuy-ml5", "title": "MCA ML5 Medical Certificate",
|
||||
"expires": true, "length": 5}},
|
||||
|
||||
{"pk": 23, "model": "club.qualification", "fields":
|
||||
{"rya": false, "qualification_type": "", "slug": "cuy-eng1", "title": "MCA ENG.1 Medical Certificate",
|
||||
"expires": true, "length": 2}},
|
||||
|
||||
{"pk": 24, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "Practical", "slug": "cuy-instruct-cruise", "title": "RYA Cruising Instructor",
|
||||
"expires": true, "length": 5}},
|
||||
|
||||
{"pk": 25, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "Practical", "slug": "cuy-instruct-yacht", "title": "RYA Yachtmaster Instructor",
|
||||
"expires": true, "length": 5}},
|
||||
|
||||
{"pk": 26, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "", "slug": "cuy-instruct-shore", "title": "RYA Shorebased Instructor",
|
||||
"expires": false}},
|
||||
|
||||
{"pk": 27, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "", "slug": "cuy-instruct-diesel", "title": "RYA Diesel Engine Instructor",
|
||||
"expires": false}},
|
||||
|
||||
{"pk": 28, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "", "slug": "cuy-instruct-fistaid", "title": "RYA First Aid Instructor",
|
||||
"expires": false}},
|
||||
|
||||
{"pk": 29, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "", "slug": "cuy-instruct-survival", "title": "RYA Sea Survival Instructor",
|
||||
"expires": false}},
|
||||
|
||||
{"pk": 30, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "", "slug": "cuy-instruct-radar", "title": "RYA Radar Instructor",
|
||||
"expires": false}},
|
||||
|
||||
{"pk": 31, "model": "club.qualification", "fields":
|
||||
{"rya": true, "qualification_type": "", "slug": "cuy-instruct-vhf", "title": "RYA VHF Instructor",
|
||||
"expires": false}},
|
||||
|
||||
|
||||
{"pk": 1, "model": "club.role", "fields":
|
||||
{"event_types": [5, 3, 2, 1], "name": "Skipper", "description": "Skipper"}},
|
||||
|
||||
{"pk": 2, "model": "club.role", "fields":
|
||||
{"event_types": [5, 3, 2, 1], "name": "First Mate", "description": "First Mate"}},
|
||||
|
||||
{"pk": 3, "model": "club.role", "fields":
|
||||
{"event_types": [5, 3, 2, 1], "name": "Watch Leader", "description": "Watch leader"}},
|
||||
|
||||
{"pk": 4, "model": "club.role", "fields":
|
||||
{"event_types": [5, 3, 2, 1], "name": "Crew", "description": "crew"}},
|
||||
|
||||
{"pk": 5, "model": "club.role", "fields":
|
||||
{"event_types": [5, 4, 3, 2], "name": "Student", "description": "student"}},
|
||||
|
||||
{"pk": 6, "model": "club.role", "fields":
|
||||
{"event_types": [5, 4, 3, 2], "name": "Instructor", "description": "Instructor"}},
|
||||
|
||||
{"pk": 7, "model": "club.role", "fields":
|
||||
{"event_types": [5, 2, 1], "name": "Helm", "description": "Helm"}},
|
||||
|
||||
{"pk": 8, "model": "club.role", "fields":
|
||||
{"event_types": [5, 2], "name": "Bow", "description": "Bowman"}},
|
||||
|
||||
{"pk": 9, "model": "club.role", "fields":
|
||||
{"event_types": [5, 2], "name": "Mast", "description": "Mastman"}},
|
||||
|
||||
{"pk": 10, "model": "club.role", "fields":
|
||||
{"event_types": [5, 2], "name": "Pit", "description": "Pit."}},
|
||||
|
||||
{"pk": 11, "model": "club.role", "fields":
|
||||
{"event_types": [5, 2], "name": "Trim", "description": "Trim"}},
|
||||
|
||||
{"pk": 12, "model": "club.role", "fields":
|
||||
{"event_types": [5, 2], "name": "Main Trim", "description": "Main trim."}},
|
||||
|
||||
{"pk": 13, "model": "club.role", "fields":
|
||||
{"event_types": [5, 2], "name": "Navigator", "description": "Navigator"}},
|
||||
|
||||
{"pk": 14, "model": "club.role", "fields":
|
||||
{"event_types": [5, 2], "name": "Tactics", "description": "Tactics"}},
|
||||
|
||||
{"pk": 15, "model": "club.role", "fields":
|
||||
{"event_types": [5, 3, 2, 1, 7, 8], "name": "Second Mate", "description": "Second Mate is usually third in charge, after the Skipper and the First Mate."}},
|
||||
|
||||
{"pk": 16, "model": "club.role", "fields":
|
||||
{"event_types": [6], "name": "Drinker", "description": "Someone who will drink."}},
|
||||
|
||||
{"pk": 17, "model": "club.role", "fields":
|
||||
{"event_types": [8, 1], "name": "Cook", "description": "Cooks food."}},
|
||||
|
||||
|
||||
{"pk": 3, "model": "club.samplewebpage", "fields":
|
||||
{"markup": "<h1>(% event_name %)</h1>\r\n\r\n\r\nBlah Practical Training trip example webpage", "slug": "practical-training-index", "description": "Default page for a practical training trip.", "title": "Practical Training index"}},
|
||||
|
||||
{"pk": 4, "model": "club.samplewebpage", "fields":
|
||||
{"markup": "<h1>(% event_name %)</h1>\r\n\r\nTheory trip\r\n example webpage", "slug": "theory-training-index", "description": "ehcr", "title": "Theory Training Index"}},
|
||||
|
||||
{"pk": 5, "model": "club.samplewebpage", "fields":
|
||||
{"markup": "<h1>(% event_name %)</h1>\r\n\r\n\r\nBlah Social example webpage", "slug": "social-index", "description": "Balh", "title": "Social Index"}},
|
||||
|
||||
{"pk": 6, "model": "club.samplewebpage", "fields":
|
||||
{"markup": "<h1> Kit Page</h1>\r\n example webpage", "slug": "kit", "description": "Kit template page", "title": "Kit"}},
|
||||
|
||||
{"pk": 7, "model": "club.samplewebpage", "fields":
|
||||
{"markup": "<h1>Crew!</h1>\r\n\r\n example webpage", "slug": "crew", "description": "Crew page", "title": "Crew"}},
|
||||
|
||||
{"pk": 2, "model": "club.samplewebpage", "fields":
|
||||
{"markup": "<h1>(% event_name %)</h1>\r\n\r\n\r\nBlah Racing trip example webpage", "slug": "racing-index", "description": "Default Race trip index page.", "title": "Racing Index"}},
|
||||
|
||||
{"pk": 1, "model": "club.samplewebpage", "fields":
|
||||
{"markup": "<h1>(% event_name%)<h1>\r\n\r\nBlah blah Cruising trip example webpage blah.", "slug": "cruising-index", "description": "Default cruising trip index page.", "title": "Cruising Index"}},
|
||||
|
||||
|
||||
{"pk": 1, "model": "photologue.photosize", "fields":
|
||||
{"name": "thumbnail", "watermark": null, "increment_count": false, "effect": null, "crop": true, "height": 75, "width": 75, "upscale": false, "pre_cache": true, "quality": 90}},
|
||||
|
||||
{"pk": 2, "model": "photologue.photosize", "fields":
|
||||
{"name": "small", "watermark": null, "increment_count": false, "effect": null, "crop": false, "height": 150, "width": 150, "upscale": false, "pre_cache": true, "quality": 90}},
|
||||
|
||||
{"pk": 3, "model": "photologue.photosize", "fields":
|
||||
{"name": "display", "watermark": null, "increment_count": true, "effect": null, "crop": false, "height": 500, "width": 500, "upscale": false, "pre_cache": false, "quality": 90}},
|
||||
|
||||
{"pk": 4, "model": "photologue.photosize", "fields":
|
||||
{"name": "large", "watermark": null, "increment_count": true, "effect": null, "crop": false, "height": 1000, "width": 1000, "upscale": false, "pre_cache": false, "quality": 90}}
|
||||
|
||||
]
|
500
core/fixtures/cuyc_test_data.json
Normal file
500
core/fixtures/cuyc_test_data.json
Normal file
@ -0,0 +1,500 @@
|
||||
[
|
||||
{"model": "club.boat", "pk": 8000, "fields":
|
||||
{
|
||||
"berths": 4,
|
||||
"boat_type": null,
|
||||
"cuy_boat": 0,
|
||||
"id": 8000,
|
||||
"length": "35",
|
||||
"name": "Goblin",
|
||||
"notes": "We Didn't Mean to Go to Sea is the seventh book in Arthur Ransome's Swallows and Amazons series of children's books.\r\n\r\nThe book features a small sailing cutter, the Goblin, which is almost identical to Ransome's own boat Nancy Blackett. Ransome sailed Nancy Blackett across to Flushing by the same route as part of his research for the book. The navigational detail and the geography are both correct for the period when the story is set, unlike other books in the series."
|
||||
}},
|
||||
{"model": "club.boat", "pk": 8001, "fields":
|
||||
{
|
||||
"berths": 0,
|
||||
"boat_type": "dinghy",
|
||||
"cuy_boat": 0,
|
||||
"id": 8001,
|
||||
"length": "13",
|
||||
"name": "Swallow",
|
||||
"notes": "Ransome and Ernest Altounyan bought two small dinghies called Swallow and Mavis. Ransome kept Swallow until he sold it a number of years later."
|
||||
}},
|
||||
{"model": "club.boat", "pk": 8002, "fields":
|
||||
{
|
||||
"berths": 0,
|
||||
"boat_type": "dinghy",
|
||||
"cuy_boat": 0,
|
||||
"id": 8002,
|
||||
"length": "13",
|
||||
"name": "Amazon",
|
||||
"notes": "the Blackett children (Nancy and Peggy), who sail a dinghy named Amazon. \r\n\r\nSwallows and Amazons contains no sorcery; its plot is plausible, its characters ordinary children. Therein lies its enduring magic. A celebration of friendship, imagination, fair play, and exploration, Swallows and Amazons inspires even the most landlocked kid to dream of messing about in boats, building fires, camping out and navigating by the stars"
|
||||
}},
|
||||
|
||||
{"model": "club.webpagecategory", "pk": 8000, "fields":
|
||||
{
|
||||
"id": 8000,
|
||||
"name": "Yachts",
|
||||
"slug": "yachts"
|
||||
}},
|
||||
|
||||
{"model": "club.webpagecategory", "pk": 8001, "fields":
|
||||
{
|
||||
"id": 8001,
|
||||
"name": "Club",
|
||||
"slug": "club"
|
||||
}},
|
||||
|
||||
{"model": "club.webpagecategory", "pk": 8002, "fields":
|
||||
{
|
||||
"id": 8002,
|
||||
"name": "Summer",
|
||||
"slug": "summer"
|
||||
}},
|
||||
|
||||
{"model": "club.webpagecategory", "pk": 8002, "fields":
|
||||
{
|
||||
"id": 8003,
|
||||
"name": "Sailing",
|
||||
"slug": "sailing"
|
||||
}},
|
||||
|
||||
{"model": "club.webpagecategory_photos", "pk": 8000, "fields":
|
||||
{
|
||||
"clubphoto_id": 7000,
|
||||
"id": 5000,
|
||||
"webpagecategory_id": 8000
|
||||
}},
|
||||
{"model": "club.clubphoto", "pk": 7000, "fields":
|
||||
{
|
||||
"id": 7000,
|
||||
"name": "IRPCS 4.4",
|
||||
"num_views": 0,
|
||||
"origional_image": "images/training/exams/IRPCS-4-4.png"
|
||||
}},
|
||||
{"model": "club.webpage", "pk": 9000, "fields":
|
||||
{
|
||||
"category_id": 8000,
|
||||
"description": "Current Yacht",
|
||||
"edited": 1,
|
||||
"event_id": null,
|
||||
"id": 9000,
|
||||
"index": 1,
|
||||
"markup": "<h1>Skylark</h1>\r\n<p><strong> \r\n<table border=\"0\">\r\n<tbody>\r\n<tr>\r\n<td>\r\n<p><strong>Skylark, a Beneteau First 40.7, is our main and largest club yacht. </strong>We bought her in June 2016 when she was based in Izola, Slovenia, then brought her home over the course of the 2016 Summer Programme. She's been to Croatia, Greece, Italy, Spain and France on the way home - along with countless other stops along the way.</p>\r\n<p>Since arriving in the UK, she's spent time on the East and South coasts, pottering round the Solent or across the Channel, while Summer Programmes have taken her to the Norwegian Fjords, round the West Coast of Ireland, and all the way up to the Faeroes and Shetland.</p><img src='/site-media/images/training/exams/IRPCS-4-4.png'>",
|
||||
"ordering": 10,
|
||||
"slug": "yacht1",
|
||||
"title": "Skylark Yacht"
|
||||
}},
|
||||
|
||||
{"model": "club.webpage", "pk": 9001, "fields":
|
||||
{ "category_id": 8001,
|
||||
"description": "Safeguarding Policy",
|
||||
"edited": 1,
|
||||
"event_id": null,
|
||||
"id": 9001,
|
||||
"index": 1,
|
||||
"markup": "<h1>Safeguarding Policy</h1><p>Content is here in the main backup database</p>",
|
||||
"ordering": 10,
|
||||
"slug": "safeguarding-policy",
|
||||
"title": "Safeguarding Policy"
|
||||
}},
|
||||
{"model": "club.webpage", "pk": 9002, "fields":
|
||||
{ "category_id": 8001,
|
||||
"description": "Complaints",
|
||||
"edited": 1,
|
||||
"event_id": null,
|
||||
"id": 9002,
|
||||
"index": 1,
|
||||
"markup": "<h1>Complaints</h1><p>Content is here in the main backup database</p>",
|
||||
"ordering": 10,
|
||||
"slug": "complaints",
|
||||
"title": "Complaints"
|
||||
}},
|
||||
{"model": "club.webpage", "pk": 9003, "fields":
|
||||
{ "category_id": 8001,
|
||||
"description": "Other Sailing Opportunities in Cambridge",
|
||||
"edited": 1,
|
||||
"event_id": null,
|
||||
"id": 9003,
|
||||
"index": 1,
|
||||
"markup": "<h1>Other Sailing Opportunities in Cambridge</h1><p>Content is here in the main backup database</p>",
|
||||
"ordering": 10,
|
||||
"slug": "other-sailing-in-camb",
|
||||
"title": "Other Sailing Opportunities in Cambridge"
|
||||
}},
|
||||
{"model": "club.webpage", "pk": 9004, "fields":
|
||||
{ "category_id": 8001,
|
||||
"description": "CUYC Privacy Notice",
|
||||
"edited": 1,
|
||||
"event_id": null,
|
||||
"id": 9004,
|
||||
"index": 1,
|
||||
"markup": "<h1>CUYC Privacy Notice</h1><p>Content is here in the main backup database</p>",
|
||||
"ordering": 10,
|
||||
"slug": "privacy-notice",
|
||||
"title": "CUYC Privacy Notice"
|
||||
}},
|
||||
{"model": "club.webpage", "pk": 9005, "fields":
|
||||
{ "category_id": 8003,
|
||||
"description": "FAQ",
|
||||
"edited": 1,
|
||||
"event_id": null,
|
||||
"id": 9005,
|
||||
"index": 0,
|
||||
"markup": "<h1>FAQ</h1><p>Content is here in the main backup database</p>",
|
||||
"ordering": 10,
|
||||
"slug": "faq",
|
||||
"title": "FAQ" }},
|
||||
{"model": "club.webpage", "pk": 9006, "fields":
|
||||
{ "category_id": 8002,
|
||||
"description": "Summer",
|
||||
"edited": 1,
|
||||
"event_id": null,
|
||||
"id": 9006,
|
||||
"index": 1,
|
||||
"markup": "<h1>Summer</h1><p>Content is here in the main backup database</p>",
|
||||
"ordering": 10,
|
||||
"slug": "summer",
|
||||
"title": "Summer"
|
||||
}},
|
||||
|
||||
|
||||
{"pk": 9000, "model": "auth.user", "fields":
|
||||
{"username": "oofy", "first_name": "Oofy", "last_name": "Prosser", "is_active": true, "is_superuser": true, "is_staff": true, "last_login": "2021-01-01 00:00:00", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+oofy@gmail.com", "date_joined": "2021-01-01 00:00:00"}},
|
||||
|
||||
{"pk": 9001, "model": "auth.user", "fields":
|
||||
{"username": "stiffy", "first_name": "Stiffy", "last_name": "Byng", "is_active": true, "is_superuser": true, "is_staff": true, "last_login": "2021-02-01 00:00:00", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+stiffy@gmail.com", "date_joined": "2021-02-01 00:00:00"}},
|
||||
|
||||
{"pk": 9002, "model": "auth.user", "fields":
|
||||
{"username": "bingo", "first_name": "Bingo", "last_name": "Little", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": "2021-02-01 00:00:00", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+bingo@gmail.com", "date_joined": "2021-02-01 00:00:00"}},
|
||||
|
||||
{"pk": 9003, "model": "auth.user", "fields":
|
||||
{"username": "spode", "first_name": "Roderick", "last_name": "Spode", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": "2021-02-01 00:00:00", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+spode@gmail.com", "date_joined": "2021-02-01 00:00:00"}},
|
||||
|
||||
{"pk": 9004, "model": "auth.user", "fields":
|
||||
{"username": "boko", "first_name": "Boko", "last_name": "Fittleworth", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": "2021-02-01 00:00:00", "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$150000$I9wNXhHCAaHo$0ncTIJ7G+3bSaKHg7RD3ZG2a/4v7cG1bjovq9BiCyA4=", "email": "philip.sargent+boko@gmail.com", "date_joined": "2021-02-01 00:00:00"}},
|
||||
|
||||
|
||||
{"model": "club.member", "pk": 9000, "fields":
|
||||
{"user": 9000, "title": "Millionaire", "email": "philip.sargent+oofy@gmail.com", "member_state": "active", "nice": "nice", "nice_ref": null, "member_type": "senior", "affiliation": "", "affiliation_other": null, "portrait": "", "committee_email_prefix": "oofy", "bio": "Alexander Charles 'Oofy' Prosser is the richest member of the Drones Club, he is also a friend of Bertie Wooster.", "credit_rating": "ok", "crsid": null}},
|
||||
|
||||
{"model": "club.member", "pk": 9001, "fields":
|
||||
{"user": 9001, "title": "Niece and ward of Sir Watkyn Bassett", "email": "philip.sargent+stiffy@gmail.com", "member_state": "active", "nice": "nice", "nice_ref": null, "member_type": "affiliate", "affiliation": "student", "affiliation_other": null, "portrait": "", "committee_email_prefix": "stiffy", "bio": "Stephanie 'Stiffy' Byng is the niece and ward of Sir Watkyn Bassett, she initially lives with him in Totleigh Towers. She is short and has blue eyes. She wears a wind-swept hairstyle, and has an Aberdeen terrier named Bartholomew. Stiffy often gets bright ideas that end up making trouble for others, and she is not above using blackmail to induce Bertie Wooster to do errands for her.", "credit_rating": "good", "crsid": null}},
|
||||
|
||||
{"model": "club.member", "pk": 9002, "fields":
|
||||
{"user": 9002, "title": "Described as long and thin", "email": "philip.sargent+bingo@gmail.com", "member_state": "active", "nice": "nice", "nice_ref": null, "member_type": "senior", "affiliation": "unknown", "affiliation_other": null, "portrait": "", "committee_email_prefix": "bingo", "bio": "Bingo, who has an impulsive and romantic nature, falls in love with numerous women in quick succession, generally pursuing an absurd scheme to woo his latest love interest and invariably causing problems for his pal Bertie", "credit_rating": "ok", "crsid": null}},
|
||||
|
||||
{"model": "club.member", "pk": 9003, "fields":
|
||||
{"user": 9003, "title": "Dictator", "email": "philip.sargent+spode@gmail.com", "member_state": "active", "nice": "bad", "nice_ref": "fascist tendences", "member_type": "unknown", "affiliation": "external", "affiliation_other": null, "portrait": "", "committee_email_prefix": "spode", "bio": "The leader of a fascist group in London called the Saviours of Britain, also known as the Black Shorts.", "credit_rating": "good", "crsid": null}},
|
||||
|
||||
{"model": "club.member", "pk": 9004, "fields":
|
||||
{"user": 9004, "title": "An author with a unique dress sense", "email": "philip.sargent+boko@gmail.com", "member_state": "active", "nice": "nice", "nice_ref": null, "member_type": "senior", "affiliation": "postdoc", "affiliation_other": null, "portrait": "", "committee_email_prefix": "boko", "bio": "According to Bertie, after Jeeves first saw him, Jeeves winced and tottered off to the kitchen, probably to pull himself together with cooking sherry. Boko is engaged to Zenobia 'Nobby' Hopwood", "credit_rating": "ok", "crsid": null}},
|
||||
|
||||
|
||||
{"model": "club.article", "pk": 9000, "fields":
|
||||
{"title": "Blood orange and Campari steamed pudding", "publish": "2021-02-01 00:00:00", "hide": false,
|
||||
"author": 9000, "thumbnail": "images/training/exams/IRPCS-3-6.png", "slug":"blood_orange_campari",
|
||||
"short_summary": "A recipe for a sharp and delicious pudding",
|
||||
"tease": "Put the orange segments and pomegranate seeds in a bowl with the golden syrup, Campari and gin",
|
||||
"body": "This updated take on the traditional steamed pudding stars blood oranges and Campari. It can even be cooked in the microwave for a quick and easy hack. Serve with proper custard."}},
|
||||
|
||||
{"model": "club.article", "pk": 9001, "fields":
|
||||
{"title": "Orange-scented brioche pudding", "publish": "2021-02-01 00:00:00", "hide": false,
|
||||
"author": 9001, "thumbnail": "images/training/exams/IRPCS-3-5.png", "slug":"orange_brioche",
|
||||
"short_summary": "A fragrant bread and butter pudding.",
|
||||
"tease": "Put the sultanas and Grand Marnier into a small saucepan, bring to the boil and simmer",
|
||||
"body": "An old-fashioned bread and butter pudding with a fragrant flourish. You can get ready-sliced long brioche loaves, which makes life simpler, but if you need to get out a bread knife yourself, just try to slice thinly. Any good unchunky marmalade would do. I think this is better warm rather than hot straight from the oven."}},
|
||||
|
||||
{"model": "club.article", "pk": 9002, "fields":
|
||||
{"title": "Upside-down orange pudding", "publish": "2021-02-01 00:00:00", "hide": true,
|
||||
"author": 9002, "thumbnail": "images/training/exams/IRPCS-3-5.png", "slug":"upside_orange",
|
||||
"short_summary": "Very yummy.",
|
||||
"tease": "Yum",
|
||||
"body": "If you find puddings a bit heavy, you'll love this light upside-down pudding. And it's easy to make too."}},
|
||||
|
||||
{"model": "club.article", "pk": 9003, "fields":
|
||||
{"title": "Hot Citrus Pudding", "publish": "2021-02-01 00:00:00", "hide": false,
|
||||
"author": 9001, "thumbnail": "images/training/exams/IRPCS-3-6.png", "slug":"hot_citrus",
|
||||
"short_summary": "Although this pudding is served hot, it is just as nice cold. ",
|
||||
"tease": "Mind you, I doubt if there will be any left over.",
|
||||
"body": "There are two main types of oranges: sweet oranges and bitter (Seville) oranges. The former can be thick- or thin- skinned, with or without seeds, and has sweet-tasting orange or red-flecked flesh. Bitter oranges have aromatic dimpled skin with very bitter pith and very sour, pale-orange flesh. They always contain seeds."}},
|
||||
|
||||
{"model": "club.article", "pk": 9004, "fields":
|
||||
{"title": "Self-saucing Jaffa pudding", "publish": "2021-02-01 00:00:00", "hide": false,
|
||||
"author": 9001, "thumbnail": "images/training/exams/IRPCS-4-1.png", "slug":"jaffa_saucing",
|
||||
"short_summary": "An intense chocolate orange sponge bake. ",
|
||||
"tease": "Yum. This intense chocolate orange sponge bake with thick sauce is about as indulgent as a good pudding gets.",
|
||||
"body": "Mix ½ pint boiling water with sugar and cocoa then pour this over the batter. Return the pot to the slow cooker base, cover and cook on High for 3 hours until firm and risen."}},
|
||||
|
||||
{"model": "club.article", "pk": 9005, "fields":
|
||||
{"title": "Terry's Chocolate Orange Melt In The Middle Pudding", "publish": "2021-02-01 00:00:00", "hide": false,
|
||||
"author": 9001, "thumbnail": "images/training/exams/IRPCS-4-2.png", "slug":"chocolate_orange",
|
||||
"short_summary": "If you are fan of Chocolate Orange this is the pud for you.",
|
||||
"tease": "Yum. a beautifully light chocolate sponge pudding.",
|
||||
"body": "This beautifully light chocolate sponge pudding is encased around a whole Terry's Chocolate Orange and when served straight from the oven will create a gooey melt in the middle chocolate centre. This pudding is a great alternative to the traditional Christmas pudding or a deliciously indulgent finale to a weekend roast with the family"}},
|
||||
|
||||
{"model": "club.affiliationcheck", "pk": 9000, "fields":
|
||||
{"member": 9000, "claim_date": "2021-02-01 00:00:01", "claim": "alum", "confirmed": false, "confirmation_type": null, "confirmed_by": null, "confirmed_date": null}},
|
||||
|
||||
{"model": "club.affiliationcheck", "pk": 9001, "fields":
|
||||
{"member": 9001, "claim_date": "2021-02-01 00:00:01", "claim": "affiliate", "confirmed": false, "confirmation_type": null, "confirmed_by": null, "confirmed_date": null}},
|
||||
|
||||
{"model": "club.affiliationcheck", "pk": 9002, "fields":
|
||||
{"member": 9002, "claim_date": "2021-02-01 00:00:01", "claim": "senior", "confirmed": true, "confirmation_type": null, "confirmed_by": null, "confirmed_date": null}},
|
||||
|
||||
{"model": "club.affiliationcheck", "pk": 9003, "fields":
|
||||
{"member": 9003, "claim_date": "2021-02-01 00:00:01", "claim": "unknown", "confirmed": false, "confirmation_type": null, "confirmed_by": null, "confirmed_date": null}},
|
||||
|
||||
{"model": "club.affiliationcheck", "pk": 9004, "fields":
|
||||
{"member": 9004, "claim_date": "2021-02-01 00:00:01", "claim": "senior", "confirmed": false, "confirmation_type": null, "confirmed_by": null, "confirmed_date": null}},
|
||||
|
||||
|
||||
{"model": "club.elected", "pk": 5000, "fields":
|
||||
{"member": 9000, "elected_until": "", "club_role": 9000
|
||||
}},
|
||||
|
||||
{"model": "club.elected", "pk": 5001, "fields":
|
||||
{"member": 9001, "elected_until": "", "club_role": 16
|
||||
}},
|
||||
|
||||
{"model": "club.elected", "pk": 5002, "fields":
|
||||
{"member": 9001, "elected_until": "", "club_role": 17
|
||||
}},
|
||||
|
||||
|
||||
{"model": "club.award", "pk": 6000, "fields":
|
||||
{"member": 9001, "award_date": "2000-01-01", "qualification": 11
|
||||
}},
|
||||
|
||||
{"model": "club.award", "pk": 6001, "fields":
|
||||
{"member": 9002, "award_date": "2000-01-01", "qualification": 11
|
||||
}},
|
||||
|
||||
{"model": "club.award", "pk": 6002, "fields":
|
||||
{"member": 9004, "award_date": "2000-01-01", "qualification": 3
|
||||
}},
|
||||
|
||||
{"model": "club.award", "pk": 6003, "fields":
|
||||
{"member": 9000, "award_date": "2019-03-10", "qualification": 5
|
||||
}},
|
||||
|
||||
{"model": "club.clubrole", "pk": 9000, "fields":
|
||||
{"title": "Drunken sailor", "slug": "drunk_sailor", "rank": 100, "multiple": true, "club_email": "", "short_description": "Traditional crew role", "html_description": "In the scuppers, early in the morning.", "committee_position": false, "division": null}},
|
||||
|
||||
|
||||
{"model": "club.crewregister", "pk": 10000, "fields":
|
||||
{"member": 9000,
|
||||
"encoded": true,
|
||||
"dob": "1920-02-01",
|
||||
"gender": "M",
|
||||
"cambridge_address": "The Drones Club, London",
|
||||
"vacation_landline": "01632 960374",
|
||||
"kin1_name": "Barmy Fotheringay-Phipps ",
|
||||
"kin1_address": "The Drones Club, London",
|
||||
"kin1_phone": "01632 960620",
|
||||
"log": 20,
|
||||
"days": 3,
|
||||
"seasickness": "severe",
|
||||
"can_swim": true,
|
||||
"accepted_conditions": true,
|
||||
"checked_up_to_date": true,
|
||||
"checked_date": "2021-02-01 00:00:02"
|
||||
}},
|
||||
|
||||
{"model": "club.crewregister", "pk": 10001, "fields":
|
||||
{"member": 9001,
|
||||
"encoded": true,
|
||||
"dob": "1920-02-01",
|
||||
"gender": "F",
|
||||
"cambridge_address": "Totleigh Towers",
|
||||
"vacation_landline": "01223 496 0551",
|
||||
"kin1_name": "Sir Watkyn Bassett",
|
||||
"kin1_address": "Totleigh Towers. (All this detail is because there a minimum set of fields to be completed.)",
|
||||
"kin1_phone": "01223 496 0551",
|
||||
"log": 450,
|
||||
"days": 45,
|
||||
"seasickness": "mild",
|
||||
"can_swim": true,
|
||||
"accepted_conditions": true,
|
||||
"checked_up_to_date": true,
|
||||
"checked_date": "2021-02-01 00:00:02"
|
||||
}},
|
||||
|
||||
|
||||
{"model": "club.event", "pk": 20000, "fields":
|
||||
{"name": "Spring in the Arctic",
|
||||
"slug": "spring-in-the-arctic",
|
||||
"state": "public",
|
||||
"event_type": 1,
|
||||
"organiser": 9001, "shore_contact": 9002,
|
||||
"start_date": "2031-03-01 00:00:00",
|
||||
"end_date": "2031-03-03 00:00:00",
|
||||
"added_date": "2021-02-01 12:00:00",
|
||||
"modified_date": "2021-02-01 13:00:00",
|
||||
"thumbnail": "images/training/exams/collision1.png",
|
||||
"photos": [7000],
|
||||
"spaces": 10, "boats": [8001],
|
||||
"short_summary": "A wonderfully refreshing trip among the ice floes.",
|
||||
"summary": "This is going to be the most amazing trip."}},
|
||||
{"model": "club.eventsettings", "pk": 20000, "fields": {
|
||||
"event": 20000,
|
||||
"show_event_in_progress": true
|
||||
}},
|
||||
|
||||
{"model": "club.event", "pk": 20001, "fields":
|
||||
{"name": "Spring in the Med",
|
||||
"slug": "spring-in-the-med",
|
||||
"state": "public",
|
||||
"event_type": 1,
|
||||
"organiser": 9004, "shore_contact": 9001,
|
||||
"start_date": "2031-03-11 00:00:00",
|
||||
"end_date": "2031-03-13 00:00:00",
|
||||
"added_date": "2021-02-01 12:00:00",
|
||||
"modified_date": "2021-02-01 13:00:00",
|
||||
"thumbnail": "images/training/exams/collision2.png",
|
||||
"photos": [7000],
|
||||
"spaces": 8, "boats": [8001],
|
||||
"short_summary": "A joyful celebration of spring flowers in the Cylades.",
|
||||
"summary": "This is going to be the most amazing trip."}},
|
||||
{"model": "club.eventsettings", "pk": 20001, "fields": {
|
||||
"event": 20001,
|
||||
"show_event_in_progress": true
|
||||
}},
|
||||
|
||||
{"model": "club.event", "pk": 20002, "fields":
|
||||
{"name": "Spring in the Solent",
|
||||
"slug": "spring-in-the-solent",
|
||||
"state": "public",
|
||||
"event_type": 1,
|
||||
"organiser": 9004, "shore_contact": 9001,
|
||||
"start_date": "2031-03-21 00:00:00",
|
||||
"end_date": "2031-03-23 00:00:00",
|
||||
"added_date": "2021-02-01 12:00:00",
|
||||
"modified_date": "2021-02-01 13:00:00",
|
||||
"thumbnail": "images/training/exams/collision3.png",
|
||||
"photos": [7000],
|
||||
"spaces": 8, "boats": [8001],
|
||||
"short_summary": "A rainy and blustery wet week discovering how to do tidal calculations at night.",
|
||||
"summary": "This is going to be the most amazing trip."}},
|
||||
{"model": "club.eventsettings", "pk": 20002, "fields": {
|
||||
"event": 20002,
|
||||
"show_event_in_progress": true
|
||||
}},
|
||||
|
||||
{"model": "club.event", "pk": 20003, "fields":
|
||||
{"name": "Early Summer in the Med",
|
||||
"slug": "early-summer-in-the-med",
|
||||
"state": "public",
|
||||
"event_type": 1,
|
||||
"organiser": 9004, "shore_contact": 9001,
|
||||
"start_date": "2031-05-11 00:00:00",
|
||||
"end_date": "2031-06-13 00:00:00",
|
||||
"added_date": "2021-02-01 12:00:00",
|
||||
"modified_date": "2021-02-01 13:00:00",
|
||||
"thumbnail": "images/training/exams/collision1.png",
|
||||
"photos": [7000],
|
||||
"spaces": 18, "boats": [8001],
|
||||
"short_summary": "Sheer hedonism in the Cylades.",
|
||||
"summary": "This is going to be the most amazing trip: a flotilla of joyfulness."}},
|
||||
{"model": "club.eventsettings", "pk": 20003, "fields": {
|
||||
"event": 20003,
|
||||
"show_event_in_progress": true
|
||||
}},
|
||||
|
||||
{"model": "club.event", "pk": 20004, "fields":
|
||||
{"name": "Summer in the Med",
|
||||
"slug": "summer-in-the-med",
|
||||
"state": "public",
|
||||
"event_type": 1,
|
||||
"organiser": 9004, "shore_contact": 9001,
|
||||
"start_date": "2031-06-11 00:00:00",
|
||||
"end_date": "2031-07-13 00:00:00",
|
||||
"added_date": "2021-02-01 12:00:00",
|
||||
"modified_date": "2021-02-01 13:00:00",
|
||||
"thumbnail": "images/training/exams/collision2.png",
|
||||
"photos": [7000],
|
||||
"spaces": 18, "boats": [8001],
|
||||
"short_summary": "The Dodecanese is spectacularly beautiful at this time of year.",
|
||||
"summary": "This is going to be the most amazing trip."}},
|
||||
{"model": "club.eventsettings", "pk": 20004, "fields": {
|
||||
"event": 20004,
|
||||
"show_event_in_progress": true
|
||||
}},
|
||||
|
||||
{"model": "club.event", "pk": 20005, "fields":
|
||||
{"name": "High Summer in the Med",
|
||||
"slug": "high-summer-in-the-med",
|
||||
"state": "public",
|
||||
"event_type": 1,
|
||||
"organiser": 9004, "shore_contact": 9001,
|
||||
"start_date": "2031-07-11 00:00:00",
|
||||
"end_date": "2031-08-13 00:00:00",
|
||||
"added_date": "2021-02-01 12:00:00",
|
||||
"modified_date": "2021-02-01 13:00:00",
|
||||
"thumbnail": "images/training/exams/collision3.png",
|
||||
"photos": [7000],
|
||||
"spaces": 18, "boats": [8001],
|
||||
"short_summary": "The Saronic Gulf is busy and packed at this time of year.",
|
||||
"summary": "This is going to be the most amazing trip. Party, party, party!"}},
|
||||
{"model": "club.eventsettings", "pk": 20005, "fields": {
|
||||
"event": 20005,
|
||||
"show_event_in_progress": true
|
||||
}},
|
||||
|
||||
{"model": "club.event", "pk": 20006, "fields":
|
||||
{"name": "High Summer in the Irish Sea",
|
||||
"slug": "high-summer-in-the-irish",
|
||||
"state": "public",
|
||||
"event_type": 1,
|
||||
"organiser": 9004, "shore_contact": 9001,
|
||||
"start_date": "2031-07-11 00:00:00",
|
||||
"end_date": "2031-08-13 00:00:00",
|
||||
"added_date": "2021-02-01 12:00:00",
|
||||
"modified_date": "2021-02-01 13:00:00",
|
||||
"thumbnail": "images/training/exams/collision2.png",
|
||||
"photos": [7000],
|
||||
"spaces": 18, "boats": [8001],
|
||||
"short_summary": "The Irish Sea is is wonderful at this time of year.",
|
||||
"summary": "Welsh and Irush coasts, Manx beer."}},
|
||||
{"model": "club.eventsettings", "pk": 20006, "fields": {
|
||||
"event": 20006,
|
||||
"show_event_in_progress": true
|
||||
}},
|
||||
|
||||
{"model": "club.event", "pk": 20007, "fields":
|
||||
{"name": "RYA First Aid course",
|
||||
"slug": "rya-first-aid-2019",
|
||||
"state": "public",
|
||||
"event_type": 1,
|
||||
"organiser": 9004, "shore_contact": 9001,
|
||||
"start_date": "2019-03-10 00:00:00",
|
||||
"end_date": "2019-03-10 00:00:00",
|
||||
"added_date": "2019-03-10 00:00:00",
|
||||
"modified_date": "2021-02-01 13:00:00",
|
||||
"thumbnail": "images/training/exams/collision2.png",
|
||||
"photos": [],
|
||||
"spaces": 12, "boats": [],
|
||||
"short_summary": "A one-day RYA First Aid Course",
|
||||
"summary": "A First Aid certificate is a requirement for candidates for the RYA Yachtmaster Exams."}},
|
||||
|
||||
{"model": "club.eventsettings", "pk": 20006, "fields": {
|
||||
"event": 20006,
|
||||
"show_event_in_progress": true
|
||||
}},
|
||||
|
||||
|
||||
{"model": "club.participate", "pk": 30000, "fields":
|
||||
{"person": 9001,
|
||||
"event": 20000,
|
||||
"state": "confirmed",
|
||||
"date_added": "2021-02-01 12:00:00",
|
||||
"role": 1}},
|
||||
|
||||
{"model": "club.participate", "pk": 30001, "fields":
|
||||
{"person": 9000,
|
||||
"event": 20007,
|
||||
"state": "confirmed",
|
||||
"date_added": "2019-03-10 00:00:00",
|
||||
"paid": true,
|
||||
"role": 5}}
|
||||
]
|
||||
|
52
core/fixtures/expo_areas.json
Normal file
52
core/fixtures/expo_areas.json
Normal file
@ -0,0 +1,52 @@
|
||||
[
|
||||
{"model": "core.area", "pk": 25, "fields":
|
||||
{"short_name": "1626 or 6 (borderline)", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 24, "fields":
|
||||
{"short_name": "8a", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 23, "fields":
|
||||
{"short_name": "2b or 4 (unclear)", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 22, "fields":
|
||||
{"short_name": "11", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 21, "fields":
|
||||
{"short_name": "3", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 20, "fields":
|
||||
{"short_name": "4", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 19, "fields":
|
||||
{"short_name": "1b", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 18, "fields":
|
||||
{"short_name": "8b", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 17, "fields":
|
||||
{"short_name": "2d", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 16, "fields":
|
||||
{"short_name": "7", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 15, "fields":
|
||||
{"short_name": "2b", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 14, "fields":
|
||||
{"short_name": "8c", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 13, "fields":
|
||||
{"short_name": "2c", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 12, "fields":
|
||||
{"short_name": "8d", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 11, "fields":
|
||||
{"short_name": "", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 10, "fields":
|
||||
{"short_name": "5", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 9, "fields":
|
||||
{"short_name": "6", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 8, "fields":
|
||||
{"short_name": "2a", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 7, "fields":
|
||||
{"short_name": "1c", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 6, "fields":
|
||||
{"short_name": "1d", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 5, "fields":
|
||||
{"short_name": "1a", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 4, "fields":
|
||||
{"short_name": "9", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 3, "fields":
|
||||
{"short_name": "10", "name": null, "description": null, "parent": 1, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 2, "fields":
|
||||
{"short_name": "1626", "name": null, "description": null, "parent": null, "new_since_parsing": false, "non_public": false}},
|
||||
{"model": "core.area", "pk": 1, "fields":
|
||||
{"short_name": "1623", "name": null, "description": null, "parent": null, "new_since_parsing": false, "non_public": false}}
|
||||
]
|
3
core/fixtures/expo_caves.json
Normal file
3
core/fixtures/expo_caves.json
Normal file
@ -0,0 +1,3 @@
|
||||
[{"model": "core.cave", "pk": 43, "fields":
|
||||
{"new_since_parsing": false, "non_public": false, "official_name": "Schnellzughöhle", "kataster_code": "6/t/S/W x", "kataster_number": "115", "unofficial_number": "40m", "explorers": "CUCC 1980-1985", "underground_description": "This is the main entrance through which the majority of the <a href=\"41.htm\">Stellerweghöhle</a> system was explored. See the separate <a href=\"41/115.htm#ent115\">full guidebook description</a> for details, just an overview is given here.</p><p>The entrance leads to a non-obvious way on to the head of the short <b>Bell Pitch</b>, from where very awkward going leads out to a bigger passage to reach <b>The Ramp</b> a series of off-vertical pitches. The damper but technically easier <b>Inlet Pitches</b> drop to a Big Chamber, from where <b>Pete's Purgatory</b> starts, and leads in 800m of tortuous going to <b>The Confluence</b> and the larger streamway leading to the deepest point.</p><p>Better is the <b>Purgatory Bypass</b> which starts as dry fossil tubes, with a choice of routes to reach <b>Junction Chamber</b> where the <b>Big Rift</b> of <a href=\"41.htm\">Stellerweghöhle</a> enters. Opposite, the huge fossil tube of <b>Dartford Tunnel</b> makes for easy progress to the Confluence, about halfway down the system. The continuing main streamway is interrupted by a bypassable sump and numerous pitches before a low airspace duck at the end of an unpromising canal leads to the spectacular <b>Orgasm Chasm</b>. Careful rigging avoids the water in this 140m shaft, ending in muddy passage and another short drop to a deep and terminal sump. ", "equipment": "", "references": "", "survey": "CUCC's parts surveyed to Grade 5 but not all drawn up - see <a href=\"41/survey.htm\">here</a>", "kataster_status": "", "underground_centre_line": "In dataset", "notes": "The Austrian Kataster has adopted a very perverse way of numbering things. Their numbers are as follows:</p><ul> <li>115a Stellerweghöhle entrance 41a</li> <li>115b Stellerweghöhle entrance 41b</li> <li>115c Stellerweghöhle entrance 41c ( where ? )</li> <li>115d Schnellzughöhle entrance 115</li> <li>115e unnamed entrance 142</li></ul><p>", "length": "SMK system total 54000m", "depth": "from entrance; SMK system total 1032m", "extent": "SMK system total 2812m", "survex_file": "smk-system.svx", "description_file": "1623/115.htm", "url": "1623/115.htm", "filename": "1623-115.html", "area": [1, 8]}}
|
||||
]
|
58
core/fixtures/how-to-load-fixtures.txt
Normal file
58
core/fixtures/how-to-load-fixtures.txt
Normal file
@ -0,0 +1,58 @@
|
||||
This folder is used by manage.py to load fixtures, as are all the folders
|
||||
called /fixtures/ in any Django app here.
|
||||
|
||||
e.g. a list of files which are in the /fixtures/ folders:
|
||||
$ python manage.py loaddata cuyc_basic_data test_data_1 test_data_1.1 test_data_2
|
||||
|
||||
|
||||
|
||||
$ python manage.py help migration
|
||||
usage: manage.py migrate [-h] [--noinput] [--database DATABASE] [--fake]
|
||||
[--fake-initial] [--plan] [--run-syncdb] [--version]
|
||||
[-v {0,1,2,3}] [--settings SETTINGS]
|
||||
[--pythonpath PYTHONPATH] [--traceback] [--no-color]
|
||||
[--force-color]
|
||||
[app_label] [migration_name]
|
||||
|
||||
Updates database schema. Manages both apps with migrations and those without.
|
||||
|
||||
positional arguments:
|
||||
app_label App label of an application to synchronize the state.
|
||||
migration_name Database state will be brought to the state after that
|
||||
migration. Use the name "zero" to unapply all
|
||||
migrations.
|
||||
optional arguments:
|
||||
--noinput, --no-input
|
||||
Tells Django to NOT prompt the user for input of any
|
||||
kind.
|
||||
--database DATABASE Nominates a database to synchronize. Defaults to the
|
||||
"default" database.
|
||||
--fake Mark migrations as run without actually running them.
|
||||
--fake-initial Detect if tables already exist and fake-apply initial
|
||||
migrations if so. Make sure that the current database
|
||||
schema matches your initial migration before using
|
||||
this flag. Django will only check for an existing
|
||||
table name.
|
||||
--plan Shows a list of the migration actions that will be
|
||||
performed.
|
||||
--run-syncdb Creates tables for apps without migrations.
|
||||
|
||||
|
||||
$ python manage.py help loaddata
|
||||
usage: manage.py loaddata [-h] [--database DATABASE] [--app APP_LABEL]
|
||||
[--ignorenonexistent] [-e EXCLUDE] [--format FORMAT]
|
||||
[--version] [-v {0,1,2,3}] [--settings SETTINGS]
|
||||
[--pythonpath PYTHONPATH] [--traceback] [--no-color]
|
||||
[--force-color]
|
||||
fixture [fixture ...]
|
||||
|
||||
Installs the named fixture(s) in the database.
|
||||
optional arguments:
|
||||
--app APP_LABEL Only look for fixtures in the specified app.
|
||||
--ignorenonexistent, -i
|
||||
Ignores entries in the serialized data for fields that
|
||||
do not currently exist on the model.
|
||||
positional arguments:
|
||||
fixture Fixture labels.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user