コード例 #1
0
    def existing_conference(self):
        conf = self.get_crrt_conference_key().get()
        template_values = {
            "usr_email": self.get_crrt_user().email(),
            "conf_key": conf.key,
            "crrt_conf": conf,
            "creator_rights": self.rights(conf),
            "home_url": sysinfo.home_url(),
        }

        return template_values
コード例 #2
0
    def new_conference_values(self):
        crrt_conf = conference.Conference()
        template_values = {
            "usr_email": self.get_crrt_user().email(),
            "conf_key": None,
            "crrt_conf": crrt_conf,
            "creator_rights": "",
            "home_url": sysinfo.home_url(),
        }

        return template_values
コード例 #3
0
ファイル: exportcsv.py プロジェクト: allankellynet/mimas
def write_sub(out, sub):
    write_with_comma(out, sub.final_decision())
    write_with_comma(out, sub.submitter())
    speaker = sub.talk.parent().get()
    write_with_comma(out, speaker.email)
    write_with_comma(out, speaker.telephone)
    write_with_comma(out, speaker.address)

    cospeaks = cospeaker.get_cospeakers(sub.key)
    for co in range(0, 2):
        if co < len(cospeaks):
            write_with_comma(out, cospeaks[co].name)
        else:
            write_with_comma(out, "")

    write_with_comma(out, speaker.field(speaker.FIELD_AFFILICATION))
    write_with_comma(out, speaker.field(speaker.FIELD_TWITTER))
    write_with_comma(out, speaker.bio)

    # Field for URL to speaker photo
    if speaker.fullsize_picture == None:
        write_with_comma(out, "None")
    else:
        write_with_comma(
            out,
            sysinfo.home_url() + "/speakerfullimg?img_id=" +
            speaker.key.urlsafe())

    tlk = sub.talk.get()
    write_with_comma(out, tlk.title)
    write_with_comma(out, tlk.field(talk.SHORT_SYNOPSIS))
    write_with_comma(out, tlk.field(talk.LONG_SYNOPSIS))

    conf = sub.key.parent().get()
    write_with_comma(out, conf.track_options()[sub.track_name])
    write_with_comma(out,
                     conf.delivery_format_options()[sub.delivery_format_text])
    write_with_comma(out, conf.duration_options()[sub.duration])
    write_with_comma(out, conf.expenses_options()[sub.expense_expectations])
コード例 #4
0
    def get(self):
        conf_key = ndb.Key(urlsafe=self.request.get("conf"))
        conference = conf_key.get()

        if not(conference.user_rights().has_permission(
                self.get_crrt_user().email(),
                userrightsnames.APPOINT_REVIEWERS)):
            sorrypage.redirect_sorry(self, "AssignTracksReq")
            return

        volunteers = volunteerreviewer.retrieve_all_volunteers(conf_key)

        template_values = {
            "crrt_conf": conference,
            "conf_key": conf_key,
            "tracks": conference.track_options(),
            "volunteers": volunteers,
            "volunteer_count": len(volunteers),
            "home_url": sysinfo.home_url(),
        }

        self.write_page('conference_lib/assignvolreviewerspage.html', template_values)
コード例 #5
0
ファイル: confmsgs.py プロジェクト: allankellynet/mimas
 def mk_request_url(self):
     return sysinfo.home_url(
     ) + "/singlepagesubmission?p=" + self.proto_speaker.key.urlsafe()
コード例 #6
0
ファイル: submissionopts.py プロジェクト: allankellynet/mimas
     lambda sub:(sub.talk.get().title)),
 "short_synopsis": ("Short synopsis",
     lambda sub: (sub.talk.get().field("shortsynopsis"))),
 "long_synopsis": ("Long synopsis",
     lambda sub: (sub.talk.get().field("longsynopsis"))),
 # speaker details
 "email": ("Email",
     lambda sub: (sub.talk.parent().get().email)),
 "first_name": ("First name",
     lambda sub: (sub.talk.parent().get().first_name())),
 "last_name": ("Later names",
     lambda sub: (sub.talk.parent().get().later_names())),
 "bio": ("Biography",
     lambda sub: (sub.talk.parent().get().bio)),
 "picture": ("Picture",
     lambda sub: write_str("https://" + sysinfo.home_url() + sub.talk.parent().get().full_image_url())),
 "webpage": ("Webpage",
     lambda sub: (sub.talk.parent().get().field(speaker.Speaker.FIELD_WEBPAGE))),
 "blog": ("Blog",
     lambda sub: (sub.talk.parent().get().field(speaker.Speaker.FIELD_BLOG))),
 "linkedin": ("Linkedin",
     lambda sub: (sub.talk.parent().get().field(speaker.Speaker.FIELD_LINKEDIN))),
 "country": ("Country",
     lambda sub: (sub.talk.parent().get().field(speaker.Speaker.FIELD_COUNTRY))),
 "twitter": ("Twitter",
     lambda sub: "https://twitter.com/" + (sub.talk.parent().get().field(speaker.Speaker.FIELD_TWITTER))),
 "affiliation": ("Affiliation",
     lambda sub: (sub.talk.parent().get().field(speaker.Speaker.FIELD_AFFILICATION))),
 "telephone": ("Telephone",
     lambda sub: (sub.talk.parent().get().field(speaker.Speaker.FIELD_TELEPHONE))),
 "address": ("Address",
コード例 #7
0
ファイル: test_sysinfo.py プロジェクト: allankellynet/mimas
 def test_home_url(self):
     # can't really test this one without running
     self.assertEquals(sysinfo.home_url(), "")
コード例 #8
0
ファイル: speaker.py プロジェクト: allankellynet/mimas
 def full_image_url(self):
     if image.image_exists(self.key):
         return sysinfo.home_url() + "/speakerfullimg?spk_id=" + self.key.urlsafe()
     else:
         return sysinfo.home_url() + "/sorry_page?reason=NoImage"