├── nablapps ├── __init__.py ├── com │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0008_auto_20201111_2046.py │ │ ├── 0004_compage_is_interest_group.py │ │ ├── 0003_auto_20151007_1436.py │ │ ├── 0006_auto_20191003_1624.py │ │ └── 0007_auto_20191003_1658.py │ ├── templates │ │ └── search │ │ │ └── indexes │ │ │ └── com │ │ │ └── com_text.txt │ ├── README.md │ ├── apps.py │ ├── search_indexes.py │ └── urls.py ├── contact │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── apps.py │ ├── templates │ │ └── contact │ │ │ ├── success.html │ │ │ ├── success_gullkorn.html │ │ │ └── rombooking.html │ └── urls.py ├── core │ ├── __init__.py │ ├── management │ │ ├── __init__.py │ │ └── commands │ │ │ └── __init__.py │ ├── templatetags │ │ ├── __init__.py │ │ ├── easy_thumbnails.py │ │ ├── search_include.py │ │ └── listutil.py │ ├── tests │ │ └── __init__.py │ ├── urls.py │ ├── README.md │ └── templates │ │ └── core │ │ └── general_about.html ├── events │ ├── models │ │ ├── event │ │ └── __init__.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_bedpres.py │ │ └── test_feed.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0009_remove_event_has_started.py │ │ ├── 0010_event_is_started.py │ │ ├── 0006_remove_event_view_counter.py │ │ ├── 0008_event_has_started.py │ │ ├── 0012_auto_20201021_2154.py │ │ ├── 0002_auto_20190205_1250.py │ │ ├── 0006_auto_20200629_1958.py │ │ ├── 0005_auto_20171017_0110.py │ │ ├── 0014_auto_20220702_1315.py │ │ ├── 0013_auto_20210909_2046.py │ │ ├── 0007_eventregistration_attendance_registration.py │ │ ├── 0004_news_ptr_to_id_20171006_1559.py │ │ └── 0005_20191018_modify_open_for.py │ ├── __init__.py │ ├── static │ │ └── events │ │ │ ├── upcoming_events.css │ │ │ └── event_administer.js │ ├── templates │ │ ├── events │ │ │ ├── includes │ │ │ │ ├── info_event.html │ │ │ │ └── info_bedpres.html │ │ │ ├── .DS_Store │ │ │ ├── radio_option.html │ │ │ ├── moved_to_attending_email.txt │ │ │ └── event_icalendar.ics │ │ └── search │ │ │ └── indexes │ │ │ └── events │ │ │ ├── event_text.txt │ │ │ └── newsarticle_text.txt │ ├── apps.py │ ├── search_indexes.py │ └── feeds.py ├── image │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── templatetags │ │ ├── __init__.py │ │ └── markdown.py │ ├── admin.py │ ├── templates │ │ └── content │ │ │ └── images │ │ │ ├── markdown_test.html │ │ │ └── render.html │ ├── models.py │ └── views.py ├── podcast │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0004_auto_20190205_1402.py │ │ ├── 0002_auto_20170920_1318.py │ │ └── 0007_podcast_short_title.py │ ├── templates │ │ └── search │ │ │ └── indexes │ │ │ └── podcast │ │ │ └── podcast_text.txt │ ├── static │ │ └── podcast │ │ │ └── podcast.css │ ├── urls.py │ ├── tests.py │ ├── search_indexes.py │ └── admin.py ├── vote │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0008_merge_20220211_0058.py │ │ ├── 0007_voting_is_preference_vote.py │ │ ├── 0009_votingevent_polling_period.py │ │ ├── 0007_alternative_is_winner.py │ │ ├── 0003_auto_20210210_2135.py │ │ ├── 0010_auto_20220215_1109.py │ │ ├── 0004_votingevent_eligible_group.py │ │ └── 0002_auto_20210203_1912.py │ ├── apps.py │ └── admin.py ├── accounts │ ├── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── test_extract_usernames.py │ ├── management │ │ ├── __init__.py │ │ └── commands │ │ │ ├── __init__.py │ │ │ └── list_groups.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0003_merge_20190123_2039.py │ │ ├── 0007_nablauser_darkmode.py │ │ ├── 0006_auto_20160202_2330.py │ │ ├── 0006_auto_20210413_1346.py │ │ ├── 0008_nablagroup_logo.py │ │ ├── 0003_auto_20150925_2315.py │ │ ├── 0004_auto_20150927_1840.py │ │ └── 0005_auto_20200827_1523.py │ ├── templates │ │ └── accounts │ │ │ ├── registration_email.txt │ │ │ ├── login.html │ │ │ ├── mail_list.html │ │ │ └── includes │ │ │ ├── user_small.html │ │ │ └── user_large.html │ ├── apps.py │ └── search_indexes.py ├── exchange │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0006_merge_20201023_1226.py │ │ ├── 0004_auto_20201021_2154.py │ │ ├── 0004_university_by.py │ │ ├── 0010_exchange_optional_email.py │ │ └── 0008_auto_20201104_2016.py │ ├── static │ │ └── exchange │ │ │ └── exchange.css │ ├── templates │ │ └── exchange │ │ │ └── info.html │ └── urls.py ├── interactive │ ├── __init__.py │ ├── tests │ │ └── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0014_merge_20191201_1159.py │ │ ├── 0022_auto_20220324_1730.py │ │ ├── 0025_auto_20220403_2011.py │ │ ├── 0020_result_submitted_at.py │ │ ├── 0023_result_python_version.py │ │ ├── 0009_auto_20190205_1416.py │ │ ├── 0010_auto_20190205_1436.py │ │ ├── 0003_adventcalendar_requires_login.py │ │ ├── 0016_placegrid_uncertainty.py │ │ ├── 0008_auto_20190104_0304.py │ │ ├── 0017_quiz_spoiler_text.py │ │ ├── 0002_auto_20171106_2322.py │ │ └── 0018_auto_20210909_2046.py │ ├── templatetags │ │ ├── __init__.py │ │ └── interactive_tags.py │ ├── forms │ │ ├── __init__.py │ │ └── color_picker.py │ ├── apps.py │ ├── templates │ │ └── interactive │ │ │ ├── code_golf_error.html │ │ │ ├── includes │ │ │ └── color_picker.html │ │ │ ├── user_test_result.html │ │ │ ├── quizreply_confirm_delete.html │ │ │ ├── quiz_list.html │ │ │ └── user_test_new.html │ ├── views │ │ ├── __init__.py │ │ ├── games.py │ │ ├── mixins.py │ │ └── color_picker.py │ ├── models │ │ └── __init__.py │ └── static │ │ └── interactive │ │ └── js │ │ └── advent_calendar.js ├── mailfeed │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0003_alter_mailfeed_options.py │ │ ├── 0004_subscription_email_hash.py │ │ ├── 0005_auto_20240110_1725.py │ │ └── 0002_auto_20240109_1653.py │ ├── tests.py │ ├── apps.py │ ├── templates │ │ └── mailfeed │ │ │ ├── msg.html │ │ │ ├── invalid_email.html │ │ │ ├── unsubscribe_mailfeed.html │ │ │ ├── subscribe_mailfeed.html │ │ │ ├── create_mailfeed.html │ │ │ └── mailfeed_list.html │ ├── admin.py │ └── urls.py ├── nabladet │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0008_remove_nablad_view_counter.py │ │ ├── 0002_nablad_thumbnail.py │ │ ├── 0012_auto_20201021_2154.py │ │ ├── 0007_auto_20171017_0140.py │ │ ├── 0003_nablad_is_public.py │ │ ├── 0010_nablad_file_nsfw.py │ │ └── 0006_news_ptr_to_id_20171006_1559.py │ ├── test_static │ │ └── test_nabla.pdf │ ├── templates │ │ └── search │ │ │ └── indexes │ │ │ └── nabladet │ │ │ └── nablad_text.txt │ ├── urls.py │ ├── search_indexes.py │ ├── pdfthumbnailer.py │ └── admin.py ├── nablaforum │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0007_auto_20200517_0659.py │ │ ├── 0006_auto_20200114_1954.py │ │ ├── 0004_thread_created.py │ │ └── 0002_add_created_datetime.py │ ├── apps.py │ ├── admin.py │ ├── urls.py │ ├── templates │ │ └── nablaforum │ │ │ └── create_channel.html │ └── exceptions.py ├── nablashop │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0004_auto_20220702_1315.py │ │ └── 0002_auto_20201021_2154.py │ ├── admin.py │ └── templatetags │ │ └── cart_template_tags.py ├── news │ ├── tests │ │ └── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0002_remove_news_allow_comments.py │ │ ├── 0014_remove_newsarticle_view_counter.py │ │ ├── 0017_auto_20201021_2154.py │ │ ├── 0016_auto_20190205_1300.py │ │ ├── 0008_news_object_id.py │ │ ├── 0004_auto_20171006_0006.py │ │ ├── 0012_auto_20171017_0114.py │ │ ├── 0003_auto_20171005_2335.py │ │ ├── 0009_set_object_id_from_news_id.py │ │ └── 0005_auto_20171006_0216.py │ ├── __init__.py │ ├── templates │ │ └── search │ │ │ └── indexes │ │ │ └── news │ │ │ └── newsarticle_text.txt │ ├── urls.py │ ├── apps.py │ ├── search_indexes.py │ ├── feeds.py │ ├── signals.py │ └── views.py ├── officeBeer │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ ├── 0003_description_fieldtype.py │ │ └── 0002_depositrequest_created.py │ ├── apps.py │ ├── templates │ │ └── officeBeer │ │ │ ├── radio_option.html │ │ │ └── deposit.html │ ├── urls.py │ └── admin.py ├── qrTickets │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ └── 0002_qrevent_nabla_event.py │ ├── apps.py │ ├── admin.py │ ├── templates │ │ └── qrTickets │ │ │ ├── email │ │ │ └── ticket.html │ │ │ ├── register.html │ │ │ ├── test.html │ │ │ ├── render.html │ │ │ ├── create_event.html │ │ │ └── event_list.html │ ├── serializers.py │ └── utils.py ├── album │ ├── migrations │ │ ├── __init__.py │ │ ├── 0004_remove_album_view_counter.py │ │ ├── 0003_albumimage_is_display_image.py │ │ └── 0005_auto_20200630_2211.py │ ├── __init__.py │ ├── templates │ │ ├── search │ │ │ └── indexes │ │ │ │ └── album │ │ │ │ └── album_text.txt │ │ └── album │ │ │ └── album_list.html │ ├── apps.py │ ├── urls.py │ └── search_indexes.py ├── apply_committee │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── apps.py │ ├── templates │ │ └── apply_committee │ │ │ ├── confirm.html │ │ │ └── application_list.html │ ├── admin.py │ └── urls.py ├── blog │ ├── migrations │ │ ├── __init__.py │ │ ├── 0003_remove_blogpost_view_counter.py │ │ └── 0002_20170920_1255_remove_allow_comments.py │ ├── __init__.py │ ├── templates │ │ └── search │ │ │ └── indexes │ │ │ └── blog │ │ │ └── blogpost_text.txt │ ├── apps.py │ ├── static │ │ └── blog │ │ │ └── blog.css │ ├── urls.py │ ├── admin.py │ └── search_indexes.py ├── jobs │ ├── migrations │ │ ├── __init__.py │ │ ├── 0010_auto_20201021_2154.py │ │ ├── 0002_auto_20170920_1310.py │ │ ├── 0008_auto_20171017_0111.py │ │ ├── 0009_company_ignorecrop.py │ │ └── 0006_auto_20171006_1559.py │ ├── templatetags │ │ ├── __init__.py │ │ └── jobs_filters.py │ ├── __init__.py │ ├── README.md │ ├── apps.py │ ├── templates │ │ └── jobs │ │ │ ├── below_ad_include.html │ │ │ └── jobs_detail.html │ ├── feeds.py │ └── forms.py ├── officeCalendar │ ├── __init__.py │ ├── migrations │ │ ├── __init__.py │ │ └── 0003_auto_20190330_1405.py │ ├── apps.py │ └── admin.py ├── poll │ ├── migrations │ │ ├── __init__.py │ │ ├── 0008_remove_poll_content_type.py │ │ ├── 0003_poll_randomise.py │ │ ├── 0006_auto_20150926_1409.py │ │ ├── 0004_poll_is_user_poll.py │ │ ├── 0005_auto_20150926_0938.py │ │ ├── 0002_poll_answer.py │ │ ├── 0002_auto_20150401_1806.py │ │ └── 0007_poll_content_type.py │ ├── __init__.py │ ├── apps.py │ ├── static │ │ └── poll │ │ │ └── poll_sidebar.css │ ├── forms.py │ ├── templates │ │ └── poll │ │ │ ├── poll_include_general.html │ │ │ ├── poll_include.html │ │ │ └── includes │ │ │ └── poll_result.html │ ├── urls.py │ └── context_processors.py └── meeting_records │ ├── migrations │ └── __init__.py │ ├── __init__.py │ ├── apps.py │ ├── urls.py │ └── admin.py ├── nablaweb ├── __init__.py ├── migrations │ └── __init__.py ├── settings │ ├── __init__.py │ ├── test.py │ └── README.md ├── wsgi.py └── README.md ├── templates ├── comments │ ├── base.html │ ├── posted.html │ ├── approved.html │ ├── deleted.html │ ├── flagged.html │ ├── list.html │ ├── flag.html │ ├── approve.html │ └── delete.html ├── search │ ├── indexes │ │ ├── com │ │ │ └── compage_text.txt │ │ └── accounts │ │ │ └── nablauser_text.txt │ └── includes │ │ ├── com │ │ └── compage.html │ │ ├── events │ │ ├── event.html~ │ │ └── event.html │ │ ├── nabladet │ │ └── nablad.html │ │ ├── generic │ │ └── generic.html │ │ └── podcast │ │ └── podcast.html ├── robots.txt ├── README.md ├── 404.html ├── base_no_sidebar.html ├── 403.html ├── 500.html ├── flatpages │ ├── custom.html │ ├── emptysidebar.html │ ├── english.html │ ├── newStudent.html │ └── default.html ├── admin │ └── base_site.html ├── form.html ├── content │ └── includes │ │ ├── comments.html │ │ └── sidebar-admin.html └── nablashop │ ├── includes │ └── category-sidebar.html │ └── purchase.html ├── .gitattributes ├── static ├── 404 │ ├── gaussnabla.png │ └── style.css ├── favicon.ico ├── img │ ├── Thumbs.db │ ├── CMR_logo.png │ ├── GB_flag.png │ ├── NOR_flag.png │ ├── NT_logo.png │ ├── bgnoise.png │ ├── favicon.ico │ ├── sponsorer.png │ ├── bedkomNabla.jpg │ ├── default_avatar.png │ ├── placelogo_alt.png │ ├── admin │ │ └── background.png │ ├── apple-touch-icon.png │ ├── kjeldsberg_logo.jpg │ ├── ntnu_card_number.png │ ├── komite-ikon │ │ ├── educom.png │ │ ├── fagkom.png │ │ ├── styret.png │ │ ├── alumnikom.png │ │ ├── kull1999.png │ │ ├── kull2000.png │ │ ├── kull2001.png │ │ ├── kull2002.png │ │ ├── kull2003.png │ │ ├── kull2004.png │ │ ├── kull2005.png │ │ ├── kull2006.png │ │ ├── kull2007.png │ │ ├── kull2008.png │ │ ├── kull2009.png │ │ ├── kull2010.png │ │ ├── kull2011.png │ │ ├── kull2012.png │ │ ├── kull2013.png │ │ ├── kull2014.png │ │ ├── kull2015.png │ │ ├── kullXXXX.psd │ │ ├── komponenter.png │ │ ├── redaksjonen.png │ │ ├── webkomitéen.png │ │ ├── kjellerstyret.png │ │ ├── arrangementkomiteen.png │ │ ├── nablad-redaksjonen.png │ │ └── bedriftskontakten nabla.png │ ├── wiki │ │ ├── toggle-small.png │ │ └── toggle-small-expand.png │ ├── glyphicons-halflings.png │ ├── apple-touch-icon-114x114.png │ ├── apple-touch-icon-72x72.png │ └── glyphicons-halflings-white.png ├── bn │ └── Graduated_Blue_Background.png ├── README.md └── css │ └── about.css ├── systemd ├── gunicorn.conf ├── update_index.sh ├── update_index.timer ├── update_index.service └── nablaweb.service ├── var └── README.md ├── manage.py ├── package.json ├── setup.cfg ├── .gitignore └── .pre-commit-config.yaml /nablapps/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablaweb/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/com/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/contact/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/events/models/event: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/image/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/podcast/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/vote/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/accounts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/events/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/exchange/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/interactive/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/mailfeed/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/nabladet/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/nablaforum/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/nablashop/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/news/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/officeBeer/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/qrTickets/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablaweb/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablaweb/settings/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/accounts/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/album/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/apply_committee/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/blog/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/com/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/core/management/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/core/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/events/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/image/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/interactive/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/jobs/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/jobs/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/news/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/officeCalendar/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/poll/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/vote/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/accounts/management/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/accounts/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/contact/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/exchange/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/image/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/interactive/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/mailfeed/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/nabladet/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/nablaforum/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/nablashop/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/officeBeer/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/podcast/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/qrTickets/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/apply_committee/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/core/management/commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/interactive/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/meeting_records/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/officeCalendar/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/accounts/management/commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/events/__init__.py: -------------------------------------------------------------------------------- 1 | """App for events""" 2 | -------------------------------------------------------------------------------- /nablapps/events/static/events/upcoming_events.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nablapps/core/tests/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = "hiasen" 2 | -------------------------------------------------------------------------------- /templates/comments/base.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | -------------------------------------------------------------------------------- /nablapps/blog/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | App for blogging 3 | """ 4 | -------------------------------------------------------------------------------- /nablapps/album/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | App for image albums 3 | """ 4 | -------------------------------------------------------------------------------- /nablapps/poll/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | App for poll voting 3 | """ 4 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | nablapps/interactive/static/interactive/js/skulpt-stdlib.js binary 2 | -------------------------------------------------------------------------------- /nablapps/meeting_records/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django app for meeting records 3 | """ 4 | -------------------------------------------------------------------------------- /nablapps/news/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | App for front page news and news articles 3 | """ 4 | -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/favicon.ico -------------------------------------------------------------------------------- /nablapps/com/templates/search/indexes/com/com_text.txt: -------------------------------------------------------------------------------- 1 | komite 2 | komité 3 | {{ object.name }} 4 | -------------------------------------------------------------------------------- /nablapps/jobs/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | App for listing ads for jobs for fysmat-students. 3 | """ 4 | -------------------------------------------------------------------------------- /nablapps/mailfeed/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /static/img/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/Thumbs.db -------------------------------------------------------------------------------- /nablapps/events/templates/events/includes/info_event.html: -------------------------------------------------------------------------------- 1 | {% extends "events/includes/info.html" %} 2 | -------------------------------------------------------------------------------- /static/img/CMR_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/CMR_logo.png -------------------------------------------------------------------------------- /static/img/GB_flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/GB_flag.png -------------------------------------------------------------------------------- /static/img/NOR_flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/NOR_flag.png -------------------------------------------------------------------------------- /static/img/NT_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/NT_logo.png -------------------------------------------------------------------------------- /static/img/bgnoise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/bgnoise.png -------------------------------------------------------------------------------- /static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/favicon.ico -------------------------------------------------------------------------------- /static/img/sponsorer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/sponsorer.png -------------------------------------------------------------------------------- /templates/search/indexes/com/compage_text.txt: -------------------------------------------------------------------------------- 1 | {{ object.com.name }} 2 | {{ object.description }} 3 | -------------------------------------------------------------------------------- /static/404/gaussnabla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/404/gaussnabla.png -------------------------------------------------------------------------------- /static/img/bedkomNabla.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/bedkomNabla.jpg -------------------------------------------------------------------------------- /static/img/default_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/default_avatar.png -------------------------------------------------------------------------------- /static/img/placelogo_alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/placelogo_alt.png -------------------------------------------------------------------------------- /templates/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /media/nabladet/ 3 | Disallow: /album/ 4 | crawl-delay: 3 5 | -------------------------------------------------------------------------------- /static/img/admin/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/admin/background.png -------------------------------------------------------------------------------- /static/img/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/apple-touch-icon.png -------------------------------------------------------------------------------- /static/img/kjeldsberg_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/kjeldsberg_logo.jpg -------------------------------------------------------------------------------- /static/img/ntnu_card_number.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/ntnu_card_number.png -------------------------------------------------------------------------------- /nablapps/interactive/forms/__init__.py: -------------------------------------------------------------------------------- 1 | from .color_picker import ColorChoiceForm 2 | 3 | __all__ = ["ColorChoiceForm"] 4 | -------------------------------------------------------------------------------- /static/img/komite-ikon/educom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/educom.png -------------------------------------------------------------------------------- /static/img/komite-ikon/fagkom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/fagkom.png -------------------------------------------------------------------------------- /static/img/komite-ikon/styret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/styret.png -------------------------------------------------------------------------------- /static/img/wiki/toggle-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/wiki/toggle-small.png -------------------------------------------------------------------------------- /nablapps/com/README.md: -------------------------------------------------------------------------------- 1 | # Komiteer (com) 2 | 3 | com-appen brukes for å vise sidene for de enkelte komiteene på nettsiden. 4 | -------------------------------------------------------------------------------- /static/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /static/img/komite-ikon/alumnikom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/alumnikom.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull1999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull1999.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2000.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2001.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2002.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2003.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2004.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2005.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2006.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2007.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2008.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2009.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2009.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2010.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2010.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2011.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2012.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2013.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2013.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2014.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2014.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kull2015.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kull2015.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kullXXXX.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kullXXXX.psd -------------------------------------------------------------------------------- /nablapps/podcast/templates/search/indexes/podcast/podcast_text.txt: -------------------------------------------------------------------------------- 1 | Skråttcast 2 | {{ object.title }} 3 | {{ object.description }} 4 | -------------------------------------------------------------------------------- /nablapps/vote/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class VoteConfig(AppConfig): 5 | name = "nablapps.vote" 6 | -------------------------------------------------------------------------------- /static/bn/Graduated_Blue_Background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/bn/Graduated_Blue_Background.png -------------------------------------------------------------------------------- /static/img/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /static/img/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /static/img/komite-ikon/komponenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/komponenter.png -------------------------------------------------------------------------------- /static/img/komite-ikon/redaksjonen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/redaksjonen.png -------------------------------------------------------------------------------- /static/img/komite-ikon/webkomitéen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/webkomitéen.png -------------------------------------------------------------------------------- /static/img/wiki/toggle-small-expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/wiki/toggle-small-expand.png -------------------------------------------------------------------------------- /nablapps/blog/templates/search/indexes/blog/blogpost_text.txt: -------------------------------------------------------------------------------- 1 | {{ object.title }} 2 | {{ object.content }} 3 | {{ object.created_by }} 4 | -------------------------------------------------------------------------------- /static/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /static/img/komite-ikon/kjellerstyret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/kjellerstyret.png -------------------------------------------------------------------------------- /nablapps/contact/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ContactConfig(AppConfig): 5 | name = "nablapps.contact" 6 | -------------------------------------------------------------------------------- /nablapps/events/templates/events/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/nablapps/events/templates/events/.DS_Store -------------------------------------------------------------------------------- /nablapps/nabladet/test_static/test_nabla.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/nablapps/nabladet/test_static/test_nabla.pdf -------------------------------------------------------------------------------- /systemd/gunicorn.conf: -------------------------------------------------------------------------------- 1 | bind = 'unix:/tmp/gunicorn_nabla_no.socket' 2 | timeout = 600 3 | workers = 4 4 | accesslog = "-" 5 | errorlog = "-" 6 | -------------------------------------------------------------------------------- /nablapps/mailfeed/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MailfeedConfig(AppConfig): 5 | name = "nablapps.mailfeed" 6 | -------------------------------------------------------------------------------- /nablapps/qrTickets/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class QrticketsConfig(AppConfig): 5 | name = "nablapps.qrTickets" 6 | -------------------------------------------------------------------------------- /nablaweb/settings/test.py: -------------------------------------------------------------------------------- 1 | from .production import * 2 | from .production import ALLOWED_HOSTS 3 | 4 | ALLOWED_HOSTS.append("testing.nabla.no") 5 | -------------------------------------------------------------------------------- /static/img/komite-ikon/arrangementkomiteen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/arrangementkomiteen.png -------------------------------------------------------------------------------- /static/img/komite-ikon/nablad-redaksjonen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/nablad-redaksjonen.png -------------------------------------------------------------------------------- /nablapps/mailfeed/templates/mailfeed/msg.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

{{ msg }}

5 | 6 | 7 | {% endblock %} -------------------------------------------------------------------------------- /nablapps/nablaforum/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class NablaforumConfig(AppConfig): 5 | name = "nablapps.nablaforum" 6 | -------------------------------------------------------------------------------- /nablapps/officeBeer/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class OfficebeerConfig(AppConfig): 5 | name = "nablapps.officeBeer" 6 | -------------------------------------------------------------------------------- /nablapps/exchange/static/exchange/exchange.css: -------------------------------------------------------------------------------- 1 | .sidebar_box { 2 | background-color: #F2F2F2; 3 | padding: 10px; 4 | margin-top: 20px; 5 | } 6 | -------------------------------------------------------------------------------- /static/img/komite-ikon/bedriftskontakten nabla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nabla-NTNU/nablaweb/HEAD/static/img/komite-ikon/bedriftskontakten nabla.png -------------------------------------------------------------------------------- /systemd/update_index.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Remember to run as user nablaweb 4 | 5 | cd /srv/nablaweb 6 | pipenv run python manage.py update_index 7 | -------------------------------------------------------------------------------- /nablapps/officeCalendar/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class OfficecalendarConfig(AppConfig): 5 | name = "nablapps.officeCalendar" 6 | -------------------------------------------------------------------------------- /templates/search/indexes/accounts/nablauser_text.txt: -------------------------------------------------------------------------------- 1 | {{ object.username }} 2 | {{ object.get_full_name }} 3 | {{ object.about }} 4 | {{ object.cell_phone }} 5 | -------------------------------------------------------------------------------- /nablapps/apply_committee/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ApplyCommitteeConfig(AppConfig): 5 | name = "nablapps.apply_committee" 6 | -------------------------------------------------------------------------------- /nablapps/com/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ComConfig(AppConfig): 5 | name = "nablapps.com" 6 | verbose_name = "Komiteer" 7 | -------------------------------------------------------------------------------- /nablapps/album/templates/search/indexes/album/album_text.txt: -------------------------------------------------------------------------------- 1 | {{ object.title }} 2 | {% for image in object.images.all %} 3 | {{ image.description }} 4 | {% endfor %} 5 | -------------------------------------------------------------------------------- /nablapps/events/templates/search/indexes/events/event_text.txt: -------------------------------------------------------------------------------- 1 | {{ object.headline }} 2 | {{ object.lead_paragraph }} 3 | {{ object.body }} 4 | {{ object.created_by }} 5 | -------------------------------------------------------------------------------- /nablapps/news/templates/search/indexes/news/newsarticle_text.txt: -------------------------------------------------------------------------------- 1 | {{ object.head_line }} 2 | {{ object.lead_paragraph }} 3 | {{ object.body }} 4 | {{ object.created_by }} 5 | -------------------------------------------------------------------------------- /nablapps/events/templates/search/indexes/events/newsarticle_text.txt: -------------------------------------------------------------------------------- 1 | {{ object.head_line }} 2 | {{ object.lead_paragraph }} 3 | {{ object.body }} 4 | {{ object.created_by }} 5 | -------------------------------------------------------------------------------- /nablapps/core/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from .views import AboutView 4 | 5 | urlpatterns = [ 6 | path("", AboutView.as_view(), name="om-nabla"), 7 | ] 8 | -------------------------------------------------------------------------------- /nablapps/accounts/templates/accounts/registration_email.txt: -------------------------------------------------------------------------------- 1 | Velkommen til som bruker på Nabla.no 2 | 3 | Brukernavn: {{username}} 4 | Passord: {{password}} 5 | 6 | 7 | Hilsen 8 | webkom 9 | -------------------------------------------------------------------------------- /nablapps/interactive/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class InteractiveConfig(AppConfig): 5 | name = "nablapps.interactive" 6 | verbose_name = "Interaktiv" 7 | -------------------------------------------------------------------------------- /systemd/update_index.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Update nablaweb DB daily 3 | 4 | [Timer] 5 | OnCalendar=daily 6 | Persistent=true 7 | 8 | [Install] 9 | WantedBy=timers.target 10 | -------------------------------------------------------------------------------- /nablapps/events/templates/events/radio_option.html: -------------------------------------------------------------------------------- 1 | {% include "django/forms/widgets/input.html" %} 2 | {{ widget.label }} 3 | -------------------------------------------------------------------------------- /systemd/update_index.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Updates nablaweb DB index 3 | 4 | [Service] 5 | User=nablaweb 6 | Group=webapps 7 | Type=oneshot 8 | ExecStart=/srv/nablaweb/systemd/update_index.sh 9 | -------------------------------------------------------------------------------- /nablapps/events/models/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Models for event app 3 | """ 4 | 5 | from .event import Event 6 | from .eventregistration import EventRegistration 7 | 8 | __all__ = ["Event", "EventRegistration"] 9 | -------------------------------------------------------------------------------- /nablapps/officeBeer/templates/officeBeer/radio_option.html: -------------------------------------------------------------------------------- 1 | {% include "django/forms/widgets/input.html" %} 2 | {{ widget.label }} 3 | -------------------------------------------------------------------------------- /nablapps/contact/templates/contact/success.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Takk{% endblock %} 4 | 5 | {% block content %} 6 |

Takk for tilbakemeldingen!

7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /nablapps/contact/templates/contact/success_gullkorn.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Takk{% endblock %} 4 | 5 | {% block content %} 6 |

Takk for gullkornet!

7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /nablapps/nabladet/templates/search/indexes/nabladet/nablad_text.txt: -------------------------------------------------------------------------------- 1 | {{ object.headline }} 2 | {{ object.lead_paragraph }} 3 | {{ object.body }} 4 | {{ object.pub_date|date:"Y M F" }} 5 | {{ object.get_model_name }} 6 | -------------------------------------------------------------------------------- /nablapps/qrTickets/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | from .models import QrEvent, QrTicket 5 | 6 | admin.site.register(QrEvent) 7 | admin.site.register(QrTicket) 8 | -------------------------------------------------------------------------------- /nablapps/qrTickets/templates/qrTickets/email/ticket.html: -------------------------------------------------------------------------------- 1 | {% load qr_code %} 2 | 3 |

Din billett:

4 | 5 | {% qr_from_text ticket_url size="M" image_format="png" %} 6 | 7 |

{{ ticket_url }}

8 | -------------------------------------------------------------------------------- /nablapps/nablaforum/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Channel, Message, Thread 4 | 5 | admin.site.register(Channel) 6 | admin.site.register(Thread) 7 | admin.site.register(Message) 8 | -------------------------------------------------------------------------------- /var/README.md: -------------------------------------------------------------------------------- 1 | Denne mappen er for variabelt innhold som ikke skal inn i repoet f.eks: 2 | 3 | * Database (sqlite) 4 | * Oppsamlede static filer (etter å ha kjørt manage.py staticcollect) 5 | * Mediafiler 6 | * Logg 7 | -------------------------------------------------------------------------------- /nablapps/interactive/forms/color_picker.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | 3 | from ..models import validate_color 4 | 5 | 6 | class ColorChoiceForm(forms.Form): 7 | color = forms.CharField(validators=[validate_color]) 8 | -------------------------------------------------------------------------------- /nablapps/vote/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Alternative, Voting, VotingEvent 4 | 5 | admin.site.register(Voting) 6 | admin.site.register(Alternative) 7 | admin.site.register(VotingEvent) 8 | -------------------------------------------------------------------------------- /nablapps/jobs/README.md: -------------------------------------------------------------------------------- 1 | # Stillingsannonser (jobs) 2 | 3 | Her kan man legge til bedrifter og stillingsannonser. I tillegg er det to modeller til i denne appen som implementerer M2M-felt i admin. En litt 4 | stygg hack, men det faar naa vaere. 5 | -------------------------------------------------------------------------------- /templates/README.md: -------------------------------------------------------------------------------- 1 | # Templates # 2 | 3 | Denne mappen inneholder templates som ikke tilhører noen spesiell app. Viktige templates å merke seg er: 4 | 5 | ### base.html ### 6 | Dette er hoveddesignet, med navbar, innholdsbokser og footer. 7 | -------------------------------------------------------------------------------- /nablapps/interactive/templates/interactive/code_golf_error.html: -------------------------------------------------------------------------------- 1 |

Beklager, feil output. Riktig svar er:

2 |
{{ correct }}
3 |

Ditt output:

4 |
{{ output }}
5 | 6 | 7 | -------------------------------------------------------------------------------- /templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

404

5 |

6 | Denne siden eksisterer dessverre ikke. Burde den vært her? Send en mail til webkom æt nabla dått ntnu dått no. 7 |

8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /templates/base_no_sidebar.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block main %} 3 | 4 |
5 | {% block content %} 6 | {% endblock content %} 7 |
{# end main row #} 8 | 9 | {% endblock main %} 10 | -------------------------------------------------------------------------------- /templates/403.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

403

5 |

6 | Du har ikke rettigheter til å se denne siden. Tror du dette er en feil? Send en mail til webkom æt nabla dått ntnu dått no. 7 |

8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /templates/500.html: -------------------------------------------------------------------------------- 1 |

500 - Oi da

2 |

3 | Her har det skjedd noe galt! Ta kontakt med webkom på webkom [Ætt] nabla.no, og fortell så detaljert 5 | som mulig hva du gjorde når dette skjedde. 6 | 7 |
8 |

9 | -------------------------------------------------------------------------------- /nablapps/jobs/apps.py: -------------------------------------------------------------------------------- 1 | """ 2 | Jobs app config 3 | """ 4 | 5 | from django.apps import AppConfig 6 | 7 | 8 | class JobsConfig(AppConfig): 9 | """Default jobs config""" 10 | 11 | name = "nablapps.jobs" 12 | verbose_name = "Stillingsannonser" 13 | -------------------------------------------------------------------------------- /nablapps/nablashop/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Category, Order, OrderProduct, Product 4 | 5 | admin.site.register(Product) 6 | admin.site.register(Category) 7 | admin.site.register(OrderProduct) 8 | admin.site.register(Order) 9 | -------------------------------------------------------------------------------- /nablapps/poll/apps.py: -------------------------------------------------------------------------------- 1 | """ 2 | App configs for poll app 3 | """ 4 | 5 | from django.apps import AppConfig 6 | 7 | 8 | class PollConfig(AppConfig): 9 | """Default poll config""" 10 | 11 | name = "nablapps.poll" 12 | verbose_name = "Avstemninger" 13 | -------------------------------------------------------------------------------- /templates/comments/posted.html: -------------------------------------------------------------------------------- 1 | {% extends "comments/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% trans "Thanks for commenting" %}.{% endblock %} 5 | 6 | {% block content %} 7 |

{% trans "Thank you for your comment" %}.

8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /nablapps/events/templates/events/includes/info_bedpres.html: -------------------------------------------------------------------------------- 1 | {% extends "events/includes/info.html" %} 2 | 3 | {% block more_info %} 4 | 5 | Bedrift 6 | {{ event.company }} 7 | 8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /nablaweb/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for nablaweb. 3 | """ 4 | 5 | import os 6 | 7 | from django.core.wsgi import get_wsgi_application 8 | 9 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nablaweb.settings.devel") 10 | application = get_wsgi_application() 11 | -------------------------------------------------------------------------------- /nablapps/blog/apps.py: -------------------------------------------------------------------------------- 1 | """ 2 | Define configurations for the app blog 3 | """ 4 | 5 | from django.apps import AppConfig 6 | 7 | 8 | class BlogConfig(AppConfig): 9 | """Default blog config""" 10 | 11 | name = "nablapps.blog" 12 | verbose_name = "Blogg" 13 | -------------------------------------------------------------------------------- /nablapps/events/apps.py: -------------------------------------------------------------------------------- 1 | """ 2 | App configs for event app 3 | """ 4 | 5 | from django.apps import AppConfig 6 | 7 | 8 | class EventsConfig(AppConfig): 9 | """Default events config""" 10 | 11 | name = "nablapps.events" 12 | verbose_name = "Arrangement" 13 | -------------------------------------------------------------------------------- /nablapps/jobs/templates/jobs/below_ad_include.html: -------------------------------------------------------------------------------- 1 | {% load humanize %} 2 | 3 |

Nyeste stillingsannonser

4 | 9 | -------------------------------------------------------------------------------- /templates/flatpages/custom.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load markdown %} 3 | {% load flatpages %} 4 | 5 | {% block title %} 6 | {{ flatpage.title }} 7 | {% endblock %} 8 | 9 | {% block main %} 10 | {{ flatpage.content|markdown:"unsafe"}} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /nablapps/mailfeed/templates/mailfeed/invalid_email.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

Ugyldig mailadresse

5 |

6 |
7 |

8 | Prøv igjen 9 | {% endblock %} -------------------------------------------------------------------------------- /nablapps/qrTickets/templates/qrTickets/register.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

Registrer billett

5 | 6 |
7 | {% csrf_token %} 8 | 9 |
10 | 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /nablapps/album/apps.py: -------------------------------------------------------------------------------- 1 | """ 2 | AppConfigs for album app 3 | """ 4 | 5 | from django.apps import AppConfig 6 | 7 | 8 | class AlbumConfig(AppConfig): 9 | """ 10 | Default appconfig for album app 11 | """ 12 | 13 | name = "nablapps.album" 14 | verbose_name = "Album" 15 | -------------------------------------------------------------------------------- /nablapps/interactive/templates/interactive/includes/color_picker.html: -------------------------------------------------------------------------------- 1 |
2 | {% csrf_token %} 3 | 4 | 5 |
6 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nablaweb.settings.devel") 7 | 8 | from django.core.management import execute_from_command_line 9 | 10 | execute_from_command_line(sys.argv) 11 | -------------------------------------------------------------------------------- /nablapps/blog/static/blog/blog.css: -------------------------------------------------------------------------------- 1 | .list-group-item p { 2 | overflow-wrap: break-word; 3 | } 4 | 5 | .blog-floating-image { 6 | max-width: 100%; 7 | float: right; 8 | } 9 | 10 | .blog-move-right { 11 | float: right; 12 | } 13 | 14 | .list-without-bullets { 15 | list-style: none; 16 | } -------------------------------------------------------------------------------- /templates/comments/approved.html: -------------------------------------------------------------------------------- 1 | {% extends "comments/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% trans "Thanks for approving" %}.{% endblock %} 5 | 6 | {% block content %} 7 |

{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.

8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /templates/comments/deleted.html: -------------------------------------------------------------------------------- 1 | {% extends "comments/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% trans "Thanks for removing" %}.{% endblock %} 5 | 6 | {% block content %} 7 |

{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.

8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /templates/comments/flagged.html: -------------------------------------------------------------------------------- 1 | {% extends "comments/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% trans "Thanks for flagging" %}.{% endblock %} 5 | 6 | {% block content %} 7 |

{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.

8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /nablapps/meeting_records/apps.py: -------------------------------------------------------------------------------- 1 | """ 2 | App configs for meeting records 3 | """ 4 | 5 | from django.apps import AppConfig 6 | 7 | 8 | class MeetingRecordsConfig(AppConfig): 9 | """Default app config for meeting_records""" 10 | 11 | name = "nablapps.meeting_records" 12 | verbose_name = "Referater" 13 | -------------------------------------------------------------------------------- /templates/comments/list.html: -------------------------------------------------------------------------------- 1 | {% load humanize %} 2 | {% load easy_thumbnails %} 3 | {% load markdown_deux_tags %} 4 | {% load static %} 5 | 6 | {% for comment in comment_list %} 7 |
8 | {% include "comments/comment_line.html" with user=comment.user comment_content=comment.comment%} 9 | 10 | {% endfor %} 11 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "dependencies": { 4 | "@fortawesome/fontawesome-free": "^5.14.0", 5 | "bootstrap": "^4.5.2", 6 | "jquery": "^3.5.1", 7 | "popper.js": "^1.16.1", 8 | "requirejs": "^2.3.6", 9 | "vue": "^3.0.0", 10 | "vue-qrcode-reader": "^2.3.13" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /templates/search/includes/com/compage.html: -------------------------------------------------------------------------------- 1 | {% load easy_thumbnails %} 2 | 3 | {% with result.object as com %} 4 | 9 | {% endwith %} 10 | -------------------------------------------------------------------------------- /nablapps/accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | name = "nablapps.accounts" 6 | verbose_name = "Brukerkontoer" 7 | 8 | def ready(self): 9 | super().ready() 10 | from .signals import register_signals 11 | 12 | register_signals() 13 | -------------------------------------------------------------------------------- /systemd/nablaweb.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=nablaweb daemon 3 | After=network.target 4 | 5 | [Service] 6 | User=nablaweb 7 | Group=webapps 8 | WorkingDirectory=/srv/nablaweb 9 | ExecStart=/var/websites/nablaweb/.pyenv/shims/pipenv run production 10 | StandardError=journal 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /nablapps/interactive/templates/interactive/user_test_result.html: -------------------------------------------------------------------------------- 1 | {% extends base_template %} 2 | {% load markdown %} 3 | 4 | {% block title %}{{ title }}{% endblock %} 5 | 6 | {% block content %} 7 | 8 |

{{ title }}

9 |
10 |

{{ content | markdown:"unsafe" }}

11 |
12 | 13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /nablapps/core/README.md: -------------------------------------------------------------------------------- 1 | # Core app for nablaweb 2 | 3 | Dette er en app for alt som ikke passer i en egen app. 4 | 5 | For eksempel: 6 | 7 | * Miksinner, kontekst prosessorer, templatetagger og andre ting som brukes flere steder i nablaweb. 8 | * Management-kommandoer som gjelder for hele nettsiden. 9 | * Forsideviewet ligger også her. 10 | -------------------------------------------------------------------------------- /nablapps/image/admin.py: -------------------------------------------------------------------------------- 1 | """ 2 | Admin for ContentImage 3 | """ 4 | 5 | from django.contrib import admin 6 | 7 | from .models import ContentImage 8 | 9 | 10 | @admin.register(ContentImage) 11 | class ContentImageAdmin(admin.ModelAdmin): 12 | """Admin interface for ContentImage""" 13 | 14 | list_display = ["id", "file", "image_thumb"] 15 | -------------------------------------------------------------------------------- /templates/flatpages/emptysidebar.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load markdown_deux_tags %} 3 | {% load flatpages %} 4 | 5 | {% block title %} 6 | {{ block.super }} - {{ flatpage.title }} 7 | {% endblock %} 8 | 9 | {% block content %} 10 |

{{ flatpage.title }}

11 | {{ flatpage.content|markdown:"unsafe"}} 12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /nablapps/podcast/static/podcast/podcast.css: -------------------------------------------------------------------------------- 1 | 2 | .banner-wrapper img { 3 | display: block; 4 | max-width: 750px; 5 | margin-bottom: 16px; 6 | } 7 | 8 | .logo-wrapper img { 9 | display: block; 10 | max-width: 350px; 11 | } 12 | 13 | audio { 14 | width: 100%; 15 | } 16 | 17 | .black-link, .black-link:hover { 18 | color: #000; 19 | } -------------------------------------------------------------------------------- /nablapps/qrTickets/templates/qrTickets/test.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load qr_code %} 3 | 4 | {% block content %} 5 |

QR-kodetest

6 | 7 | {% for string in string_list %} 8 | {% qr_from_text string size="T" image_format="png" %} 9 | {% endfor %} 10 | 11 | 12 | {% qr_from_text "nabla.no" size="T" image_format="png" %} 13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /nablapps/exchange/migrations/0006_merge_20201023_1226.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-10-23 12:26 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("exchange", "0004_auto_20201021_2154"), 9 | ("exchange", "0005_auto_20201021_2111"), 10 | ] 11 | 12 | operations = [] 13 | -------------------------------------------------------------------------------- /nablapps/interactive/migrations/0014_merge_20191201_1159.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.13 on 2019-12-01 11:59 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("interactive", "0013_santa_santacount"), 9 | ("interactive", "0013_colorchoice"), 10 | ] 11 | 12 | operations = [] 13 | -------------------------------------------------------------------------------- /nablapps/vote/migrations/0008_merge_20220211_0058.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.14 on 2022-02-11 00:58 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("vote", "0007_voting_is_preference_vote"), 9 | ("vote", "0007_alternative_is_winner"), 10 | ] 11 | 12 | operations = [] 13 | -------------------------------------------------------------------------------- /nablapps/news/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | Urls for news articles 3 | """ 4 | 5 | from django.urls import path 6 | 7 | from .views import NewsDetailView, NewsListView 8 | 9 | urlpatterns = [ 10 | path("", NewsListView.as_view(), name="news_list"), 11 | path( 12 | "//", 13 | NewsDetailView.as_view(), 14 | name="news_detail", 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /nablapps/interactive/views/__init__.py: -------------------------------------------------------------------------------- 1 | from .advent import AdventCalendarView, AdventDoorView 2 | from .color_picker import submitColorChoice 3 | from .quiz import QuizListView, QuizResultView, QuizView 4 | 5 | __all__ = [ 6 | "AdventCalendarView", 7 | "AdventDoorView", 8 | "submitColorChoice", 9 | "QuizListView", 10 | "QuizResultView", 11 | "QuizView", 12 | ] 13 | -------------------------------------------------------------------------------- /nablapps/nabladet/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | Urls for nabladet app 3 | """ 4 | 5 | from django.urls import path 6 | 7 | from .views import NabladDetailView, NabladList 8 | 9 | urlpatterns = [ 10 | path("", NabladList.as_view(), name="nablad_list"), 11 | path( 12 | "//", 13 | NabladDetailView.as_view(), 14 | name="nablad_detail", 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /nablapps/qrTickets/serializers.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | 3 | from nablapps.qrTickets.models import QrTicket 4 | 5 | 6 | class QrTicketSerializer(serializers.ModelSerializer): 7 | class Meta: 8 | model = QrTicket 9 | fields = ["registered", "email", "ticket_id"] 10 | read_only_fields = ["email", "ticket_id"] 11 | lookup_field = "ticket_id" 12 | -------------------------------------------------------------------------------- /nablapps/apply_committee/templates/apply_committee/confirm.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | {% block content %} 4 | Endre søknad 5 | 6 |

Din søknad

7 |
    8 | {% for application in applications %} 9 |
  1. {{ application.committee }}
  2. 10 | {% empty %} 11 | Du har ikke søkt. 12 | {% endfor %} 13 |
14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /nablapps/image/templates/content/images/markdown_test.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load markdown %} 3 | 4 | 5 | {% block content %} 6 |
7 | 8 | 9 | {% csrf_token %} 10 | 11 |
12 | {{ markdown_text|markdown }} 13 | 14 | {% endblock content %} 15 | -------------------------------------------------------------------------------- /nablapps/mailfeed/templates/mailfeed/unsubscribe_mailfeed.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

Slutt å abonner på {{ mailfeed.name }}

5 | 6 | 7 |
8 | {% csrf_token %} 9 | {{ unsubscribe_form.checkbox_field }} 10 |
11 |
12 | 13 |
14 | 15 | {% endblock %} -------------------------------------------------------------------------------- /nablapps/qrTickets/templates/qrTickets/render.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load qr_code %} 3 | 4 | {% block content %} 5 | 10 |

Din billett:

11 | 12 | {% for url in url_list %} 13 | {% qr_from_text url size="s" image_format="png" %} 14 | {% endfor %} 15 | 16 |

{{ ticket_url }}

17 | 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /templates/admin/base_site.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base.html" %} 2 | {% load i18n %} 3 | {% load static %} 4 | 5 | {% block title %}{{ title }} | {% trans 'Django site admin' %}{% endblock %} 6 | 7 | {% block branding %} 8 |

9 | 10 | Nabla 11 | 12 |

13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /templates/form.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load bootstrap4 %} 3 | 4 | {% block title %}{{ form.title }}{% endblock %} 5 | 6 | {% block content %} 7 | 8 |

{{ form.title }}

9 | 10 |
11 | {% csrf_token %} 12 | {% bootstrap_form form %} 13 | 14 |
15 | 16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /nablapps/com/search_indexes.py: -------------------------------------------------------------------------------- 1 | from haystack import indexes 2 | 3 | from .models import ComPage 4 | 5 | 6 | class ComIndex(indexes.SearchIndex, indexes.Indexable): 7 | text = indexes.CharField(document=True, use_template=True) 8 | name = indexes.CharField(model_attr="com__name") 9 | description = indexes.CharField(model_attr="description") 10 | 11 | def get_model(self): 12 | return ComPage 13 | -------------------------------------------------------------------------------- /nablapps/mailfeed/templates/mailfeed/subscribe_mailfeed.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

Abonner på {{ mailfeed.name }}

5 | 6 | 7 |
8 | {% csrf_token %} 9 |

Email

10 | {{ subscribe_form.email_field }} 11 |
12 |
13 | 14 |
15 | 16 | {% endblock %} -------------------------------------------------------------------------------- /nablapps/nablaforum/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from .views import BrowseChannelsView, CreateChannelView, MainView 4 | 5 | urlpatterns = [ 6 | path("//", MainView.as_view(), name="forum-main"), 7 | path("create_new_channel/", CreateChannelView.as_view(), name="create-channel"), 8 | path("browse_channels/", BrowseChannelsView.as_view(), name="browse-channels"), 9 | ] 10 | -------------------------------------------------------------------------------- /nablaweb/README.md: -------------------------------------------------------------------------------- 1 | # Konfigurasjon for nablaweb 2 | 3 | Her skal det ligge ting som har med konfigurasjon av nablaweb. 4 | For eksempel django-instillinger og url konfig. 5 | 6 | Tidligere var dette en django app i tillegg til django konfigurasjon, men alt som hadde med det å 7 | være en app og ting som ikke var konfigurasjon ble flyttet til nablapps.core. 8 | Dette var fordi det føltes mer logisk å ha alle appene i nablapps. 9 | -------------------------------------------------------------------------------- /templates/flatpages/english.html: -------------------------------------------------------------------------------- 1 | {% extends "flatpages/englishCustom.html" %} 2 | {% load static %} 3 | 4 | {% block flag %} 5 | 10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /nablapps/nablashop/templatetags/cart_template_tags.py: -------------------------------------------------------------------------------- 1 | from django import template 2 | 3 | from nablapps.nablashop.models import Order 4 | 5 | register = template.Library() 6 | 7 | 8 | @register.filter 9 | def cart_item_count(user): 10 | if user.is_authenticated: 11 | qs = Order.objects.filter(user=user, ordered=False) 12 | if qs.exists(): 13 | return qs[0].products.count() 14 | return 0 15 | -------------------------------------------------------------------------------- /nablapps/blog/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | Urls for blog app 3 | """ 4 | 5 | # from django.conf.urls import url 6 | from django.urls import path 7 | 8 | from .views import BlogListView, BlogPostView, BlogView 9 | 10 | urlpatterns = [ 11 | path("", BlogListView.as_view(), name="blog"), 12 | path("/", BlogView.as_view(), name="blog"), 13 | path("//", BlogPostView.as_view(), name="blog_post"), 14 | ] 15 | -------------------------------------------------------------------------------- /nablapps/image/models.py: -------------------------------------------------------------------------------- 1 | """ 2 | Contains a single model called ContentImage 3 | """ 4 | 5 | from nablapps.core.models import BaseImageModel 6 | 7 | 8 | class ContentImage(BaseImageModel): 9 | """ 10 | An image associated with some content 11 | """ 12 | 13 | class Meta: 14 | verbose_name = "Innholdsbilde" 15 | verbose_name_plural = "Innholdsbilder" 16 | db_table = "content_contentimage" 17 | -------------------------------------------------------------------------------- /nablapps/officeBeer/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | Urls for office beer 3 | """ 4 | 5 | from django.urls import path 6 | 7 | from .views import AccountView, DepositRequestView, PurchaseView 8 | 9 | urlpatterns = [ 10 | path("", AccountView.as_view(), name="officebeer_account"), 11 | path("purchase/", PurchaseView.as_view(), name="officebeer_purchase"), 12 | path("deposit/", DepositRequestView.as_view(), name="officebeer_deposit"), 13 | ] 14 | -------------------------------------------------------------------------------- /nablapps/podcast/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from .views import PodcastDetailView, RssView, SeasonView 4 | 5 | urlpatterns = [ 6 | path("", SeasonView.as_view(), name="season_view"), 7 | path("season/", SeasonView.as_view(), name="season_view"), 8 | path("/", PodcastDetailView.as_view(), name="podcast_detail"), 9 | path("subscribe.rss/", RssView.as_view(), name="season_rss"), 10 | ] 11 | -------------------------------------------------------------------------------- /nablapps/accounts/migrations/0003_merge_20190123_2039.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2019-01-23 20:39 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("accounts", "0002_auto_20181122_2012"), 11 | ("accounts", "0002_auto_20181122_1957"), 12 | ] 13 | 14 | operations = [] 15 | -------------------------------------------------------------------------------- /templates/content/includes/comments.html: -------------------------------------------------------------------------------- 1 | {% load comments %} 2 | 3 | 4 | {% get_comment_count for content as comment_count %} 5 | 6 |

Kommentarer

7 | 8 | {% render_comment_list for content %} 9 | 10 | {% if user.is_authenticated %} 11 | {% render_comment_form for content %} 12 | {% else %} 13 |
14 |

Logg inn for å skrive en kommentar

15 | {% endif %} 16 | -------------------------------------------------------------------------------- /nablapps/album/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | Urls for album app 3 | """ 4 | 5 | from django.urls import path 6 | 7 | from .views import AlbumImageView, AlbumList, AlbumOverview 8 | 9 | urlpatterns = [ 10 | path("", AlbumList.as_view(), name="albums"), 11 | path( 12 | "//", 13 | AlbumImageView.as_view(), 14 | name="album_image", 15 | ), 16 | path("/", AlbumOverview.as_view(), name="album"), 17 | ] 18 | -------------------------------------------------------------------------------- /nablapps/blog/admin.py: -------------------------------------------------------------------------------- 1 | """ 2 | Admin interface definitions for blog app 3 | """ 4 | 5 | from django.contrib import admin 6 | 7 | from nablapps.core.admin import ChangedByMixin 8 | 9 | from .models import Blog, BlogPost 10 | 11 | admin.site.register(Blog) 12 | 13 | 14 | @admin.register(BlogPost) 15 | class BlogPostAdmin(ChangedByMixin, admin.ModelAdmin): 16 | """Admin interface for blog posts""" 17 | 18 | ordering = ["-created_date"] 19 | -------------------------------------------------------------------------------- /nablapps/news/apps.py: -------------------------------------------------------------------------------- 1 | """ 2 | This module contains the AppConfig for the news app. 3 | """ 4 | 5 | from django.apps import AppConfig 6 | 7 | 8 | class NewsConfig(AppConfig): 9 | """Configuration for news-app""" 10 | 11 | name = "nablapps.news" 12 | verbose_name = "Nyheter" 13 | 14 | def ready(self): 15 | # import from signals in order to register the callbacks 16 | from .signals import callback as _ # noqa: F401 17 | -------------------------------------------------------------------------------- /nablapps/events/migrations/0009_remove_event_has_started.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-09-04 18:43 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("events", "0008_event_has_started"), 9 | ] 10 | 11 | operations = [ 12 | migrations.RemoveField( 13 | model_name="event", 14 | name="has_started", 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /nablapps/album/migrations/0004_remove_album_view_counter.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.5 on 2019-02-05 13:10 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("album", "0003_albumimage_is_display_image"), 9 | ] 10 | 11 | operations = [ 12 | migrations.RemoveField( 13 | model_name="album", 14 | name="view_counter", 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /nablapps/meeting_records/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | Urls for meeting_records app 3 | """ 4 | 5 | from django.urls import path 6 | 7 | from .views import MeetingRecordDetailView, MeetingRecordListView 8 | 9 | urlpatterns = [ 10 | path("/", MeetingRecordListView.as_view(), name="meeting_record_list"), 11 | path( 12 | "//", 13 | MeetingRecordDetailView.as_view(), 14 | name="meetingrecord_detail", 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /nablapps/podcast/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | from .models import Podcast, Season 4 | 5 | 6 | class PodcastBaseTests(TestCase): 7 | def test_creation(self): 8 | season = Season() 9 | season.number = 1 10 | season.save() 11 | podcast = Podcast() 12 | podcast.title = "Test" 13 | podcast.season = season 14 | podcast.description = "Description of podcast" 15 | podcast.save() 16 | -------------------------------------------------------------------------------- /templates/search/includes/events/event.html~: -------------------------------------------------------------------------------- 1 | {% load easy_thumbnails %} 2 | 3 | {% with result.object as event %} 4 | 12 | {% endwith %} 13 | -------------------------------------------------------------------------------- /nablapps/blog/migrations/0003_remove_blogpost_view_counter.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.5 on 2019-02-05 13:29 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("blog", "0002_20170920_1255_remove_allow_comments"), 9 | ] 10 | 11 | operations = [ 12 | migrations.RemoveField( 13 | model_name="blogpost", 14 | name="view_counter", 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /nablapps/interactive/templates/interactive/quizreply_confirm_delete.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}{{ quiz.title }}{% endblock %} 4 | 5 | {% block content %} 6 |
{% csrf_token %} 7 |

Er du sikker på at du vil slette svaret ditt?

8 | 12 |
13 | 14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /nablapps/interactive/views/games.py: -------------------------------------------------------------------------------- 1 | from django.views.generic import ListView 2 | 3 | from braces.views import FormMessagesMixin, LoginRequiredMixin 4 | 5 | from nablapps.interactive.models.games import Game 6 | 7 | 8 | class GamesList(LoginRequiredMixin, ListView): 9 | """List of games""" 10 | 11 | model = Game 12 | context_object_name = "games_list" 13 | template_name = "games_list.html" 14 | paginate_by = 8 15 | queryset = Game.objects.all() 16 | -------------------------------------------------------------------------------- /nablapps/nabladet/search_indexes.py: -------------------------------------------------------------------------------- 1 | """ 2 | Haystack search indexes for nablad 3 | """ 4 | 5 | from haystack import indexes 6 | 7 | from .models import Nablad 8 | 9 | 10 | class NabladIndex(indexes.SearchIndex, indexes.Indexable): 11 | """Nablad search index""" 12 | 13 | text = indexes.CharField(document=True, use_template=True) 14 | get_model_name = indexes.CharField(model_attr="get_model_name") 15 | 16 | def get_model(self): 17 | return Nablad 18 | -------------------------------------------------------------------------------- /nablapps/apply_committee/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Application, ApplicationRound, Committee 4 | 5 | 6 | @admin.register(ApplicationRound) 7 | class ApplicationRoundAdmin(admin.ModelAdmin): 8 | list_display = ("name", "is_active") 9 | 10 | 11 | @admin.register(Committee) 12 | class CommitteeAdmin(admin.ModelAdmin): 13 | pass 14 | 15 | 16 | @admin.register(Application) 17 | class Application(admin.ModelAdmin): 18 | pass 19 | -------------------------------------------------------------------------------- /nablapps/events/static/events/event_administer.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | // Select all checboxes in registrationTable 3 | $( '#registrationTable .toggle-all' ).click( function () { 4 | $('#registrationTable input[type="checkbox"]' ).prop('checked', this.checked); 5 | }) 6 | }); 7 | 8 | function copy_mail_list(){ 9 | let textarea = document.getElementById("epostliste-text"); 10 | textarea.select(); 11 | document.execCommand("copy"); 12 | } 13 | -------------------------------------------------------------------------------- /nablapps/qrTickets/templates/qrTickets/create_event.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

Opprett qr-event

5 | 6 | 7 |
8 | {% csrf_token %} 9 |

Tilhørende arrangement (ikke påkrevd):

10 | {{ event_form.nabla_event_field }} 11 |
12 |

Navn:

13 | {{ event_form.event_name_field }} 14 |
15 | 16 |
17 | 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | exclude = migrations 3 | ignore = E203, E231, E266, E501, W503, F403, F401, C901 4 | max-line-length = 88 5 | max-complexity = 18 6 | select = B,C,E,F,W,T4,B9 7 | 8 | [isort] 9 | multi_line_output=3 10 | include_trailing_comma=True 11 | force_grid_wrap=0 12 | use_parentheses=True 13 | line_length=88 14 | default_section=THIRDPARTY 15 | known_first_party=nablapps 16 | known_django=django 17 | sections=FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER 18 | -------------------------------------------------------------------------------- /static/README.md: -------------------------------------------------------------------------------- 1 | # Static # 2 | 3 | Om admin-delen mangler bilder, er kanskje symlinken til admin-static-filene 4 | feil. Da må du gjøre noe lignende dette: 5 | 6 | rm -r admin 7 | ln -s /usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/admin . 8 | 9 | 10 | Denne mappen inneholder statiske filer, som er tilgjengelige mot web på 11 | f.eks. /static/. 12 | 13 | Kun små filer skal puttes i denne mappen. Store mediefiler skal ikke puttes i repositoriet! 14 | 15 | -------------------------------------------------------------------------------- /templates/search/includes/nabladet/nablad.html: -------------------------------------------------------------------------------- 1 | {% load easy_thumbnails %} 2 | 3 | {% with result.object as nablad %} 4 | 12 | {% endwith %} 13 | -------------------------------------------------------------------------------- /nablapps/com/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from django.views.generic import RedirectView 3 | 4 | from .views import CommitteeOverview, ShowBoard, ShowPage 5 | 6 | urlpatterns = [ 7 | path("komiteer", CommitteeOverview.as_view(), name="committee_overview"), 8 | path("", RedirectView.as_view(url="/", permanent=True)), 9 | path("/", ShowPage.as_view(), name="show_com_page"), 10 | path("om//", ShowBoard.as_view(), name="show-board-page"), 11 | ] 12 | -------------------------------------------------------------------------------- /nablapps/interactive/migrations/0022_auto_20220324_1730.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.14 on 2022-03-24 17:30 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("interactive", "0021_codegolf_result_unique"), 9 | ] 10 | 11 | operations = [ 12 | migrations.RemoveConstraint( 13 | model_name="result", 14 | name="code_golf_result_unique_task_user", 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /nablapps/podcast/search_indexes.py: -------------------------------------------------------------------------------- 1 | from haystack import indexes 2 | 3 | from .models import Podcast 4 | 5 | 6 | class PodcastIndex(indexes.SearchIndex, indexes.Indexable): 7 | title = indexes.CharField(model_attr="title") 8 | description = indexes.CharField(model_attr="description") 9 | pub_date = indexes.DateTimeField(model_attr="pub_date") 10 | text = indexes.CharField(document=True, use_template=True) 11 | 12 | def get_model(self): 13 | return Podcast 14 | -------------------------------------------------------------------------------- /nablapps/jobs/templatetags/jobs_filters.py: -------------------------------------------------------------------------------- 1 | """ 2 | Templatetags used in jobs app 3 | """ 4 | 5 | from django import template 6 | 7 | register = template.Library() 8 | 9 | 10 | @register.filter 11 | def commas_no(qset): 12 | """Formats a queryset as a list seperated by commas and "og" at the end.""" 13 | string_list = list(map(str, qset)) 14 | if len(string_list) < 2: 15 | return "".join(string_list) 16 | return f"{', '.join(string_list[:-1])} og {string_list[-1]}" 17 | -------------------------------------------------------------------------------- /nablapps/image/views.py: -------------------------------------------------------------------------------- 1 | """ 2 | Views for image app 3 | """ 4 | 5 | from django.shortcuts import render 6 | 7 | 8 | def view_markdown(request): 9 | """ 10 | View for testing the custom markdown filter 11 | 12 | It is not meant for production, just for testing and debugging the markdown filter. 13 | """ 14 | return render( 15 | request, 16 | "content/images/markdown_test.html", 17 | {"markdown_text": request.POST.get("markdown_text", "")}, 18 | ) 19 | -------------------------------------------------------------------------------- /nablapps/mailfeed/templates/mailfeed/create_mailfeed.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

Opprett en mailfeed

5 | 6 | Tilbake 7 |

8 |
9 |

10 |
11 | {% csrf_token %} 12 |

Navn:

13 | {{ mailfeed_form.name_field }} 14 |
15 | 16 |
17 | 18 | {% endblock %} -------------------------------------------------------------------------------- /nablapps/nablaforum/templates/nablaforum/create_channel.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load sekizai_tags %} 3 | {% load static %} 4 | 5 | {% block main %} 6 | 7 | {% addtoblock "css" %} 8 | 9 | {% endaddtoblock %} 10 | 11 |

Opprett en ny kanal:

12 |
13 | {% csrf_token %} 14 | {{ form.as_p }} 15 | 16 |
17 | 18 | {% endblock main %} 19 | -------------------------------------------------------------------------------- /nablapps/events/migrations/0010_event_is_started.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-09-04 19:00 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("events", "0009_remove_event_has_started"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="event", 14 | name="is_started", 15 | field=models.BooleanField(default=False), 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /nablapps/events/search_indexes.py: -------------------------------------------------------------------------------- 1 | """ 2 | Haystack search indexes for events-app 3 | """ 4 | 5 | from haystack import indexes 6 | 7 | from .models import Event 8 | 9 | 10 | class EventIndex(indexes.SearchIndex, indexes.Indexable): 11 | """Search index for Event-model""" 12 | 13 | text = indexes.CharField(document=True, use_template=True) 14 | 15 | def get_model(self): 16 | return Event 17 | 18 | def index_queryset(self, using=None): 19 | return self.get_model().objects.all() 20 | -------------------------------------------------------------------------------- /nablapps/image/templates/content/images/render.html: -------------------------------------------------------------------------------- 1 | {% spaceless %} 2 |
4 | 5 | {{ revision.get_filename }} 6 | 7 |
8 | {{ caption|safe }} 9 |
10 |
11 | {% endspaceless %} 12 | -------------------------------------------------------------------------------- /nablapps/image/templatetags/markdown.py: -------------------------------------------------------------------------------- 1 | """ 2 | Markdown template tag 3 | """ 4 | 5 | from django import template 6 | from django.template.defaultfilters import stringfilter 7 | from django.utils.safestring import mark_safe 8 | 9 | from ..markdownprocessing import content_markdown 10 | 11 | register = template.Library() 12 | 13 | 14 | @register.filter 15 | @stringfilter 16 | def markdown(value, option=""): 17 | """Template tag for processing markdown""" 18 | return mark_safe(content_markdown(value)) 19 | -------------------------------------------------------------------------------- /nablapps/mailfeed/migrations/0003_alter_mailfeed_options.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.22 on 2024-01-09 18:35 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("mailfeed", "0002_auto_20240109_1653"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterModelOptions( 13 | name="mailfeed", 14 | options={"permissions": [("generate_mailfeeds", "can generate mailfeeds")]}, 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /nablapps/mailfeed/templates/mailfeed/mailfeed_list.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

Administrer Mailfeeder

5 | 6 | Opprett ny Mailfeed 7 | 8 |

Mailfeeder

9 | 14 | 15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /nablapps/interactive/migrations/0025_auto_20220403_2011.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.14 on 2022-04-03 20:11 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("interactive", "0024_result_length"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterField( 13 | model_name="result", 14 | name="python_version", 15 | field=models.CharField(max_length=15), 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /nablapps/interactive/views/mixins.py: -------------------------------------------------------------------------------- 1 | from django.http import HttpResponseForbidden 2 | 3 | 4 | class ObjectOwnerMixin(object): 5 | """ 6 | Stops the view from being executed for users other than the owner 7 | """ 8 | 9 | def dispatch(self, request, *args, **kwargs): 10 | user = request.user 11 | obj = self.get_object() 12 | if obj.user == user: 13 | return super().dispatch(request, *args, **kwargs) 14 | else: 15 | return HttpResponseForbidden() 16 | -------------------------------------------------------------------------------- /nablapps/nablaforum/exceptions.py: -------------------------------------------------------------------------------- 1 | """Exceptions for forum""" 2 | 3 | 4 | class ForumException(Exception): 5 | """Base exception""" 6 | 7 | 8 | class ThreadCreationException(ForumException): 9 | """Raised when creation of a new forum thread fails.""" 10 | 11 | 12 | class MessageCreationException(ForumException): 13 | """Raised when creation of a new forum message fails.""" 14 | 15 | 16 | class ChannelCreationException(ForumException): 17 | """Raised when creation of a new forum channel fails.""" 18 | -------------------------------------------------------------------------------- /nablapps/news/migrations/0002_remove_news_allow_comments.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-09-20 12:44 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("news", "0001_initial"), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name="news", 16 | name="allow_comments", 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /templates/search/includes/events/event.html: -------------------------------------------------------------------------------- 1 | {% load easy_thumbnails %} 2 | 3 | {% with result.object as event %} 4 | 11 | {% endwith %} 12 | -------------------------------------------------------------------------------- /nablapps/meeting_records/admin.py: -------------------------------------------------------------------------------- 1 | """ 2 | Admin interface for meeting record app 3 | """ 4 | 5 | from django.contrib import admin 6 | 7 | from nablapps.core.admin import ChangedByMixin 8 | 9 | from .models import MeetingRecord 10 | 11 | 12 | @admin.register(MeetingRecord) 13 | class MeetingRecordAdmin(ChangedByMixin, admin.ModelAdmin): 14 | """Admin interface for MeetingRecord model""" 15 | 16 | fields = ("title", "slug", "description", "pub_date", "file") 17 | prepopulated_fields = {"slug": ("title",)} 18 | -------------------------------------------------------------------------------- /nablapps/poll/migrations/0008_remove_poll_content_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.3 on 2016-04-02 16:27 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("poll", "0007_poll_content_type"), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name="poll", 16 | name="content_type", 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /nablapps/blog/migrations/0002_20170920_1255_remove_allow_comments.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-09-20 12:55 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("blog", "0001_initial"), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name="blogpost", 16 | name="allow_comments", 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /nablapps/events/migrations/0006_remove_event_view_counter.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-10-26 13:50 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("events", "0005_auto_20171017_0110"), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name="event", 16 | name="view_counter", 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /nablapps/qrTickets/templates/qrTickets/event_list.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |

Administrer QR-billetter

5 | 6 | Opprett nytt QR-arrangement 7 | 8 |

Arrangementer med QR-billetter:

9 |
    10 | {% for event in object_list %} 11 |
  • {{ event }}
  • 12 | {% endfor %} 13 |
14 | 15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /nablapps/events/migrations/0008_event_has_started.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-09-02 20:25 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("events", "0007_eventregistration_attendance_registration"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="event", 14 | name="has_started", 15 | field=models.BooleanField(default=False), 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /nablapps/nabladet/migrations/0008_remove_nablad_view_counter.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-11-06 23:21 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("nabladet", "0007_auto_20171017_0140"), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name="nablad", 16 | name="view_counter", 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /nablapps/accounts/templates/accounts/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load bootstrap4 %} 3 | 4 | {% block title %}Logg inn{% endblock %} 5 | 6 | {% block content %} 7 |
8 | {% csrf_token %} 9 | 10 | {% bootstrap_form form %} 11 | 12 |

Har du glemt passordet ditt?

13 |
14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /nablapps/interactive/templatetags/interactive_tags.py: -------------------------------------------------------------------------------- 1 | """ 2 | Tags for interactive 3 | """ 4 | 5 | from django import template 6 | 7 | from ..models.place import time_of_last_action 8 | 9 | register = template.Library() 10 | 11 | 12 | @register.filter 13 | def timestamp_of_last_action(user, grid): 14 | """ 15 | Template filter implementing `time_of_last_action` from 16 | models/place.py. 17 | """ 18 | if not user.is_authenticated: 19 | return 0 20 | return time_of_last_action(user, grid).timestamp() 21 | -------------------------------------------------------------------------------- /nablapps/news/migrations/0014_remove_newsarticle_view_counter.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-10-26 13:51 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("news", "0013_auto_20171017_0144"), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name="newsarticle", 16 | name="view_counter", 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /nablapps/accounts/migrations/0007_nablauser_darkmode.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.14 on 2022-09-02 08:43 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("accounts", "0006_auto_20210413_1346"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="nablauser", 14 | name="darkmode", 15 | field=models.BooleanField(default=False, verbose_name="darkmode"), 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /nablapps/accounts/templates/accounts/mail_list.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block title %} 3 | Mailingliste for {{ groups.0.name }}{% if groups.1 %} m.fl.{% endif %} 4 | {% endblock %} 5 | {% block content %} 6 |

{% for group in groups %}{% if not forloop.first %}, {% endif %}{{ group.name }}{% endfor %}

7 |

{{ group.mail_list }}

8 | 9 | {%endblock%} 10 | -------------------------------------------------------------------------------- /nablapps/nabladet/migrations/0002_nablad_thumbnail.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("nabladet", "0001_initial"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="nablad", 15 | name="thumbnail", 16 | field=models.FileField(editable=False, upload_to="", null=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /nablapps/apply_committee/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | # This file is included from main url.py under url '^application/' 6 | urlpatterns = [ 7 | path("", views.ApplicationView.as_view(), name="apply-committee"), 8 | path( 9 | "list/", 10 | views.AdminApplicationListView.as_view(), 11 | name="list-applicants", 12 | ), 13 | path("confirmation/", views.ConfirmView.as_view(), name="confirm"), 14 | path("list/export.csv/", views.generate_csv, name="csv"), 15 | ] 16 | -------------------------------------------------------------------------------- /nablapps/vote/migrations/0007_voting_is_preference_vote.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.14 on 2022-02-10 22:15 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("vote", "0006_auto_20220210_2046"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="voting", 14 | name="is_preference_vote", 15 | field=models.BooleanField(default=False, verbose_name="Preferansevalg"), 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /nablapps/exchange/templates/exchange/info.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html"%} 2 | {% load markdown %} 3 | 4 | {% block content %} 5 | 6 |
7 | {{ object.body|markdown }} 8 | 9 | {% with univ=object.ex.univ %} 10 | 15 | {% endwith %} 16 | 17 |
18 | 19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /nablapps/vote/migrations/0009_votingevent_polling_period.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.14 on 2022-02-11 17:49 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("vote", "0008_merge_20220211_0058"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="votingevent", 14 | name="polling_period", 15 | field=models.IntegerField(default=2000, verbose_name="Polling interval"), 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /nablapps/events/migrations/0012_auto_20201021_2154.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-10-21 21:54 2 | 3 | from django.db import migrations 4 | 5 | import ckeditor.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("events", "0011_auto_20200909_1636"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="event", 16 | name="body", 17 | field=ckeditor.fields.RichTextField(blank=True, verbose_name="brødtekst"), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /nablapps/interactive/migrations/0020_result_submitted_at.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2021-11-18 21:22 2 | 3 | import django.utils.timezone 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("interactive", "0019_game"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="result", 15 | name="submitted_at", 16 | field=models.DateTimeField(default=django.utils.timezone.now), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /nablapps/jobs/migrations/0010_auto_20201021_2154.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-10-21 21:54 2 | 3 | from django.db import migrations 4 | 5 | import ckeditor.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("jobs", "0009_company_ignorecrop"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="advert", 16 | name="body", 17 | field=ckeditor.fields.RichTextField(blank=True, verbose_name="brødtekst"), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /nablapps/nabladet/migrations/0012_auto_20201021_2154.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-10-21 21:54 2 | 3 | from django.db import migrations 4 | 5 | import ckeditor.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("nabladet", "0011_protect_nablad"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="nablad", 16 | name="body", 17 | field=ckeditor.fields.RichTextField(blank=True, verbose_name="brødtekst"), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /nablapps/news/migrations/0017_auto_20201021_2154.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-10-21 21:54 2 | 3 | from django.db import migrations 4 | 5 | import ckeditor.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("news", "0016_auto_20190205_1300"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="newsarticle", 16 | name="body", 17 | field=ckeditor.fields.RichTextField(blank=True, verbose_name="brødtekst"), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /nablapps/accounts/templates/accounts/includes/user_small.html: -------------------------------------------------------------------------------- 1 | {% load easy_thumbnails %} 2 | {% load static %} 3 | 4 | avatar 10 | 11 | -------------------------------------------------------------------------------- /nablapps/core/templatetags/easy_thumbnails.py: -------------------------------------------------------------------------------- 1 | # pylint: disable=W0614,wildcard-import 2 | """ 3 | A hack to be able to load easy_thumbnails templatetags using 4 | {% load easy_thumbnails %} 5 | instead of 6 | {% lead thumbnail %}. 7 | 8 | The reason for doing this is that sorl.thumbnail and easy_thumbnails both 9 | name their templatetag module 'thumbnail' and one gets conflicts. 10 | The reason for using both thumbnail libraries is that they are used in different apps on pypi. 11 | """ 12 | 13 | from easy_thumbnails.templatetags.thumbnail import * # noqa: F401, F403 14 | -------------------------------------------------------------------------------- /nablapps/interactive/migrations/0023_result_python_version.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.14 on 2022-03-24 22:43 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("interactive", "0022_auto_20220324_1730"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="result", 14 | name="python_version", 15 | field=models.TextField(default="python2.7"), 16 | preserve_default=False, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /nablapps/poll/migrations/0003_poll_randomise.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2021-10-07 21:12 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("poll", "0002_poll_answer"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="poll", 14 | name="randomise", 15 | field=models.BooleanField( 16 | default=True, verbose_name="Tilfeldig rekkefølge på valg?" 17 | ), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /nablapps/exchange/migrations/0004_auto_20201021_2154.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-10-21 21:54 2 | 3 | from django.db import migrations 4 | 5 | import ckeditor.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("exchange", "0003_exchangenewsarticle"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="exchangenewsarticle", 16 | name="body", 17 | field=ckeditor.fields.RichTextField(blank=True, verbose_name="brødtekst"), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /nablapps/mailfeed/migrations/0004_subscription_email_hash.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.23 on 2024-01-10 16:49 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("mailfeed", "0003_alter_mailfeed_options"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="subscription", 14 | name="email_hash", 15 | field=models.CharField(default="asdf", max_length=100), 16 | preserve_default=False, 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /nablapps/news/migrations/0016_auto_20190205_1300.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.5 on 2019-02-05 13:00 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("news", "0015_auto_20180922_1915"), 9 | ] 10 | 11 | operations = [ 12 | migrations.RemoveField( 13 | model_name="newsarticle", 14 | name="publication_date", 15 | ), 16 | migrations.RemoveField( 17 | model_name="newsarticle", 18 | name="published", 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /nablapps/podcast/migrations/0004_auto_20190205_1402.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.5 on 2019-02-05 14:02 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("podcast", "0003_auto_20171026_1258"), 9 | ] 10 | 11 | operations = [ 12 | migrations.RemoveField( 13 | model_name="podcast", 14 | name="publication_date", 15 | ), 16 | migrations.RemoveField( 17 | model_name="podcast", 18 | name="published", 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /nablapps/poll/migrations/0006_auto_20150926_1409.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("poll", "0005_auto_20150926_0938"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name="poll", 15 | options={ 16 | "verbose_name": "Avstemning", 17 | "verbose_name_plural": "Avstemninger", 18 | }, 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Secrets are stored here 2 | .env 3 | 4 | # Bytecode 5 | *.pyc 6 | 7 | # Vim swap files 8 | *.swp 9 | *.swo 10 | 11 | # Backup 12 | *~ 13 | 14 | # Personlige settings 15 | nablaweb/settings/local.py 16 | 17 | # Egen mappe for variabelt innhold (media, log, database etc. 18 | var/ 19 | 20 | # Virtualenv 21 | venv/ 22 | 23 | # Bower-components 24 | bower_components 25 | 26 | node_modules 27 | 28 | .idea 29 | requirements/build 30 | sqlite.db 31 | .vscode 32 | 33 | # Local pyenv version file 34 | .python-version 35 | 36 | # Private keys / data 37 | lib/privateKey.json 38 | -------------------------------------------------------------------------------- /nablapps/events/migrations/0002_auto_20190205_1250.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.5 on 2019-02-05 12:50 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("events", "0001_squashed_0007_auto_20190110_1749"), 9 | ] 10 | 11 | operations = [ 12 | migrations.RemoveField( 13 | model_name="event", 14 | name="publication_date", 15 | ), 16 | migrations.RemoveField( 17 | model_name="event", 18 | name="published", 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /nablapps/officeBeer/migrations/0003_description_fieldtype.py: -------------------------------------------------------------------------------- 1 | # Changed field type for transaction description from CharField to TextField. 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("officeBeer", "0002_depositrequest_created"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterField( 13 | model_name="transaction", 14 | name="description", 15 | field=models.TextField(verbose_name="Forklaring av transaksjon"), 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /templates/content/includes/sidebar-admin.html: -------------------------------------------------------------------------------- 1 | {% if admin_links and user.is_staff %} 2 |
3 |
4 | Admin 5 |
6 | 16 |
17 | {% endif %} 18 | -------------------------------------------------------------------------------- /nablapps/accounts/migrations/0006_auto_20160202_2330.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations 5 | 6 | import nablapps.accounts.models 7 | 8 | 9 | class Migration(migrations.Migration): 10 | dependencies = [ 11 | ("accounts", "0005_likepress"), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterModelManagers( 16 | name="nablauser", 17 | managers=[ 18 | ("objects", nablapps.accounts.models.NablaUserManager()), 19 | ], 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /nablapps/accounts/migrations/0006_auto_20210413_1346.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.7 on 2021-04-13 13:46 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("accounts", "0005_auto_20200827_1523"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterField( 13 | model_name="nablauser", 14 | name="first_name", 15 | field=models.CharField( 16 | blank=True, max_length=150, verbose_name="first name" 17 | ), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | exclude: 'static/.*' 2 | repos: 3 | - repo: https://github.com/pre-commit/pre-commit-hooks 4 | rev: v5.0.0 5 | hooks: 6 | - id: check-yaml 7 | - id: end-of-file-fixer 8 | - id: check-merge-conflict 9 | - id: check-added-large-files 10 | - repo: https://github.com/psf/black 11 | rev: 24.10.0 12 | hooks: 13 | - id: black 14 | - repo: https://github.com/PyCQA/isort 15 | rev: 5.13.2 16 | hooks: 17 | - id: isort 18 | - repo: https://github.com/PyCQA/flake8 19 | rev: 7.1.1 20 | hooks: 21 | - id: flake8 22 | -------------------------------------------------------------------------------- /nablapps/core/templatetags/search_include.py: -------------------------------------------------------------------------------- 1 | from django import template 2 | 3 | register = template.Library() 4 | FALLBACK = "generic/generic.html" 5 | 6 | 7 | @register.filter 8 | def search_include(value): 9 | app = value.app_label 10 | model = value.model_name 11 | includes_path = "search/includes" 12 | 13 | templatename = f"{includes_path}/{app}/{model}.html" 14 | 15 | try: 16 | template.loader.get_template(templatename) 17 | except Exception as e: 18 | print(e) 19 | templatename = f"{includes_path}/{FALLBACK}" 20 | 21 | return templatename 22 | -------------------------------------------------------------------------------- /nablapps/nabladet/pdfthumbnailer.py: -------------------------------------------------------------------------------- 1 | """ 2 | Contains code for creating a thumbnail of a pdf 3 | """ 4 | 5 | 6 | def thumbnail_pdf(filename): 7 | """ 8 | Make a thumbnail of the pdf with the given filename. 9 | Return the absolute filename of the thumbnail. 10 | 11 | This function needs ImageMagick on the machine. 12 | """ 13 | from wand.image import Image 14 | 15 | pdf = Image(filename=filename) 16 | pdf.format = "jpeg" 17 | thumb_name = filename + ".jpg" 18 | with open(thumb_name, "wb") as image: 19 | pdf.save(file=image) 20 | return thumb_name 21 | -------------------------------------------------------------------------------- /nablapps/vote/migrations/0007_alternative_is_winner.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.14 on 2022-02-10 23:56 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("vote", "0006_auto_20220210_2046"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="alternative", 14 | name="is_winner", 15 | field=models.BooleanField( 16 | default=False, verbose_name="Alternative is declared winner" 17 | ), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /nablapps/accounts/search_indexes.py: -------------------------------------------------------------------------------- 1 | from haystack import indexes 2 | 3 | from .models import NablaUser 4 | 5 | 6 | class NablaUserIndex(indexes.SearchIndex, indexes.Indexable): 7 | username = indexes.CharField(model_attr="username") 8 | about = indexes.CharField(model_attr="about") 9 | cell_phone = indexes.CharField(model_attr="cell_phone") 10 | text = indexes.CharField(document=True, use_template=True) 11 | 12 | def get_model(self): 13 | return NablaUser 14 | 15 | def index_queryset(self, using=None): 16 | return self.get_model().objects.filter(is_active=True) 17 | -------------------------------------------------------------------------------- /nablapps/events/migrations/0006_auto_20200629_1958.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-06-29 19:58 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("events", "0005_20191018_modify_open_for"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterField( 13 | model_name="eventregistration", 14 | name="penalty", 15 | field=models.IntegerField( 16 | blank=True, default=None, null=True, verbose_name="Prikk" 17 | ), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /nablapps/news/migrations/0008_news_object_id.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-10-06 13:24 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("news", "0007_move_fields_from_news_to_newsarticle"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name="news", 16 | name="object_id", 17 | field=models.PositiveIntegerField(blank=True, null=True), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /nablapps/nablaforum/migrations/0007_auto_20200517_0659.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.13 on 2020-05-17 06:59 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("nablaforum", "0006_auto_20200114_1954"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterModelOptions( 13 | name="channel", 14 | options={ 15 | "permissions": [ 16 | ("can_post_in_nablafeed", "Can post thread in nablafeed") 17 | ] 18 | }, 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /nablapps/news/migrations/0004_auto_20171006_0006.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-10-06 00:06 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("news", "0003_auto_20171005_2335"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="news", 16 | name="headline", 17 | field=models.CharField(blank=True, max_length=100, verbose_name="tittel"), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /nablapps/news/search_indexes.py: -------------------------------------------------------------------------------- 1 | """ 2 | Search index for NewsArticle 3 | 4 | used by haystack 5 | """ 6 | 7 | from haystack import indexes 8 | 9 | from .models import NewsArticle 10 | 11 | 12 | class NewsIndex(indexes.SearchIndex, indexes.Indexable): 13 | """Search index for NewsArticle""" 14 | 15 | text = indexes.CharField(document=True, use_template=True) 16 | created_date = indexes.DateTimeField(model_attr="created_date") 17 | 18 | def get_model(self): 19 | return NewsArticle 20 | 21 | def index_queryset(self, using=None): 22 | return self.get_model().objects.all() 23 | -------------------------------------------------------------------------------- /nablapps/poll/migrations/0004_poll_is_user_poll.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("poll", "0003_auto_20150925_2315"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="poll", 15 | name="is_user_poll", 16 | field=models.BooleanField( 17 | default=False, editable=False, verbose_name="Er brukerpoll" 18 | ), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /nablapps/poll/migrations/0005_auto_20150926_0938.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("poll", "0004_poll_is_user_poll"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="choice", 15 | name="poll", 16 | field=models.ForeignKey( 17 | related_name="choices", to="poll.Poll", on_delete=models.CASCADE 18 | ), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /nablapps/events/feeds.py: -------------------------------------------------------------------------------- 1 | """ 2 | Feed for events 3 | """ 4 | 5 | from django.contrib.syndication.views import Feed 6 | 7 | from .models import Event 8 | 9 | 10 | class RecentEvents(Feed): 11 | """Feed class for Event-model""" 12 | 13 | title = "Arrangement på Nabla.no" 14 | link = "/arrangement" 15 | 16 | def items(self): 17 | """Return queryset of events""" 18 | return Event.objects.order_by("-created_date")[:10] 19 | 20 | def item_title(self, item): 21 | return item.headline 22 | 23 | def item_description(self, item): 24 | return item.lead_paragraph 25 | -------------------------------------------------------------------------------- /nablapps/news/feeds.py: -------------------------------------------------------------------------------- 1 | """ 2 | RSS feed for front page news 3 | """ 4 | 5 | from django.contrib.syndication.views import Feed 6 | 7 | from .models import FrontPageNews 8 | 9 | 10 | class RecentNews(Feed): 11 | """Feed showing the news on the front page""" 12 | 13 | title = "Nyheter på Nabla.no" 14 | link = "/" 15 | 16 | def items(self): # pylint: disable=C0111 17 | return FrontPageNews.objects.order_by("-created_date")[:10] 18 | 19 | def item_title(self, item): 20 | return item.headline 21 | 22 | def item_description(self, item): 23 | return item.lead_paragraph 24 | -------------------------------------------------------------------------------- /nablapps/poll/static/poll/poll_sidebar.css: -------------------------------------------------------------------------------- 1 | 2 | .poll .choice { 3 | margin-bottom: 5px; 4 | } 5 | 6 | .poll .progress { 7 | background-image: -webkit-linear-gradient(top, #ececec, white); 8 | background-image: -o-linear-gradient(top, #ececec, white); 9 | background-image: -moz-linear-gradient(linear, 0 0, 0 100%, from(#ececec), to(white)); 10 | background-image: linear-gradient(to bottom, #ececec, white); 11 | box-shadow: inset 0 1px 0 rgba(0,0,0,0.2); 12 | } 13 | 14 | .bar .percent.zero { 15 | color: #999; 16 | padding-left: 5px; 17 | } 18 | 19 | .poll form { margin-bottom: 0; } 20 | -------------------------------------------------------------------------------- /nablapps/accounts/migrations/0008_nablagroup_logo.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("accounts", "0007_move_to_new_likepress_app"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="nablagroup", 15 | name="logo", 16 | field=models.FileField( 17 | blank=True, upload_to="logos", verbose_name="Logo", null=True 18 | ), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /templates/search/includes/generic/generic.html: -------------------------------------------------------------------------------- 1 | {% load easy_thumbnails %} 2 | 3 | {% with result.object as item %} 4 | 18 | {% endwith %} 19 | -------------------------------------------------------------------------------- /templates/search/includes/podcast/podcast.html: -------------------------------------------------------------------------------- 1 | {% load easy_thumbnails %} 2 | 3 | {% with result.object as podcast %} 4 | 14 | {% endwith %} 15 | -------------------------------------------------------------------------------- /nablapps/accounts/tests/test_extract_usernames.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | from nablapps.accounts.models import NablaUser 4 | from nablapps.accounts.utils import extract_usernames 5 | 6 | 7 | class TestExtractUsername(TestCase): 8 | def test_extract_usernames(self): 9 | s = "brukernavn\nannetbrukernavn" 10 | extract_usernames(s) 11 | self.assertTrue(NablaUser.objects.filter(username="brukernavn").exists()) 12 | self.assertTrue(NablaUser.objects.filter(username="annetbrukernavn").exists()) 13 | self.assertFalse(NablaUser.objects.filter(username="lalaland").exists()) 14 | -------------------------------------------------------------------------------- /nablapps/accounts/migrations/0003_auto_20150925_2315.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("accounts", "0002_registrationrequest"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterModelOptions( 14 | name="registrationrequest", 15 | options={ 16 | "verbose_name": "Registreringsforespørsel", 17 | "verbose_name_plural": "Registreringsforespørsler", 18 | }, 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /nablapps/mailfeed/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | from .models import Mailfeed, Subscription 5 | 6 | 7 | class SubscriptionAdmin(admin.ModelAdmin): 8 | class Meta: 9 | verbose_name = "Subscription" 10 | verbose_name_plural = "Subscriptions" 11 | 12 | list_display = ("mailfeed", "email", "uuid", "created") 13 | list_select_related = [ 14 | "mailfeed", 15 | ] 16 | ordering = ["-mailfeed"] 17 | list_filter = ["mailfeed", "email"] 18 | 19 | 20 | admin.site.register(Subscription, SubscriptionAdmin) 21 | admin.site.register(Mailfeed) 22 | -------------------------------------------------------------------------------- /nablapps/accounts/management/commands/list_groups.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.models import Group 2 | from django.core.management.base import BaseCommand 3 | 4 | 5 | class Command(BaseCommand): 6 | args = "" 7 | help = "Shows a list of groups with matching name" 8 | 9 | def handle(self, *args, **options): 10 | try: 11 | name = args[0] 12 | groups = Group.objects.filter(name__icontains=name) 13 | except IndexError: 14 | groups = Group.objects.all() 15 | for g in groups: 16 | self.stdout.write("%s (%d)" % (g.name, g.user_set.count())) 17 | -------------------------------------------------------------------------------- /nablapps/nablaforum/migrations/0006_auto_20200114_1954.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.13 on 2020-01-14 19:54 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("nablaforum", "0005_auto_20200104_1336"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="channel", 15 | name="members", 16 | field=models.ManyToManyField( 17 | blank=True, related_name="members", to=settings.AUTH_USER_MODEL 18 | ), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /nablapps/interactive/models/__init__.py: -------------------------------------------------------------------------------- 1 | from .advent import AdventCalendar, AdventDoor 2 | from .code_golf import CodeTask, Result 3 | from .color_picker import ColorChoice, validate_color 4 | from .quiz import Quiz, QuizQuestion, QuizReply 5 | from .user_test import Test, TestQuestion, TestQuestionAlternative, TestResult 6 | 7 | __all__ = [ 8 | "AdventCalendar", 9 | "AdventDoor", 10 | "CodeTask", 11 | "Result", 12 | "ColorChoice", 13 | "validate_color", 14 | "Quiz", 15 | "QuizQuestion", 16 | "QuizReply", 17 | "Test", 18 | "TestQuestion", 19 | "TestQuestionAlternative", 20 | "TestResult", 21 | ] 22 | -------------------------------------------------------------------------------- /nablapps/vote/migrations/0003_auto_20210210_2135.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2021-02-10 21:35 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("vote", "0002_auto_20210203_1912"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterModelOptions( 13 | name="votingevent", 14 | options={ 15 | "permissions": [ 16 | ("vote_admin", "can administer voting"), 17 | ("vote_inspector", "can inspect voting"), 18 | ] 19 | }, 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /nablapps/jobs/templates/jobs/jobs_detail.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}{{ job.print_headline }}{% endblock %} 4 | 5 | {% block content %} 6 | 7 | {% load markdown %} 8 | {% load easy_thumbnails %} 9 | 10 | 11 | {% include "content/includes/article_content.html" with content=job %} 12 | 13 | {% include "content/includes/comments.html" with content=job %} 14 | 15 | {% endblock %} 16 | 17 | 18 | {% block sidebar %} 19 | {% include "jobs/info_include.html" with job=job %} 20 | {% include "content/includes/meta.html" with content=job %} 21 | {% include "content/includes/sidebar-admin.html" %} 22 | {% endblock %} 23 | -------------------------------------------------------------------------------- /templates/comments/flag.html: -------------------------------------------------------------------------------- 1 | {% extends "comments/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% trans "Flag this comment" %}{% endblock %} 5 | 6 | {% block content %} 7 |

{% trans "Really flag this comment?" %}

8 |
{{ comment|linebreaks }}
9 |
{% csrf_token %} 10 | {% if next %}
{% endif %} 11 |

12 | or cancel 13 |

14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /nablapps/nablaforum/migrations/0004_thread_created.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.13 on 2019-12-25 04:04 2 | 3 | import django.utils.timezone 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("nablaforum", "0003_auto_20191025_2140"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="thread", 15 | name="created", 16 | field=models.DateTimeField( 17 | default=django.utils.timezone.now, editable=False 18 | ), 19 | preserve_default=False, 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /nablapps/jobs/migrations/0002_auto_20170920_1310.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-09-20 13:10 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("jobs", "0001_squashed_0012_auto_20151106_1921"), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name="company", 16 | name="allow_comments", 17 | ), 18 | migrations.RemoveField( 19 | model_name="company", 20 | name="content_type", 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /nablapps/nabladet/migrations/0007_auto_20171017_0140.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-10-17 01:40 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("nabladet", "0006_news_ptr_to_id_20171006_1559"), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name="nablad", 16 | name="publication_date", 17 | ), 18 | migrations.RemoveField( 19 | model_name="nablad", 20 | name="published", 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /static/404/style.css: -------------------------------------------------------------------------------- 1 | @import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,900); 2 | 3 | body { 4 | font-family: "Source Sans Pro", Arial, sans-serif; 5 | text-align: center; 6 | background-color: #eaeaff; 7 | } 8 | 9 | h1, h2, p { 10 | color: #222; 11 | } 12 | 13 | img { 14 | padding-top: 3%; 15 | } 16 | 17 | h1 { 18 | font-size: 5em; 19 | text-shadow: 1px 1px 2px rgba(150, 150, 150, 1); 20 | margin-bottom: 20px; 21 | } 22 | 23 | p { 24 | font-size: 1.2em; 25 | } 26 | 27 | p.wikitext { 28 | font-size: 1.5em; 29 | padding-top: 2.4%; 30 | } 31 | 32 | h2 strong { 33 | font-weight: 900; 34 | } 35 | -------------------------------------------------------------------------------- /nablapps/accounts/templates/accounts/includes/user_large.html: -------------------------------------------------------------------------------- 1 | {% load easy_thumbnails %} 2 | {% load static %} 3 |
4 |

{% firstof user.get_full_name user.username %}

5 | 6 | avatar 12 | 13 |
14 | -------------------------------------------------------------------------------- /nablapps/interactive/static/interactive/js/advent_calendar.js: -------------------------------------------------------------------------------- 1 | 2 | (function (doors) { 3 | doors.on("click", function() { 4 | door = $(this); 5 | if (door.attr("data-open") == "True") { 6 | 7 | if (!door.hasClass('advent-door-open')) { 8 | 9 | door.addClass('advent-door-open'); 10 | return false; 11 | 12 | } else { 13 | 14 | door.removeClass('advent-door-open'); 15 | return true; 16 | 17 | } 18 | } else { 19 | alert("Åpnes kl. 10:00 på den gjeldende dagen"); 20 | } 21 | }); 22 | 23 | })($('.advent-door')); 24 | 25 | 26 | -------------------------------------------------------------------------------- /nablapps/jobs/migrations/0008_auto_20171017_0111.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-10-17 01:11 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("jobs", "0007_auto_20171006_1713"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="advert", 16 | name="last_changed_date", 17 | field=models.DateTimeField( 18 | auto_now=True, null=True, verbose_name="Redigeringsdato" 19 | ), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /nablapps/podcast/migrations/0002_auto_20170920_1318.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-09-20 13:18 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("podcast", "0001_squashed_0014_podcast_content_type"), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name="podcast", 16 | name="allow_comments", 17 | ), 18 | migrations.RemoveField( 19 | model_name="podcast", 20 | name="content_type", 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /nablapps/poll/migrations/0002_poll_answer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2018-08-28 13:45 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("poll", "0001_squashed_0008_remove_poll_content_type"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name="poll", 16 | name="answer", 17 | field=models.CharField( 18 | blank=True, default="", max_length=1000, verbose_name="Svar" 19 | ), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /templates/comments/approve.html: -------------------------------------------------------------------------------- 1 | {% extends "comments/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% trans "Approve a comment" %}{% endblock %} 5 | 6 | {% block content %} 7 |

{% trans "Really make this comment public?" %}

8 |
{{ comment|linebreaks }}
9 |
{% csrf_token %} 10 | {% if next %}
{% endif %} 11 |

12 | or cancel 13 |

14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /nablapps/exchange/migrations/0004_university_by.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-10-21 20:28 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("exchange", "0003_exchangenewsarticle"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="university", 14 | name="by", 15 | field=models.CharField( 16 | default="", 17 | help_text="Byen universitetet ligger i", 18 | max_length=30, 19 | verbose_name="by", 20 | ), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /nablapps/interactive/migrations/0009_auto_20190205_1416.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.5 on 2019-02-05 14:16 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("interactive", "0008_auto_20190104_0304"), 9 | ] 10 | 11 | operations = [ 12 | migrations.RemoveField( 13 | model_name="test", 14 | name="publication_date", 15 | ), 16 | migrations.AlterField( 17 | model_name="test", 18 | name="published", 19 | field=models.NullBooleanField(default=True, verbose_name="Publisert"), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /nablapps/interactive/migrations/0010_auto_20190205_1436.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.5 on 2019-02-05 14:36 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("interactive", "0009_auto_20190205_1416"), 9 | ] 10 | 11 | operations = [ 12 | migrations.RemoveField( 13 | model_name="quiz", 14 | name="publication_date", 15 | ), 16 | migrations.AlterField( 17 | model_name="quiz", 18 | name="published", 19 | field=models.NullBooleanField(default=True, verbose_name="Publisert"), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /nablapps/jobs/feeds.py: -------------------------------------------------------------------------------- 1 | """ 2 | Rss feed for jobs 3 | """ 4 | 5 | from django.contrib.syndication.views import Feed 6 | 7 | from nablapps.jobs.models import Advert 8 | 9 | 10 | class RecentJobs(Feed): 11 | """Rss feed showing the most recent job adverts""" 12 | 13 | title = "Stillingsannonser på Nabla.no" 14 | link = "/stillinger" 15 | 16 | def items(self): 17 | """Get the adverts to show""" 18 | return Advert.objects.order_by("-created_date")[:10] 19 | 20 | def item_title(self, item): 21 | return f"{item.headline} hos {item.company.name}" 22 | 23 | def item_description(self, item): 24 | return item.lead_paragraph 25 | -------------------------------------------------------------------------------- /nablapps/news/migrations/0012_auto_20171017_0114.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-10-17 01:14 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("news", "0011_auto_20171017_0035"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="newsarticle", 16 | name="last_changed_date", 17 | field=models.DateTimeField( 18 | auto_now=True, null=True, verbose_name="Redigeringsdato" 19 | ), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /nablapps/poll/migrations/0002_auto_20150401_1806.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("poll", "0001_initial"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="choice", 15 | name="added_by", 16 | field=models.CharField( 17 | verbose_name="Lagt til av", 18 | max_length=100, 19 | help_text="Hvem som la til valget i avstemningen", 20 | ), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /nablapps/core/templatetags/listutil.py: -------------------------------------------------------------------------------- 1 | """ 2 | Templatetags for dealing with python lists in django template 3 | """ 4 | 5 | from django import template 6 | 7 | register = template.Library() 8 | 9 | 10 | @register.filter 11 | def row_split(items, n): 12 | """ 13 | Yields successive n-sized chunks of a list. Can be used to partition a list 14 | into rows, for HTML display. 15 | 16 | >>> items = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 17 | >>> row_split(items, 3) 18 | [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10]] 19 | 20 | Source: http://stackoverflow.com/questions/312443/ 21 | """ 22 | for i in range(0, len(items), n): 23 | yield items[i : i + n] 24 | -------------------------------------------------------------------------------- /nablapps/album/search_indexes.py: -------------------------------------------------------------------------------- 1 | """ 2 | Haystack search indexes for album app 3 | 4 | Will be imported by haystack if haystack is used. 5 | """ 6 | 7 | from haystack import indexes # pylint: disable=E0401 8 | 9 | from .models import Album 10 | 11 | 12 | class AlbumIndex(indexes.SearchIndex, indexes.Indexable): 13 | """ 14 | Search index for entire albums 15 | """ 16 | 17 | title = indexes.CharField(model_attr="title") 18 | created_date = indexes.DateTimeField(model_attr="created_date") 19 | text = indexes.CharField(document=True, use_template=True) 20 | 21 | def get_model(self): 22 | """Return corresponding model""" 23 | return Album 24 | -------------------------------------------------------------------------------- /nablapps/com/migrations/0008_auto_20201111_2046.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-11-11 20:46 2 | 3 | from django.db import migrations 4 | 5 | import ckeditor.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("com", "0007_auto_20191003_1658"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="compage", 16 | name="description", 17 | field=ckeditor.fields.RichTextField( 18 | blank=True, 19 | help_text="Teksten på komitésiden", 20 | verbose_name="Beskrivelse", 21 | ), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /nablapps/events/migrations/0005_auto_20171017_0110.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-10-17 01:10 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("events", "0004_news_ptr_to_id_20171006_1559"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="event", 16 | name="last_changed_date", 17 | field=models.DateTimeField( 18 | auto_now=True, null=True, verbose_name="Redigeringsdato" 19 | ), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /nablapps/com/migrations/0004_compage_is_interest_group.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("com", "0003_auto_20151007_1436"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="compage", 15 | name="is_interest_group", 16 | field=models.BooleanField( 17 | verbose_name="Interessegruppe", 18 | help_text="Er ikke fullverdig komité", 19 | default=True, 20 | ), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /nablapps/poll/forms.py: -------------------------------------------------------------------------------- 1 | """ 2 | Forms for poll app 3 | """ 4 | 5 | from django.forms import ModelForm 6 | from django.forms.models import inlineformset_factory 7 | 8 | from nablapps.core.admin import ChangedByMixin 9 | 10 | from .models import Choice, Poll 11 | 12 | ChoiceFormSet = inlineformset_factory( 13 | Poll, Choice, fields=("choice",), can_delete=False 14 | ) 15 | 16 | 17 | class PollForm(ChangedByMixin, ModelForm): 18 | class Meta: 19 | model = Poll 20 | fields = ( 21 | "question", 22 | "answer", 23 | ) 24 | exclude = ("delete",) 25 | help_texts = { 26 | "answer": "Valgfritt", 27 | } 28 | -------------------------------------------------------------------------------- /nablapps/mailfeed/migrations/0005_auto_20240110_1725.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.23 on 2024-01-10 17:25 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("mailfeed", "0004_subscription_email_hash"), 9 | ] 10 | 11 | operations = [ 12 | migrations.RemoveField( 13 | model_name="subscription", 14 | name="email_hash", 15 | ), 16 | migrations.AddField( 17 | model_name="subscription", 18 | name="uuid", 19 | field=models.CharField(default=23, max_length=150), 20 | preserve_default=False, 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /nablapps/nablaforum/migrations/0002_add_created_datetime.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.13 on 2019-10-19 22:16 2 | 3 | import datetime 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("nablaforum", "0001_initial"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name="message", 16 | name="created", 17 | field=models.DateTimeField( 18 | default=datetime.datetime(2019, 10, 19, 22, 16, 15, 299300), 19 | editable=False, 20 | ), 21 | preserve_default=False, 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /nablapps/events/templates/events/moved_to_attending_email.txt: -------------------------------------------------------------------------------- 1 | Hei {{ name }}, 2 | 3 | Du har nå fått plass på arrangementet "{{ event.headline }}". 4 | Plassen er tildelt fordi du stod på venteliste. 5 | {% if event.deregistration_closed %} 6 | Fristen for å melde seg av arrangementet har gått ut. Dersom du allikevel ikke kan komme, kan du prøve å ta kontakt med {% if event.organizer %}{{ event.organizer }}{% else %}arrangement-ansvarlig{% endif %} så fort som mulig. 7 | {% elif event.deregistration_deadline %} 8 | Hvis du alikevel ikke kan komme, må du melde deg av før avmeldingsfristen. 9 | {% else %} 10 | Hvis du alikevel ikke kan komme, må du huske å melde deg av så fort som mulig. 11 | {% endif %} 12 | -------------------------------------------------------------------------------- /nablapps/interactive/migrations/0003_adventcalendar_requires_login.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2018-01-31 19:37 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("interactive", "0002_auto_20171106_2322"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name="adventcalendar", 16 | name="requires_login", 17 | field=models.BooleanField( 18 | default=False, verbose_name="Krever innlogging for å se side" 19 | ), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /nablapps/podcast/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from image_cropping import ImageCroppingMixin 4 | 5 | from .models import Podcast, Season 6 | 7 | 8 | class PodcastAdmin(ImageCroppingMixin, admin.ModelAdmin): 9 | fields = ( 10 | "image", 11 | "cropping", 12 | "title", 13 | "season", 14 | "description", 15 | "short_title", 16 | "has_video", 17 | "is_clip", 18 | "file", 19 | "pub_date", 20 | ) 21 | list_display = ("title", "pub_date", "season", "is_clip", "has_video") 22 | list_filter = ["pub_date"] 23 | 24 | 25 | admin.site.register(Podcast, PodcastAdmin) 26 | admin.site.register(Season) 27 | -------------------------------------------------------------------------------- /nablapps/news/migrations/0003_auto_20171005_2335.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-10-05 23:35 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("news", "0002_remove_news_allow_comments"), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name="news", 16 | name="priority", 17 | ), 18 | migrations.AlterField( 19 | model_name="news", 20 | name="slug", 21 | field=models.SlugField(blank=True, null=True), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /nablapps/qrTickets/utils.py: -------------------------------------------------------------------------------- 1 | from django.core.mail import send_mail 2 | from django.template.loader import render_to_string 3 | from django.utils.html import strip_tags 4 | 5 | FROM_EMAIL_ADDRESS = "noreply-tickets@nabla.no" 6 | 7 | 8 | def send_template_email(template, context, subject, emails): 9 | """Send email using a django-template""" 10 | from_email = FROM_EMAIL_ADDRESS 11 | 12 | html_content = render_to_string(template, context) 13 | text_content = strip_tags(html_content) 14 | 15 | send_mail( 16 | subject=subject, 17 | message=text_content, 18 | from_email=from_email, 19 | recipient_list=emails, 20 | html_message=html_content, 21 | ) 22 | -------------------------------------------------------------------------------- /nablapps/officeBeer/migrations/0002_depositrequest_created.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Adds created field. 3 | from __future__ import unicode_literals 4 | 5 | import django.utils.timezone 6 | from django.db import migrations, models 7 | 8 | 9 | class Migration(migrations.Migration): 10 | dependencies = [ 11 | ("officeBeer", "0001_initial"), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name="depositrequest", 17 | name="created", 18 | field=models.DateTimeField( 19 | auto_now_add=True, default=django.utils.timezone.now 20 | ), 21 | preserve_default=False, 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /nablapps/news/migrations/0009_set_object_id_from_news_id.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-10-06 13:27 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | def forwards_func(apps, schema_editor): 9 | News = apps.get_model("news", "News") 10 | for n in News.objects.all(): 11 | n.object_id = n.id 12 | n.save() 13 | 14 | 15 | def reverse_func(apps, schema_editor): 16 | pass 17 | 18 | 19 | class Migration(migrations.Migration): 20 | dependencies = [ 21 | ("news", "0008_news_object_id"), 22 | ] 23 | 24 | operations = [ 25 | migrations.RunPython(forwards_func, reverse_func), 26 | ] 27 | -------------------------------------------------------------------------------- /nablapps/poll/templates/poll/poll_include_general.html: -------------------------------------------------------------------------------- 1 | {% load humanize %} 2 | {% load cache %} 3 | {% load sekizai_tags %} 4 | {% load static %} 5 | 6 | 7 | {% addtoblock "css" %} 8 | 9 | {% endaddtoblock %} 10 |
11 | {% if poll %} 12 |

{{ poll.question }}

13 | {% if poll_has_voted %} 14 | {% include "poll/includes/poll_result.html" %} 15 | {% else %} 16 | {% include "poll/includes/vote_form.html" %} 17 | {% endif %} 18 | {% else %} 19 |

Ingen avstemning

20 | {% endif %} 21 |
22 | -------------------------------------------------------------------------------- /nablapps/poll/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | Urls for poll app 3 | """ 4 | 5 | from django.urls import path 6 | 7 | from .views import ( 8 | CreateUserPollView, 9 | DeleteUserPollView, 10 | PollListView, 11 | UserPollsView, 12 | vote, 13 | ) 14 | 15 | urlpatterns = [ 16 | path("/vote/", vote, name="poll_vote"), 17 | path("brukeravstemninger/", PollListView.as_view(), name="user_polls"), 18 | path("bruker/", UserPollsView.as_view(), name="poll_user"), 19 | path("bruker/ny/", CreateUserPollView.as_view(), name="poll_user_create"), 20 | path( 21 | "bruker/slett//", 22 | DeleteUserPollView.as_view(), 23 | name="poll_user_delete", 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /nablapps/events/tests/test_bedpres.py: -------------------------------------------------------------------------------- 1 | """ 2 | Tests related to bedpres 3 | """ 4 | 5 | from django.core.exceptions import ValidationError 6 | 7 | from nablapps.jobs.models import Company 8 | 9 | from .common import GeneralEventTest 10 | 11 | 12 | class BedpresTest(GeneralEventTest): 13 | def test_company_not_set_bedpres(self): 14 | self.event.is_bedpres = True 15 | self.event.company = None 16 | self.assertRaises(ValidationError, self.event.clean) 17 | 18 | def test_company_set_when_not_bedpres(self): 19 | self.event.is_bedpres = False 20 | self.event.company = Company.objects.create(name="Some company") 21 | self.assertRaises(ValidationError, self.event.clean) 22 | -------------------------------------------------------------------------------- /nablapps/exchange/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from .views import ( 4 | ExchangeFrontpageView, 5 | ExchangeNewsDetailView, 6 | ExchangeNewsView, 7 | InfoDetailView, 8 | UnivDetailView, 9 | ) 10 | 11 | urlpatterns = [ 12 | path("", ExchangeFrontpageView.as_view(), name="ex_frontpage"), 13 | path("info/(/", InfoDetailView.as_view(), name="info_detail"), 14 | path("/", UnivDetailView.as_view(), name="ex_detail_list"), 15 | path("exchange-news/", ExchangeNewsView.as_view(), name="ex_news"), 16 | path( 17 | "exchange-news/detail///", 18 | ExchangeNewsDetailView.as_view(), 19 | name="ex_news_detail", 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /nablapps/interactive/migrations/0016_placegrid_uncertainty.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.13 on 2020-02-27 07:34 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("interactive", "0015_place"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="placegrid", 14 | name="uncertainty", 15 | field=models.BooleanField( 16 | default=False, 17 | help_text="Brukere vil kunne velge mellom å plassere raskt og å plassere sikkert.", 18 | verbose_name="Uskarphet i posisjon og tid og farge", 19 | ), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /nablapps/nabladet/migrations/0003_nablad_is_public.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("nabladet", "0002_nablad_thumbnail"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="nablad", 15 | name="is_public", 16 | field=models.BooleanField( 17 | help_text="Bestemmer om brukere som ikke er logget inn kan se dette Nabladet.", 18 | verbose_name="Offentlig tilgjengelig", 19 | default=False, 20 | ), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /nablapps/events/migrations/0014_auto_20220702_1315.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.14 on 2022-07-02 13:15 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("events", "0013_auto_20210909_2046"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterField( 13 | model_name="eventregistration", 14 | name="penalty", 15 | field=models.IntegerField( 16 | blank=True, 17 | default=None, 18 | help_text="Antall prikker burkeren har fått", 19 | null=True, 20 | verbose_name="Prikk", 21 | ), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /nablapps/officeBeer/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Account, DepositRequest, Product 4 | 5 | 6 | @admin.register(Account) 7 | class AccountAdmin(admin.ModelAdmin): 8 | """ 9 | Admin interface for Account model 10 | """ 11 | 12 | 13 | @admin.register(Product) 14 | class ProductAdmin(admin.ModelAdmin): 15 | """ 16 | Admin interface for Product 17 | """ 18 | 19 | 20 | @admin.register(DepositRequest) 21 | class DepositRequestAdmin(admin.ModelAdmin): 22 | """ 23 | Admin interface for DepositRequest 24 | """ 25 | 26 | def approve(self, request, queryset): 27 | for request in queryset: 28 | request.approve() 29 | 30 | actions = [approve] 31 | -------------------------------------------------------------------------------- /nablapps/podcast/migrations/0007_podcast_short_title.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.7 on 2019-04-22 16:00 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("podcast", "0006_auto_20190319_2047"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="podcast", 14 | name="short_title", 15 | field=models.CharField( 16 | blank=True, 17 | help_text="kort tittel som vises i boksen på forsiden med de fire siste sendingene.", 18 | max_length=50, 19 | verbose_name="kort tittel", 20 | ), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /nablapps/events/templates/events/event_icalendar.ics: -------------------------------------------------------------------------------- 1 | BEGIN:VCALENDAR 2 | METHOD:PUBLISH 3 | CALSCALE:GREGORIAN 4 | PRODID:-//Nabla//NONSGML nabla.no//NO 5 | VERSION:2.0 6 | LAST-MODIFIED:{% now "Ymd\THis" %} 7 | X-WR-TIMEZONE:Europe/Oslo 8 | {% for event in event_list %} 9 | BEGIN:VEVENT 10 | UID:event{{ event.id }}@nabla.no 11 | DTSTART:{{ event.event_start|date:"Ymd\THis" }} 12 | {% if event.event_end %} 13 | DTEND:{{ event.event_end|date:"Ymd\THis" }} 14 | {% endif %} 15 | LOCATION:{{ event.location }} 16 | ORGANIZER:http://nabla.no 17 | CATEGORIES:Nabla 18 | SUMMARY:{{ event.headline }} 19 | DESCRIPTION:{{ event.lead_paragraph }} 20 | URL:http://nabla.no{{ event.get_absolute_url }} 21 | END:VEVENT 22 | {% endfor %} 23 | 24 | END:VCALENDAR 25 | -------------------------------------------------------------------------------- /nablapps/mailfeed/migrations/0002_auto_20240109_1653.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.2.22 on 2024-01-09 16:53 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("mailfeed", "0001_initial"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterField( 13 | model_name="mailfeed", 14 | name="created", 15 | field=models.DateTimeField(auto_now=True, verbose_name="Opprettet"), 16 | ), 17 | migrations.AlterField( 18 | model_name="subscription", 19 | name="created", 20 | field=models.DateTimeField(auto_now=True, verbose_name="Opprettet"), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /nablapps/apply_committee/templates/apply_committee/application_list.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block main %} 4 | {% block warning %}{% endblock warning %} 5 |

Liste over søknader for søknadsrunde {{ application_round.name }}


6 | {% for committee, applications in application_list.items %} 7 |

{{ committee.name }}

8 | {% block com_mail_list %}{% endblock %} 9 | 10 | {% for application in applications %} 11 | {% block applicant_info %} 12 | 13 | 14 | 15 | {% endblock %} 16 | {% endfor %} 17 |
{% if application.anonymous %} Anonym {% else %} {{ application.applicant.get_full_name }}{% endif %}
18 |
19 | {% endfor %} 20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /nablapps/blog/search_indexes.py: -------------------------------------------------------------------------------- 1 | """ 2 | Haystack search indexes for blog app 3 | 4 | Will be imported by haystack if haystack is used. 5 | """ 6 | 7 | from haystack import indexes # pylint: disable=E0401 8 | 9 | from .models import BlogPost 10 | 11 | 12 | class BlogIndex(indexes.SearchIndex, indexes.Indexable): 13 | """ 14 | Search index for blog entries 15 | """ 16 | 17 | title = indexes.CharField(model_attr="title") 18 | content = indexes.CharField(model_attr="content") 19 | created_date = indexes.DateTimeField(model_attr="created_date") 20 | text = indexes.CharField(document=True, use_template=True) 21 | 22 | def get_model(self): 23 | """Return corresponding model""" 24 | return BlogPost 25 | -------------------------------------------------------------------------------- /nablapps/interactive/migrations/0008_auto_20190104_0304.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.16 on 2019-01-04 03:04 3 | from __future__ import unicode_literals 4 | 5 | import django.db.models.deletion 6 | from django.conf import settings 7 | from django.db import migrations, models 8 | 9 | 10 | class Migration(migrations.Migration): 11 | dependencies = [ 12 | ("interactive", "0007_codegolf_new"), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name="result", 18 | name="user", 19 | field=models.ForeignKey( 20 | on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL 21 | ), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /nablapps/jobs/migrations/0009_company_ignorecrop.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.7 on 2019-03-26 00:22 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("jobs", "0008_auto_20171017_0111"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="company", 14 | name="ignoreCrop", 15 | field=models.BooleanField( 16 | blank=True, 17 | default=False, 18 | help_text="Beskjæringen vil bli ignorert og bildet vises i originalt format, med hvit bakgrunn", 19 | verbose_name="Vis i full størrelse", 20 | ), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /nablapps/com/migrations/0003_auto_20151007_1436.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.conf import settings 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("com", "0002_committee"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="committee", 16 | name="leader", 17 | field=models.ForeignKey( 18 | blank=True, 19 | verbose_name="Leder", 20 | to=settings.AUTH_USER_MODEL, 21 | null=True, 22 | on_delete=models.CASCADE, 23 | ), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /nablapps/poll/migrations/0007_poll_content_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("contenttypes", "0002_remove_content_type_name"), 10 | ("poll", "0006_auto_20150926_1409"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name="poll", 16 | name="content_type", 17 | field=models.ForeignKey( 18 | to="contenttypes.ContentType", 19 | editable=False, 20 | null=True, 21 | on_delete=models.CASCADE, 22 | ), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /nablapps/album/migrations/0003_albumimage_is_display_image.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.16 on 2019-01-30 21:26 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("album", "0002_auto_20190130_1936"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name="albumimage", 16 | name="is_display_image", 17 | field=models.BooleanField( 18 | default=False, 19 | help_text="Bildet som vises i listen over album", 20 | verbose_name="Er visningbilde", 21 | ), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /nablapps/contact/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | urlpatterns = [ 6 | path("", views.contact, name="contact"), 7 | path("feedback/", views.feedback, name="feedback"), 8 | path( 9 | "gullkorn/", 10 | views.feedback, 11 | {"template": "gullkorn.html", "send_to": "redaktor@nabla.no"}, 12 | name="gullkorn", 13 | ), 14 | path("success/", views.success, name="success"), 15 | path("success_gullkorn/", views.success_gullkorn, name="success_gullkorn"), 16 | path("rombooking/", views.roombooking, name="rombooking"), 17 | path("utstyrbooking/", views.utstyrbooking, name="utstyrbooking"), 18 | path("for_bedrifter/", views.for_bedrifter, name="for_bedrifter"), 19 | ] 20 | -------------------------------------------------------------------------------- /nablapps/exchange/migrations/0010_exchange_optional_email.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-11-04 21:29 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("exchange", "0009_auto_20201104_2105"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="exchange", 14 | name="optional_email", 15 | field=models.CharField( 16 | blank=True, 17 | help_text="Alternativ epost, la stå blank for å bruke studmail.", 18 | max_length=100, 19 | null=True, 20 | verbose_name="Alternativ epost", 21 | ), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /nablapps/interactive/views/color_picker.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.decorators import login_required 2 | from django.http import HttpResponse # TODO: Remvoe, used for debuging only 3 | from django.http import HttpResponseRedirect 4 | 5 | from ..forms import ColorChoiceForm 6 | from ..models import ColorChoice 7 | 8 | 9 | @login_required 10 | def submitColorChoice(request): 11 | # TODO: Check if request method is POST? 12 | form = ColorChoiceForm(request.POST) 13 | 14 | if form.is_valid(): 15 | ColorChoice.objects.create(user=request.user, color=form.cleaned_data["color"]) 16 | 17 | print(ColorChoice.get_average_color()) 18 | return HttpResponseRedirect("/") 19 | 20 | return HttpResponse("Hm, got past is_valid()....") 21 | -------------------------------------------------------------------------------- /nablapps/interactive/migrations/0017_quiz_spoiler_text.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-12-19 21:07 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("interactive", "0016_placegrid_uncertainty"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="quiz", 14 | name="spoiler_html", 15 | field=models.TextField( 16 | default="", 17 | blank=True, 18 | help_text="HTML som vises til brukeren etter den har sendt inn et svar på quizen. Vises ikke dersom den står tom.", 19 | verbose_name="Spoiler HTML", 20 | ), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /nablapps/contact/templates/contact/rombooking.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load bootstrap4 %} 3 | {% block title %}Rombooking{% endblock %} 4 | 5 | {% block content %} 6 | 7 |

Rombooking

8 | 9 |

Bestill rom ved å fylle ut dette skjemaet :)

10 |

Sørg for at du bestiller i god tid, for da er romutvalget større

11 | 12 | 13 | 14 | {% if spam_check == True %} 15 | {% bootstrap_alert "Forsøk å regne kontrollspørsmål på nytt" alert_type="danger" %} 16 | {% endif %} 17 | 18 |
19 | {% csrf_token %} 20 | {% bootstrap_form room_form exclude="spam_check" %} 21 | {% bootstrap_field room_form.spam_check placeholder="Svar" %} 22 | {% bootstrap_button "Send" button_type="submit" %} 23 |
24 | {% endblock %} 25 | -------------------------------------------------------------------------------- /nablapps/jobs/forms.py: -------------------------------------------------------------------------------- 1 | """ 2 | Forms for jobs app 3 | """ 4 | 5 | from django import forms 6 | from django.forms import ModelForm 7 | 8 | from nablapps.jobs.models import Advert, Company 9 | 10 | 11 | class AdvertForm(ModelForm): 12 | """Form for creating and updating an advert""" 13 | 14 | headline = forms.CharField( 15 | help_text="Tittelen på stillingsannonsen. Bør inneholde bedriftens navn", 16 | ) 17 | 18 | class Meta: 19 | model = Advert 20 | fields = "__all__" 21 | 22 | 23 | class CompanyForm(ModelForm): 24 | """Form for creating and updating a Company object""" 25 | 26 | name = forms.CharField(help_text="Navnet på bedriften") 27 | 28 | class Meta: 29 | model = Company 30 | fields = "__all__" 31 | -------------------------------------------------------------------------------- /nablapps/nabladet/admin.py: -------------------------------------------------------------------------------- 1 | """ 2 | Admin interface for nabladet app 3 | """ 4 | 5 | from django.contrib import admin 6 | 7 | from image_cropping import ImageCroppingMixin 8 | 9 | from nablapps.news.admin import add_to_frontpage 10 | 11 | from .models import Nablad 12 | 13 | 14 | @admin.register(Nablad) 15 | class NabladAdmin(ImageCroppingMixin, admin.ModelAdmin): 16 | """Admin interface for Nablad model""" 17 | 18 | fields = ( 19 | "is_public", 20 | "picture", 21 | "cropping", 22 | "headline", 23 | "slug", 24 | "lead_paragraph", 25 | "body", 26 | "pub_date", 27 | "file", 28 | "file_nsfw", 29 | ) 30 | prepopulated_fields = {"slug": ("headline",)} 31 | actions = [add_to_frontpage] 32 | -------------------------------------------------------------------------------- /nablapps/nabladet/migrations/0010_nablad_file_nsfw.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.18 on 2019-02-04 19:21 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("nabladet", "0009_nablad_filename"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name="nablad", 16 | name="file_nsfw", 17 | field=models.FileField( 18 | blank=True, 19 | help_text="Filnavn", 20 | null=True, 21 | upload_to="nabladet", 22 | verbose_name="PDF-fil NSFW", 23 | ), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /nablapps/officeCalendar/migrations/0003_auto_20190330_1405.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.5 on 2019-03-30 14:05 2 | 3 | import django.db.models.deletion 4 | from django.conf import settings 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("officeCalendar", "0002_auto_20190325_2028"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="officeevent", 16 | name="contact_person", 17 | field=models.ForeignKey( 18 | on_delete=django.db.models.deletion.CASCADE, 19 | to=settings.AUTH_USER_MODEL, 20 | verbose_name="Person of contact", 21 | ), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /nablapps/com/migrations/0006_auto_20191003_1624.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.9 on 2019-10-03 16:24 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("com", "0005_auto_20191003_1327"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterField( 13 | model_name="compage", 14 | name="picture", 15 | field=models.ImageField( 16 | blank=True, 17 | help_text="Bilder som er større enn 770x300 px ser best ut. Du kan beskjære bildet etter opplasting.", 18 | null=True, 19 | upload_to="uploads/com_pictures", 20 | verbose_name="Bilde", 21 | ), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /nablapps/nablashop/migrations/0004_auto_20220702_1315.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.14 on 2022-07-02 13:15 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("nablashop", "0003_auto_20211007_1933"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterField( 13 | model_name="product", 14 | name="price", 15 | field=models.DecimalField( 16 | decimal_places=2, default=0, max_digits=5, verbose_name="pris" 17 | ), 18 | ), 19 | migrations.AlterField( 20 | model_name="product", 21 | name="stock", 22 | field=models.IntegerField(default=0, verbose_name="antall"), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /nablapps/news/migrations/0005_auto_20171006_0216.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-10-06 02:16 3 | from __future__ import unicode_literals 4 | 5 | import django.utils.timezone 6 | from django.db import migrations, models 7 | 8 | 9 | class Migration(migrations.Migration): 10 | dependencies = [ 11 | ("news", "0004_auto_20171006_0006"), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterField( 16 | model_name="news", 17 | name="last_changed_date", 18 | field=models.DateTimeField( 19 | blank=True, 20 | default=django.utils.timezone.now, 21 | null=True, 22 | verbose_name="Redigeringsdato", 23 | ), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /nablapps/vote/migrations/0010_auto_20220215_1109.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.14 on 2022-02-15 11:09 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("vote", "0009_votingevent_polling_period"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="votingevent", 14 | name="display_description_users", 15 | field=models.BooleanField( 16 | default=True, verbose_name="Display the description to users" 17 | ), 18 | ), 19 | migrations.AlterField( 20 | model_name="voting", 21 | name="description", 22 | field=models.TextField(blank=True), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /static/css/about.css: -------------------------------------------------------------------------------- 1 | .main-grid-container{ 2 | display: grid; 3 | grid-template-columns: 30% 70%; 4 | grid-template-areas: 5 | "navbar content"; 6 | grid-gap: 1rem; 7 | } 8 | 9 | .nav-list{ 10 | list-style: none; 11 | } 12 | 13 | .navbar-container{ 14 | margin-right: 10px; 15 | } 16 | 17 | .content-container{ 18 | } 19 | 20 | .nav-list li{ 21 | display: block; 22 | padding: 5px; 23 | background-color: #F2F2F2; 24 | border-radius: 5px; 25 | margin: 1%; 26 | } 27 | 28 | .nav-list a{ 29 | color: black; 30 | } 31 | 32 | .nav-list li:hover{ 33 | background-color: grey; 34 | } 35 | 36 | 37 | @media (max-width: 600px){ 38 | .main-grid-container{ 39 | display: flex; 40 | flex-direction: column-reverse; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /nablapps/accounts/migrations/0004_auto_20150927_1840.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("accounts", "0003_auto_20150925_2315"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="registrationrequest", 15 | name="first_name", 16 | field=models.CharField(max_length=80, null=True, verbose_name="Fornavn"), 17 | ), 18 | migrations.AddField( 19 | model_name="registrationrequest", 20 | name="last_name", 21 | field=models.CharField(max_length=80, null=True, verbose_name="Etternavn"), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /nablapps/events/tests/test_feed.py: -------------------------------------------------------------------------------- 1 | """ 2 | Test the event rss feed 3 | """ 4 | 5 | # pylint: disable=C0111,C0301 6 | from django.test import Client, TestCase, override_settings 7 | from django.urls import reverse 8 | 9 | from nablapps.events.models import Event 10 | 11 | 12 | @override_settings(ROOT_URLCONF="nablapps.events.urls") 13 | class RecentEventsTestCase(TestCase): 14 | def test_feed(self): 15 | events = [ 16 | Event.objects.create(headline=f"Event{i}", lead_paragraph=f"Yo{i}") 17 | for i in range(10) 18 | ] 19 | c = Client() 20 | response = c.get(reverse("event_feed")) 21 | for event in events: 22 | self.assertContains(response, event.headline) 23 | self.assertContains(response, event.lead_paragraph) 24 | -------------------------------------------------------------------------------- /nablapps/interactive/migrations/0002_auto_20171106_2322.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-11-06 23:22 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("interactive", "0001_squashed_0022_adventdoor_user_test"), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name="adventdoor", 16 | name="view_counter", 17 | ), 18 | migrations.RemoveField( 19 | model_name="quiz", 20 | name="view_counter", 21 | ), 22 | migrations.RemoveField( 23 | model_name="test", 24 | name="view_counter", 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /nablapps/officeCalendar/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin, messages 2 | 3 | from .models import OfficeEvent 4 | 5 | 6 | @admin.register(OfficeEvent) 7 | class OfiiceEventAdmin(admin.ModelAdmin): 8 | """Admin interface for OfficeEvent""" 9 | 10 | def get_changeform_initial_data(self, request): 11 | return {"contact_person": request.user.pk} 12 | 13 | def save_model(self, request, obj, form, change): 14 | if obj.check_overlap().exists(): 15 | messages.warning( 16 | request, 17 | "Dette eventet overlapper med et annet event! Ditt event ble reservert,\ 18 | men vær bevisst på at det nå er flere reservasjoner for det tidsrommet.", 19 | ) 20 | super().save_model(request, obj, form, change) 21 | -------------------------------------------------------------------------------- /nablapps/qrTickets/migrations/0002_qrevent_nabla_event.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-10-11 22:49 2 | 3 | import django.db.models.deletion 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("events", "0011_auto_20200909_1636"), 10 | ("qrTickets", "0001_initial"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name="qrevent", 16 | name="nabla_event", 17 | field=models.ForeignKey( 18 | blank=True, 19 | null=True, 20 | on_delete=django.db.models.deletion.CASCADE, 21 | related_name="qr_event_set", 22 | to="events.Event", 23 | ), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /nablapps/poll/context_processors.py: -------------------------------------------------------------------------------- 1 | """ 2 | Context processors for poll app 3 | """ 4 | 5 | from .models import Poll 6 | 7 | 8 | def poll_context(request): 9 | """ 10 | Return a context containing: 11 | 12 | 'poll': 13 | 'poll_has_voted': 14 | 'poll_total_votes': 15 | 16 | or an empty context if there is no current poll. 17 | """ 18 | 19 | try: 20 | poll = Poll.objects.current_poll() 21 | return { 22 | "poll": poll, 23 | "poll_has_voted": poll.user_has_voted(request.user), 24 | "poll_total_votes": poll.get_total_votes(), 25 | } 26 | except Poll.DoesNotExist: 27 | return {} 28 | -------------------------------------------------------------------------------- /nablapps/album/templates/album/album_list.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load bootstrap4 %} 3 | {% load easy_thumbnails %} 4 | {% block title %}Bilder{% endblock %} 5 | {% block more_head %} 6 | {% endblock %} 7 | 8 | {% block main-blank %} 9 |

Bildealbum

10 |
11 | {% for album in albums %} 12 |
13 | {% include "includes/info_card.html" with content=album img_file=album.first.file header_size="h4" class="h-100" %} 14 |
15 | {% endfor %} 16 |
17 | 22 | 23 | {% endblock main-blank %} 24 | -------------------------------------------------------------------------------- /nablapps/events/migrations/0013_auto_20210909_2046.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2021-09-09 20:46 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("events", "0012_auto_20201021_2154"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterField( 13 | model_name="event", 14 | name="has_queue", 15 | field=models.BooleanField( 16 | blank=True, 17 | help_text="Om ventelisten er på, vil det være mulig å melde seg på selv om arrangementet er fullt. De som er i ventelisten vil automatisk bli påmeldt etter hvert som plasser blir ledige.", 18 | null=True, 19 | verbose_name="har venteliste", 20 | ), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /nablapps/interactive/templates/interactive/quiz_list.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %} 4 | Quiz 5 | {% endblock %} 6 | 7 | {% block content %} 8 |

Quiz

9 |
    10 | {% for quiz in quiz_list %} 11 | 12 | {% with user=quiz.created_by %} 13 |
  • 14 | 15 | {% if user.get_full_name %} 16 | {{ user.get_full_name }} 17 | {% else %} 18 | {{ user.username }} 19 | {% endif %} 20 | 21 | {{ quiz.title }} 22 | Highscore 23 |
  • 24 | {% endwith %} 25 | {% empty %} 26 | Ingen quiz her enda. 27 | {% endfor %} 28 |
29 | 30 | {% include "includes/pagination.html" %} 31 | 32 | 33 | {% endblock %} 34 | {% block sidebar %} 35 | {% endblock %} 36 | -------------------------------------------------------------------------------- /templates/nablashop/includes/category-sidebar.html: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /nablapps/events/migrations/0007_eventregistration_attendance_registration.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-07-03 23:01 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("events", "0006_auto_20200629_1958"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AddField( 13 | model_name="eventregistration", 14 | name="attendance_registration", 15 | field=models.DateTimeField( 16 | blank=True, 17 | default=None, 18 | help_text="Hvis dette tidspunktet er satt er det gjort en regisrering på at brukeren har møtt opp", 19 | null=True, 20 | verbose_name="Første regisreringstidspunkt", 21 | ), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /nablapps/vote/migrations/0004_votingevent_eligible_group.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.7 on 2021-04-13 13:46 2 | 3 | import django.db.models.deletion 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("accounts", "0006_auto_20210413_1346"), 10 | ("vote", "0003_auto_20210210_2135"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name="votingevent", 16 | name="eligible_group", 17 | field=models.ForeignKey( 18 | blank=True, 19 | null=True, 20 | on_delete=django.db.models.deletion.CASCADE, 21 | related_name="voting_events", 22 | to="accounts.nablagroup", 23 | ), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /nablapps/exchange/migrations/0008_auto_20201104_2016.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-11-04 20:16 2 | 3 | import django.db.models.deletion 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("exchange", "0007_auto_20201104_1946"), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name="exchange", 15 | name="fag", 16 | ), 17 | migrations.AddField( 18 | model_name="subject", 19 | name="exchange", 20 | field=models.ForeignKey( 21 | blank=True, 22 | null=True, 23 | on_delete=django.db.models.deletion.CASCADE, 24 | to="exchange.Exchange", 25 | ), 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /nablapps/interactive/migrations/0018_auto_20210909_2046.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.13 on 2021-09-09 20:46 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("interactive", "0017_quiz_spoiler_text"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterField( 13 | model_name="quiz", 14 | name="published", 15 | field=models.BooleanField( 16 | default=True, null=True, verbose_name="Publisert" 17 | ), 18 | ), 19 | migrations.AlterField( 20 | model_name="test", 21 | name="published", 22 | field=models.BooleanField( 23 | default=True, null=True, verbose_name="Publisert" 24 | ), 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /nablapps/interactive/templates/interactive/user_test_new.html: -------------------------------------------------------------------------------- 1 | {% extends "interactive/user_test_base.html" %} 2 | 3 | {% block content %} 4 | 5 |
6 | {% csrf_token %} 7 | {% for question in test.questions.all %} 8 |

{{ forloop.counter }}. {{ question.text }}

9 |
    10 | {% for alt in question.alternatives.all %} 11 |
  • 12 | 13 | 14 |
  • 15 | {% endfor %} 16 |
17 | {% endfor %} 18 | 21 |
22 | 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /nablapps/poll/templates/poll/poll_include.html: -------------------------------------------------------------------------------- 1 | {% load humanize %} 2 | {% load cache %} 3 | {% load sekizai_tags %} 4 | {% load static %} 5 | 6 | 7 | {% addtoblock "css" %} 8 | 9 | {% endaddtoblock %} 10 |
11 | Siste forsideavstemning 12 |
13 |
14 | {% if poll %} 15 |

{{ poll.question }}

16 | {% if poll_has_voted %} 17 | {% include "poll/includes/poll_result.html" %} 18 | {% else %} 19 | {% include "poll/includes/vote_form.html" %} 20 | {% endif %} 21 | {% else %} 22 |

Siste forsideavstemning

23 |

...vil dukke opp her når det kommer!

24 | {% endif %} 25 |
26 | -------------------------------------------------------------------------------- /nablapps/news/signals.py: -------------------------------------------------------------------------------- 1 | """ 2 | Defines and registers django signal receivers 3 | """ 4 | 5 | from django.contrib.contenttypes.models import ContentType 6 | from django.db.models.signals import pre_delete 7 | from django.dispatch import receiver 8 | 9 | from .models import FrontPageNews 10 | 11 | 12 | @receiver(pre_delete) 13 | def callback(sender, instance, **kwargs): # pylint: disable=W0613 14 | """ 15 | Delete front-page-items corresponding to a deleted object 16 | 17 | Unless this is done, there will be things on the front-page not corresponding to 18 | an existing object. 19 | """ 20 | if not hasattr(instance, "id"): 21 | return 22 | 23 | FrontPageNews.objects.filter( 24 | object_id=instance.id, 25 | content_type=ContentType.objects.get_for_model(instance.__class__), 26 | ).delete() 27 | -------------------------------------------------------------------------------- /nablapps/news/views.py: -------------------------------------------------------------------------------- 1 | """ 2 | Views for the news app 3 | """ 4 | 5 | from django.views.generic import DetailView, ListView 6 | 7 | from braces.views import FormMessagesMixin, LoginRequiredMixin 8 | 9 | from nablapps.core.view_mixins import AdminLinksMixin 10 | 11 | from .models import NewsArticle 12 | 13 | 14 | class NewsListView(LoginRequiredMixin, ListView): 15 | """List of news-articles""" 16 | 17 | model = NewsArticle 18 | context_object_name = "news_list" 19 | template_name = "news/news_list.html" 20 | paginate_by = 8 21 | queryset = NewsArticle.objects.order_by("-pk") 22 | 23 | 24 | class NewsDetailView(LoginRequiredMixin, AdminLinksMixin, DetailView): 25 | """Show a single news-article""" 26 | 27 | model = NewsArticle 28 | context_object_name = "news" 29 | template_name = "news/news_detail.html" 30 | -------------------------------------------------------------------------------- /nablapps/com/migrations/0007_auto_20191003_1658.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.1.9 on 2019-10-03 16:58 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("com", "0006_auto_20191003_1624"), 9 | ] 10 | 11 | operations = [ 12 | migrations.RemoveField( 13 | model_name="compage", 14 | name="cropping", 15 | ), 16 | migrations.AlterField( 17 | model_name="compage", 18 | name="picture", 19 | field=models.ImageField( 20 | blank=True, 21 | help_text="Last opp din undergruppes logo.", 22 | null=True, 23 | upload_to="uploads/com_pictures", 24 | verbose_name="Bilde", 25 | ), 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /templates/flatpages/newStudent.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load markdown %} 3 | {% load flatpages %} 4 | 5 | {% block more_head %} 6 | {{ block.super }} 7 | 27 | {% endblock %} 28 | 29 | {% block title %} 30 | {{ block.super }} - {{ flatpage.title }} 31 | {% endblock %} 32 | 33 | {% block content %} 34 |

{{ flatpage.title }}

35 | {{ flatpage.content|markdown:"unsafe"}} 36 | {% endblock %} 37 | -------------------------------------------------------------------------------- /templates/nablashop/purchase.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block more_head %} 4 | 5 | 16 | {% endblock %} 17 | 18 | {% block main %} 19 |
20 |

Scan NTNU-kortet ditt for å betale

21 |
22 | {% csrf_token %} 23 | {% for field in form %} 24 | {{ field.errors }} 25 | {{ field }} 26 | {% endfor %} 27 | 28 |
29 |
30 | {% endblock %} 31 | -------------------------------------------------------------------------------- /nablapps/events/migrations/0004_news_ptr_to_id_20171006_1559.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("events", "0003_move_fields_from_news"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="event", 15 | name="news_ptr", 16 | field=models.AutoField( 17 | auto_created=True, 18 | default=1, 19 | primary_key=True, 20 | serialize=False, 21 | verbose_name="ID", 22 | ), 23 | preserve_default=False, 24 | ), 25 | migrations.RenameField(model_name="event", old_name="news_ptr", new_name="id"), 26 | ] 27 | -------------------------------------------------------------------------------- /nablapps/events/migrations/0005_20191018_modify_open_for.py: -------------------------------------------------------------------------------- 1 | # open_for in RegistrationInfoMixins in mixins to events can only be applied to FysmatClass objects 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("events", "0004_move_bedpres_objects_to_event_20191003"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterField( 13 | model_name="event", 14 | name="open_for", 15 | field=models.ManyToManyField( 16 | blank=True, 17 | help_text="Hvilke grupper som får lov til å melde seg på arrangementet. Hvis ingen grupper er valgt er det åpent for alle.", 18 | to="accounts.FysmatClass", 19 | verbose_name="Åpen for", 20 | ), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /nablapps/mailfeed/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from .views import ( 4 | CreateMailFeedView, 5 | MailFeedDetailView, 6 | MailFeedListView, 7 | SubscribeView, 8 | UnsubscribeView, 9 | ) 10 | 11 | urlpatterns = [ 12 | path("", MailFeedListView.as_view(), name="mailfeed-list"), 13 | path( 14 | "detail//", 15 | MailFeedDetailView.as_view(), 16 | name="mailfeed-detail", 17 | ), 18 | path("create-mailfeed/", CreateMailFeedView.as_view(), name="create-mailfeed"), 19 | path( 20 | "subscribe//", 21 | SubscribeView.as_view(), 22 | name="subscribe-mailfeed", 23 | ), 24 | path( 25 | "unsubscribe//", 26 | UnsubscribeView.as_view(), 27 | name="unsubscribe-mailfeed", 28 | ), 29 | ] 30 | -------------------------------------------------------------------------------- /nablapps/nabladet/migrations/0006_news_ptr_to_id_20171006_1559.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ("nabladet", "0005_move_fields_from_news"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="nablad", 15 | name="news_ptr", 16 | field=models.AutoField( 17 | auto_created=True, 18 | default=1, 19 | primary_key=True, 20 | serialize=False, 21 | verbose_name="ID", 22 | ), 23 | preserve_default=False, 24 | ), 25 | migrations.RenameField(model_name="nablad", old_name="news_ptr", new_name="id"), 26 | ] 27 | -------------------------------------------------------------------------------- /templates/comments/delete.html: -------------------------------------------------------------------------------- 1 | {% extends "comments/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block title %}{% trans "Remove a comment" %}{% endblock %} 5 | 6 | {% block content %} 7 |

{% trans "Really remove this comment?" %}

8 |
9 | {% include "comments/comment_line.html" with user=comment.user is_preview=True comment_content=comment.comment %} 10 |
11 |
{% csrf_token %} 12 | 13 | {% if next %}
{% endif %} 14 |

15 | eller Avbryt 16 |

17 |
18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /templates/flatpages/default.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load markdown %} 3 | {% load flatpages %} 4 | 5 | {% block title %} 6 | {{ block.super }} - {{ flatpage.title }} 7 | {% endblock %} 8 | 9 | {% block content %} 10 |

{{ flatpage.title }}

11 | {{ flatpage.content|markdown:"unsafe"}} 12 | {% endblock %} 13 | 14 | {% block sidebar %} 15 | {% get_flatpages primary_dir_slashes as about_pages %} 16 | 26 | {% endblock %} 27 | -------------------------------------------------------------------------------- /nablapps/vote/migrations/0002_auto_20210203_1912.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2021-02-03 19:12 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 10 | ("vote", "0001_initial"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelOptions( 15 | name="votingevent", 16 | options={"permissions": [("vote_admin", "can administer voting")]}, 17 | ), 18 | migrations.AlterField( 19 | model_name="voting", 20 | name="users_voted", 21 | field=models.ManyToManyField( 22 | blank=True, related_name="users_voted", to=settings.AUTH_USER_MODEL 23 | ), 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /nablaweb/settings/README.md: -------------------------------------------------------------------------------- 1 | # Settings # 2 | 3 | Django-settings til nablaweb ligger i flere forskjellige filer. 4 | 5 | ## Settings filer som ligger i repo ## 6 | * base.py inneholder alt som er felles for alle filene. De andre filene importer inn innholdet i base.py. 7 | * devel.py er for for å drive med utvikling. 8 | * production.py er for produksjon 9 | 10 | manage.py bruker automatisk devel.py. 11 | 12 | ## Egne settings-filer ## 13 | Hvis du trenger å bruke din egen settings-fil kan enten gi et ekstra argument --settings til manage.py eller sette miljøvariabelen DJANGO_SETTINGS_MODULE. 14 | 15 | For å bruke settings-filen nablaweb/settings/hiasen.py skriver man 16 | ``` 17 | python manage.py runserver --settings=nablweb.settings.hiasen 18 | ``` 19 | 20 | eller 21 | ``` 22 | export DJANGO_MODULE_SETTINGS=nablaweb.settings.hiasen 23 | python manage.py runserver 24 | ``` 25 | -------------------------------------------------------------------------------- /nablapps/album/migrations/0005_auto_20200630_2211.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-06-30 22:11 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("album", "0004_remove_album_view_counter"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterField( 13 | model_name="album", 14 | name="level", 15 | field=models.PositiveIntegerField(editable=False), 16 | ), 17 | migrations.AlterField( 18 | model_name="album", 19 | name="lft", 20 | field=models.PositiveIntegerField(editable=False), 21 | ), 22 | migrations.AlterField( 23 | model_name="album", 24 | name="rght", 25 | field=models.PositiveIntegerField(editable=False), 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /nablapps/core/templates/core/general_about.html: -------------------------------------------------------------------------------- 1 | {% extends "about.html" %} 2 | 3 | {% block content %} 4 |
5 |

Linjeforeningen Nabla

6 |

7 | Nabla er linjeforeningen for sivilingeniørprogrammet Fysikk og matematikk ved NTNU. Du kan lese mer om studiet på NTNU sine nettsider. På denne nettsiden finner du informasjon om studiet, linjeforeningen, og hva som foregår. Ta gjerne turen innom nablakontoret i kontortida for kaffe, vafler og en hyggelig prat. Vi selger også kompendier. 8 |

9 | Styremøter tirsdager kl.08:15-10:00 i R41
10 | Styret har ukentlige møter, og her har du som komponent møterett. Om du vil komme innom på et av møtene våre, ta kontakt med et av styremedlemmene, eller hele styret: 11 | nabla@nabla.no 12 |

13 |
14 | {% endblock content %} 15 | -------------------------------------------------------------------------------- /nablapps/poll/templates/poll/includes/poll_result.html: -------------------------------------------------------------------------------- 1 | {# Saving total votes in a variable in order to avoid computing it multiple times #} 2 | {% with poll_total_votes=poll.get_total_votes %} 3 |

{{ poll_total_votes }} bruker{% if poll_total_votes > 1 %}e{% endif %} har stemt.

4 | 5 | {% for choice in poll.choices.all %} 6 |
{{ choice.choice }}
7 |
8 |
9 | 10 | {% widthratio choice.votes poll_total_votes 100%}% 11 | 12 |
13 |
14 | {% endfor %} 15 | {% if poll.answer %} 16 |

Svar: {{ poll.answer }}

17 | {% endif %} 18 | {% endwith %} 19 | -------------------------------------------------------------------------------- /nablapps/accounts/migrations/0005_auto_20200827_1523.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-08-27 15:23 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | dependencies = [ 8 | ("accounts", "0004_auto_20190204_2011"), 9 | ] 10 | 11 | operations = [ 12 | migrations.AlterField( 13 | model_name="nablauser", 14 | name="ntnu_card_number", 15 | field=models.CharField( 16 | blank=True, 17 | help_text="Dette er et 7-10-sifret nummer på baksiden av kortet. På nye kort er dette sifrene etter EM. På gamle kort er dette sifrene nede til venstre. Det kan brukes of å identifisere deg på bedriftspresentasjoner og andre arrangementer. ", 18 | max_length=10, 19 | verbose_name="NTNU kortnr", 20 | ), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /nablapps/jobs/migrations/0006_auto_20171006_1559.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.5 on 2017-10-06 15:59 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("jobs", "0005_move_fields_from_news"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="advert", 16 | name="news_ptr", 17 | field=models.AutoField( 18 | auto_created=True, 19 | default=1, 20 | primary_key=True, 21 | serialize=False, 22 | verbose_name="ID", 23 | ), 24 | preserve_default=False, 25 | ), 26 | migrations.RenameField(model_name="advert", old_name="news_ptr", new_name="id"), 27 | ] 28 | -------------------------------------------------------------------------------- /nablapps/nablashop/migrations/0002_auto_20201021_2154.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.0.7 on 2020-10-21 21:54 2 | 3 | from django.db import migrations 4 | 5 | import ckeditor.fields 6 | 7 | 8 | class Migration(migrations.Migration): 9 | dependencies = [ 10 | ("nablashop", "0001_initial"), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name="category", 16 | name="description", 17 | field=ckeditor.fields.RichTextField(), 18 | ), 19 | migrations.AlterField( 20 | model_name="product", 21 | name="description", 22 | field=ckeditor.fields.RichTextField(), 23 | ), 24 | migrations.AlterField( 25 | model_name="product", 26 | name="description_short", 27 | field=ckeditor.fields.RichTextField(), 28 | ), 29 | ] 30 | -------------------------------------------------------------------------------- /nablapps/officeBeer/templates/officeBeer/deposit.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | Tilbake til kontoside 5 |

Sett inn Nablacoin

6 | Her kan du skrive inn hvor mye du har satt inn via Vipps. Kjellerstyret vil så godkjenne innskuddet når de ser at pengene har gått igjennom. 7 |
8 | {% csrf_token %} 9 | {{ form }} 10 | 11 |
12 | 13 |

Innskudd som venter på godkjenning:

14 | Når et innskudd blir godkjent av kjellerstyret forsvinner innskuddet fra denne siden, og dukker opp på din konto. 15 |
    16 | {% for req in deposit_requests %} 17 |
  • {{ req.created|date:"d b Y" }} - {{ req.amount }}kr.
  • 18 | {% endfor %} 19 |
20 | {% endblock %} 21 | --------------------------------------------------------------------------------