-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DST-951 - Save & Return - Second trio of views #190
Conversation
# Conflicts: # django_app/apply_for_a_licence/views/views_start.py # django_app/config/settings/base.py
licence.professional_or_business_services = [] | ||
licence.licensing_grounds = [] | ||
|
||
if old_value == TypeOfServicesChoices.interception_or_monitoring.value: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@property | ||
def pk_url_kwarg(self) -> str: | ||
if self.model: | ||
return f"{self.model.__name__.lower()}_uuid" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool!
@@ -94,13 +103,11 @@ def get_success_url(self) -> str: | |||
else: | |||
success_url = reverse("where_is_the_business_located", kwargs={"business_uuid": self.kwargs.get("business_uuid")}) | |||
|
|||
if get_parameters := urllib.parse.urlencode(self.request.GET): | |||
success_url += "?" + get_parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we no longer need this for the redirect url parameter? Is that in the baseview already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@morganmaerees - this is all handled by the baseview already
|
||
if type_of_service := self.changed_fields.get("type_of_service", False): | ||
if self.form.has_field_changed("type_of_service"): | ||
# if the type of service has changed, we want to clear the session data for the next steps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this comment matches what's happening anymore, this is done elsewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point!
django_app/config/settings/base.py
Outdated
@@ -289,7 +292,7 @@ | |||
|
|||
SESSION_EXPIRE_AT_BROWSER_CLOSE = True | |||
# Session cookie age is set to 40 minutes | |||
SESSION_COOKIE_AGE = 40 * 60 | |||
SESSION_COOKIE_AGE = 500 * 60 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this just for testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes good spot, thanks.
* business journey * alter delete view and fix tests * updating individual views to save and return * yourself views * fixing tests * fixing test * Delete view requiers login * add formclass to delete view * updating migrations * removing print statements * modifiying uuid field migration * Adding default to uuid for migration * updating migrations again * get uuid as primary key field * updating to use id instead of uuid * review comments * Updating yourself views * licence id object * Making slow work * More fixes * migration fixing * fixing tests * migrations * mypi * fixing tests * fixing tests * fixing tests * fixing tests * fixing tests * fixing tests * fixing tests * fixing tests * fixing FE tests * Morgan comments * fixing tests * fixing tests --------- Co-authored-by: Morgan Rees <[email protected]>
No description provided.