Override signup view django-allauth

蹲街弑〆低调 提交于 2019-12-04 03:46:55

This link has some details on using your own signup form. IMO, you can define your own form (eventually with a custom widget for the tags) and use it directly, without having to mess with the view.

Otherwise, @PauloAlmeida is correct. You could inherit a new class off SignupView with something like:

class MySignupView(SignupView):

    def get_context_data(self, **kwargs):
        ret = super(MySignupView, self).get_context_data(**kwargs)
        ret['all_tags'] = Tags.get_tags()

        return ret

I'd rather use the custom form approach as it won't mess up the urls.py.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!