Пример #1
0
    def as_dict_for_template_context(self):
        (data, person) = self.get_base_data_dict_and_person()
        if person:
            data.update({
                'pipfreeze_done': mission_completed(person, 'pipvirtualenv_pipfreeze'),
                'piplist_done': mission_completed(person, 'pipvirtualenv_piplist'),
            })

        return data
Пример #2
0
 def as_dict_for_template_context(self):
     (data, person) = self.get_base_data_dict_and_person()
     if person:
         data.update({
             'patchrecursive_done': mission_completed(person, 'diffpatch_patchrecursive'),
             'diffrecursive_done': mission_completed(person, 'diffpatch_diffrecursive'),
             'patchsingle_done': mission_completed(person, 'diffpatch_patchsingle'),
             'diffsingle_done': mission_completed(person, 'diffpatch_diffsingle')
         })
     return data
Пример #3
0
    def as_dict_for_template_context(self):
        (data, person) = self.get_base_data_dict_and_person()
        if person:
            data.update({
                'pipfreeze_done':
                mission_completed(person, 'pipvirtualenv_pipfreeze'),
                'piplist_done':
                mission_completed(person, 'pipvirtualenv_piplist'),
            })

        return data
Пример #4
0
 def as_dict_for_template_context(self):
     (data, person) = self.get_base_data_dict_and_person()
     if person:
         data.update({
             'command_cd_done': mission_completed(person, 'command_cd'),
             'command_ls_done': mission_completed(person, 'command_ls'),
             'command_mkdir_rm_done': mission_completed(person,
                                     'command_mkdir_rm'),
             'command_cp_mv_done': mission_completed(person,
                                     'command_cp_mv'),
             })
     return data
Пример #5
0
 def as_dict_for_template_context(self):
     (data, person) = self.get_base_data_dict_and_person()
     if person:
         data.update({
             'command_cd_done':
             mission_completed(person, 'command_cd'),
             'command_ls_done':
             mission_completed(person, 'command_ls'),
             'command_mkdir_rm_done':
             mission_completed(person, 'command_mkdir_rm'),
             'command_cp_mv_done':
             mission_completed(person, 'command_cp_mv'),
         })
     return data
Пример #6
0
 def as_dict_for_template_context(self):
     (data, person) = self.get_base_data_dict_and_person()
     if person:
         data.update({
             'patchrecursive_done':
             mission_completed(person, 'diffpatch_patchrecursive'),
             'diffrecursive_done':
             mission_completed(person, 'diffpatch_diffrecursive'),
             'patchsingle_done':
             mission_completed(person, 'diffpatch_patchsingle'),
             'diffsingle_done':
             mission_completed(person, 'diffpatch_diffsingle')
         })
     return data
Пример #7
0
 def get_base_data_dict_and_person(self):
     user = self.request.user
     person = None
     data = {
         'this_mission_page_short_name':
         self.this_mission_page_short_name,
         'mission_name':
         self.mission_name,
         'url_prefix':
         getattr(django.conf.settings, 'URL_PREFIX',
                 'http://127.0.0.1:8000'),
         'mission_step_prerequisites_passed':
         not self.mission_step_prerequisite
     }
     if (self.passed_data):
         data.update(self.passed_data)
     if user.is_authenticated():
         person = self.request.user.get_profile()
         if self.mission_step_prerequisite:
             data[
                 'mission_step_prerequisites_passed'] = view_helpers.mission_completed(
                     person, self.mission_step_prerequisite)
         else:
             data['mission_step_prerequisites_passed'] = True
     return (data, person)
Пример #8
0
 def get_base_data_dict_and_person(self):
     user = self.request.user
     person = None
     data = {
         'this_mission_page_short_name': self.this_mission_page_short_name,
         'mission_name': self.mission_name,
         'url_prefix': getattr(django.conf.settings, 'URL_PREFIX', 'http://127.0.0.1:8000'),
         'mission_step_prerequisites_passed': not self.mission_step_prerequisite}
     if (self.passed_data):
         data.update(self.passed_data)
     if user.is_authenticated():
         person = self.request.user.get_profile()
         if self.mission_step_prerequisite:
             data['mission_step_prerequisites_passed'
                  ] = view_helpers.mission_completed(person,
                                                     self.mission_step_prerequisite)
         else:
             data['mission_step_prerequisites_passed'] = True
     return (data, person)
Пример #9
0
 def get_base_data_dict_and_person(self):
     user = self.request.user
     person = None
     data = {
         "this_mission_page_short_name": self.this_mission_page_short_name,
         "mission_name": self.mission_name,
         "url_prefix": getattr(django.conf.settings, "URL_PREFIX", "http://127.0.0.1:8000"),
         "mission_step_prerequisites_passed": not self.mission_step_prerequisite,
     }
     if self.passed_data:
         data.update(self.passed_data)
     if user.is_authenticated():
         person = self.request.user.get_profile()
         if self.mission_step_prerequisite:
             data["mission_step_prerequisites_passed"] = view_helpers.mission_completed(
                 person, self.mission_step_prerequisite
             )
         else:
             data["mission_step_prerequisites_passed"] = True
     return (data, person)