Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Enhance UI for creating shifts #120

Merged
merged 1 commit into from
Aug 12, 2015

Conversation

vubo
Copy link
Contributor

@vubo vubo commented Aug 9, 2015

Inspired by @willingc. Closes #100

This PR adds a pre-populate feature for creating shifts.

The shift-fields are filled with database information already know about the event (country, state, city, address, venue) to minimize typing by admin. The admin is able to override the pre-populated information.

@@ -12,6 +14,21 @@ def event_not_empty(event_id):
return result


def get_event_by_shift_id(shift_id):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

New function. I did not use it, but I think it may be useful in the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

@vubo Can you add a comment before this function, that what this can be used and specify that it may be useful in the future. What happens is, sometimes new contributors would like to start with cleaning the already existing code, and a function which is not used anywhere becomes a victim. If we add a comment we all will remember, that yes it is not used anywhere, right now, but can be used in the future, if needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

@vubo @tapasweni-pathak It may be semantics but I would prefer a docstring over a comment :)

Here's a link to the Django docs: https://docs.djangoproject.com/en/1.8/internals/contributing/writing-code/coding-style/

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that only. :)

Thanks.

@tapaswenipathak
Copy link
Contributor

Everything else looks fine. 👍

Just one minor edit and it will ready to merge. This is coming out very nicely. 👍 💃

@vubo
Copy link
Contributor Author

vubo commented Aug 11, 2015

@tapasweni-pathak thank you, I did it :)

tapaswenipathak added a commit that referenced this pull request Aug 12, 2015
Enhance UI for creating shifts
@tapaswenipathak tapaswenipathak merged commit 8f30c90 into anitab-org:develop Aug 12, 2015
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.

3 participants