diff options
author | 2018-06-07 16:34:59 +0100 | |
---|---|---|
committer | 2018-06-07 16:34:59 +0100 | |
commit | c5d8157670ea2b7f448fc41ca790b25c03a4bedb (patch) | |
tree | 428bb0f210b9094d6d147cd2c20144de5c1e8b2e /pysite/views/main | |
parent | [CI] Add deployment env and cache .gem (diff) |
Replace GitHub with GitLab across the project
Diffstat (limited to 'pysite/views/main')
-rw-r--r-- | pysite/views/main/jams/profile.py | 6 | ||||
-rw-r--r-- | pysite/views/main/redirects/github.py | 2 | ||||
-rw-r--r-- | pysite/views/main/redirects/gitlab.py | 8 |
3 files changed, 12 insertions, 4 deletions
diff --git a/pysite/views/main/jams/profile.py b/pysite/views/main/jams/profile.py index f84534e6..e918c135 100644 --- a/pysite/views/main/jams/profile.py +++ b/pysite/views/main/jams/profile.py @@ -45,13 +45,13 @@ class JamsProfileView(RouteView, DBMixin, OAuthMixin): if not participant: participant = {"id": self.user_data["user_id"]} - github_username = request.form.get("github_username") + gitlab_username = request.form.get("gitlab_username") timezone = request.form.get("timezone") - if not github_username or not timezone: + if not gitlab_username or not timezone: return BadRequest() - participant["github_username"] = github_username + participant["gitlab_username"] = gitlab_username participant["timezone"] = timezone self.db.insert(self.table_name, participant, conflict="replace") diff --git a/pysite/views/main/redirects/github.py b/pysite/views/main/redirects/github.py index 3c74ace3..816d165f 100644 --- a/pysite/views/main/redirects/github.py +++ b/pysite/views/main/redirects/github.py @@ -4,5 +4,5 @@ from pysite.base_route import RedirectView class GitHubView(RedirectView): path = "/github" name = "github" - page = "https://github.com/discord-python/" + page = "https://gitlab.com/discord-python/" code = 302 diff --git a/pysite/views/main/redirects/gitlab.py b/pysite/views/main/redirects/gitlab.py new file mode 100644 index 00000000..eda0e179 --- /dev/null +++ b/pysite/views/main/redirects/gitlab.py @@ -0,0 +1,8 @@ +from pysite.base_route import RedirectView + + +class GitLabView(RedirectView): + path = "/gitlab" + name = "gitlab" + page = "https://gitlab.com/discord-python/" + code = 302 |