def load_fixtures(): load_monitor_fixture(monitor_fixtures) load_settings_fixture(settings_fixtures) rank_staff = Rank( name=_("Forum Team").message, title=_("Forum Team").message, style='staff', special=True, order=0, as_tab=True, ) rank_lurker = Rank(name=_("Lurker").message, style='lurker', order=1, criteria="100%") rank_member = Rank(name=_("Member").message, order=2, criteria="75%") rank_active = Rank( name=_("Most Valueable Posters").message, title=_("MVP").message, style='active', order=3, criteria="5%", as_tab=True, ) rank_staff.save(force_insert=True) rank_lurker.save(force_insert=True) rank_member.save(force_insert=True) rank_active.save(force_insert=True)
def load_fixtures(): Forum(token='annoucements', name='annoucements', slug='annoucements', type='forum').insert_at(None, save=True) Forum(token='private', name='private', slug='private', type='forum').insert_at(None, save=True) Forum(token='reports', name='reports', slug='reports', type='forum').insert_at(None, save=True) root = Forum(token='root', name='root', slug='root') root.insert_at(None, save=True) cat = Forum(type='category', name='First Category', slug='first-category') cat.insert_at(root, save=True) forum = Forum(type='forum', name='First Forum', slug='first-forum', threads=1, posts=1) forum.insert_at(cat, save=True) Forum(type='redirect', name='Project Homepage', slug='project-homepage', redirect='http://misago-project.org').insert_at(cat, position='last-child', save=True) Forum.objects.populate_tree(True) now = timezone.now() thread = Thread.objects.create( forum=forum, name='Welcome to Misago!', slug=slugify('Welcome to Misago!'), start=now, last=now, ) post = Post.objects.create( forum=forum, thread=thread, user_name='MisagoProject', ip='127.0.0.1', agent='', post='Welcome to Misago!', post_preparsed='Welcome to Misago!', date=now, ) thread.start_post = post thread.start_poster_name = 'MisagoProject' thread.start_poster_slug = 'misagoproject' thread.last_post = post thread.last_poster_name = 'MisagoProject' thread.last_poster_slug = 'misagoproject' thread.save(force_update=True) forum.last_thread = thread forum.last_thread_name = thread.name forum.last_thread_slug = thread.slug forum.last_thread_date = thread.last forum.last_poster = thread.last_poster forum.last_poster_name = thread.last_poster_name forum.last_poster_slug = thread.last_poster_slug forum.save(force_update=True) load_monitor_fixture({ 'threads': 1, 'posts': 1, })
def load_fixtures(): load_monitor_fixture(monitor_fixtures) load_settings_fixture(settings_fixtures) rank_staff = Rank( name=_("Forum Team").message, title=_("Forum Team").message, style='staff', special=True, order=0, as_tab=True, ) rank_lurker = Rank( name=_("Lurker").message, style='lurker', order=1, criteria="100%" ) rank_member = Rank( name=_("Member").message, order=2, criteria="75%" ) rank_active = Rank( name=_("Most Valueable Posters").message, title=_("MVP").message, style='active', order=3, criteria="5%", as_tab=True, ) rank_staff.save(force_insert=True) rank_lurker.save(force_insert=True) rank_member.save(force_insert=True) rank_active.save(force_insert=True)
def load_fixtures(): load_monitor_fixture(monitor_fixtures)
def load_fixtures(): load_monitor_fixture({'bans_version': 0})