forked from EGCETSII/decide_django_2
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from Villanueva-del-Trabuco-EGC/develop
Actualización de master con funcionalidad estable
- Loading branch information
Showing
46 changed files
with
1,655 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# decide auth translation | ||
# This file is distributed under the same license as the main project | ||
|
||
# Translators: Francisco Javier Migueles <[email protected]>, 2022 | ||
|
||
msgid "" | ||
msgstr "" | ||
|
||
"Language: en\n" | ||
"Last-Translator: Francisco Javier Migueles\n" | ||
"POT-Creation-Date: 2022-12-01 18:45+0100\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
|
||
msgid "registrar" | ||
msgstr "Registration" | ||
|
||
msgid "infoRegistrar" | ||
msgstr "Please fill in this form to create an account." | ||
|
||
msgid "first_name" | ||
msgstr "First Name" | ||
|
||
msgid "last_name" | ||
msgstr "Last Name" | ||
|
||
msgid "username" | ||
msgstr "Username" | ||
|
||
msgid "email" | ||
msgstr "Email" | ||
|
||
msgid "password" | ||
msgstr "Password" | ||
|
||
msgid "acceptRegister" | ||
msgstr "By registering, you accept the" | ||
|
||
msgid "terms" | ||
msgstr "Terms & Privacy" | ||
|
||
msgid "alreadyAccount" | ||
msgstr "Already have an account?" | ||
|
||
msgid "sign" | ||
msgstr "Sign In" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
decide/authentication/templates/template_activate_account.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
{% autoescape off %} | ||
Hi {{ user.username }}, | ||
Welcome to Decide Villanueva del Trabuco. | ||
Before you can vote in our system or use Decide, we need you to activate your account. | ||
|
||
Please click on the link below to confirm your registration: | ||
|
||
{{protocol}}://{{domain}}{% url 'activate' uidb64=uid token=token %} | ||
|
||
We hope you enjoy your time using Decide Villanueva del Trbuco. | ||
If you have any suggestion to improve our web, send an e-mail to this account with the subject: BetterDecide!. | ||
{% endautoescape %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ def setUp(self): | |
self.client = APIClient() | ||
mods.mock_query(self.client) | ||
u = User(username='voter1') | ||
u.email = '[email protected]' | ||
u.set_password('123') | ||
u.save() | ||
|
||
|
@@ -38,6 +39,19 @@ def test_login_fail(self): | |
response = self.client.post('/authentication/login/', data, format='json') | ||
self.assertEqual(response.status_code, 400) | ||
|
||
def test_login_email(self): | ||
data = {'username': '[email protected]', 'password': '123'} | ||
response = self.client.post('/authentication/login/', data, format='json') | ||
self.assertEqual(response.status_code, 200) | ||
|
||
token = response.json() | ||
self.assertTrue(token.get('token')) | ||
|
||
def test_login_fail_email(self): | ||
data = {'username': '[email protected]', 'password': '321'} | ||
response = self.client.post('/authentication/login/', data, format='json') | ||
self.assertEqual(response.status_code, 400) | ||
|
||
def test_getuser(self): | ||
data = {'username': 'voter1', 'password': '123'} | ||
response = self.client.post('/authentication/login/', data, format='json') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# decide base translation | ||
# This file is distributed under the same license as the main project | ||
|
||
# Translators: Francisco Javier Migueles Dominguez <[email protected]>, 2022 | ||
|
||
msgid "" | ||
msgstr "" | ||
|
||
"Language: es\n" | ||
"Last-Translator: Francisco Javier Migueles Dominguez\n" | ||
"POT-Creation-Date: 2022-12-04 11:00+0100\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# decide booth translation | ||
# This file is distributed under the same license as the main project | ||
|
||
# Translators: Francisco Javier Migueles <[email protected]>, 2022 | ||
|
||
msgid "" | ||
msgstr "" | ||
|
||
"Language: en\n" | ||
"Last-Translator: Francisco Javier Migueles\n" | ||
"POT-Creation-Date: 2022-12-01 18:00+0100\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
|
||
# Booth | ||
|
||
msgid "decide" | ||
msgstr "Decide" | ||
|
||
msgid "logout" | ||
msgstr "Logout" | ||
|
||
msgid "vID" | ||
msgstr "ID of Vote" | ||
|
||
msgid "vName" | ||
msgstr "Name of voting" | ||
|
||
msgid "Login" | ||
msgstr "Login" | ||
|
||
msgid "LoginGitHub" | ||
msgstr "Login with GitHub" | ||
|
||
msgid "LoginFacebook" | ||
msgstr "Login with Facebook" | ||
|
||
msgid "Vote" | ||
msgstr "Vote" | ||
|
||
msgid "Error" | ||
msgstr "Error" | ||
|
||
msgid "Conglatulations. Your vote has been sent" | ||
msgstr "Conglatulations. Your vote has been sent" | ||
|
||
msgid "registered_as_1" | ||
msgstr "You are registered " | ||
|
||
msgid "registered_as_2" | ||
msgstr " as " | ||
|
||
msgid "vote_with" | ||
msgstr "You have voted with" | ||
|
||
# Votings | ||
|
||
msgid "voting" | ||
msgstr "Voting" | ||
|
||
msgid "link_voting" | ||
msgstr "Link to voting" | ||
|
||
msgid "link_census" | ||
msgstr "Link to census" | ||
|
||
msgid "booth_voting" | ||
msgstr "Booth to voting" | ||
|
||
msgid "closed_voting" | ||
msgstr "Voting closed" | ||
|
||
msgid "voting_census" | ||
msgstr "Census of voting" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.