Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Issue 823 improve textcha for registration #1391

Open
wants to merge 3 commits into
base: ep2021
Choose a base branch
from

Conversation

ethancarlsson
Copy link
Contributor

#823

Textchas will now be created using regular expressions to allow multiple possible answers. Ignores case for all answers. Model now includes a verbose name describing the need to use regular expressions (and includes a migration to reflect this). Altered the test slightly to better test the new functionality.

@@ -0,0 +1,18 @@
# Generated by Django 2.2.19 on 2021-05-07 18:47
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please recreate the migration (version 0030 is already taken by now) and rename the file to better explain what the migration is about.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed the migration to "0032_add_instructions_to_textcha_question_verbose_name.py"

answer = models.CharField(max_length=255)
answer = models.CharField(max_length=255,
verbose_name='''answer (use a regular expression
to capture possible answers e.g.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to use separate string literals on each line, than using a long string with lots of spaces inside.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know this, thank you. It should be corrected in the new change.

@malemburg
Copy link
Member

Could you please rebase the PR and address the above comments ? I think it's then time for merging it :-)
Thanks.

@ethancarlsson ethancarlsson force-pushed the issue-823-improve-textcha-for-registration branch from d364970 to 39432c2 Compare July 4, 2021 13:21
@ethancarlsson
Copy link
Contributor Author

Fixed up the issues above and rebased it. This is my first time using rebase, so hopefully I've done it correctly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants