コード例 #1
0
ファイル: views.py プロジェクト: live-t0-ride/electroochered
 def get(self, request, profile_id):
     profile = get_object_or_404(Profile, id=profile_id)
     data = {'requestions_with_logs': self.get_logs_for_profile(profile),
             'profile': profile,
             'plugin_menu_items': get_operator_plugin_menu_items(profile.id),
             'plugin_logs': get_operator_plugin_logs(profile)}
     return self.render_to_response(data)
コード例 #2
0
 def get_context_data(self, **kwargs):
     context = super(ProfileInfo, self).get_context_data(**kwargs)
     context.update(
         {'reset_password_form': HiddenConfirmation(initial={'action': 'reset_password'}),
          'plugin_menu_items': get_operator_plugin_menu_items(context['profile'].id),
          'profile_additions': get_operator_profile_additions(), })
     return context
コード例 #3
0
 def get_context_data(self, **kwargs):
     context = super(ProfileInfo, self).get_context_data(**kwargs)
     context.update(
         {
             "reset_password_form": HiddenConfirmation(initial={"action": "reset_password"}),
             "plugin_menu_items": get_operator_plugin_menu_items(context["profile"].id),
             "profile_additions": get_operator_profile_additions(),
         }
     )
     return context
コード例 #4
0
    def get_context_data(self, requestion, **kwargs):
        context = super(RequestionInfo, self).get_context_data(requestion, **kwargs)

        context["plugin_menu_items"] = get_operator_plugin_menu_items(context["profile"].id)

        return context
コード例 #5
0
    def get_context_data(self, **kwargs):
        context = super(RequestionAdd, self).get_context_data(**kwargs)

        context['plugin_menu_items'] = get_operator_plugin_menu_items(context['profile'].id)

        return context