You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sisters is a safe space and is dedicated to maintaning a violence-free, respectful, and dignified environment in the cafe. If a customer violates the house rules, they can be put on an "out", meaning they are not invited to the cafe for some period of time. This duration is determined through a conversation with the customer and sisters staff.
We'd eventually like to be able to support the outbook for Sisters of the Road. We'd like to be able to allow the POS app to know if a client is currently out and we'd like to make it easy for SotR to generate the various reports that they are required to make.
Requirements
Outbook Events
New django model with a name OutbookEvents
barter account: A required Foreign key field to a barter account (establishing the many-to-one relation).
out start date: A required date field
out end date: A required date field
reason: An optional text field
Set the default ordering of the model to be by the out end date in descending order
Custom manager method is_barter_account_out that takes a BarterAccount object and returns a bool makes it easy to determine if a given barter account is currently out
Custom manager method get_barter_account_out_reason that takes a BarterAccount object and returns a str that makes it easy to see why a given barter account is currently out
BarterAccount Model changes
add BarterAccount method add_out_event that adds an event to the outbook for this barter account
add @property named is_out to BarterAccount that takes no parameters and returns a bool that uses self in the is_barter_account_out custom manager method
add @property named out_reason to BarterAccount that takes no parameters and returns an optional str that uses self to call the get_barter_account_out_reason method.
Hello! I learned about this project at a PyLadies meetup quite a while ago and have been wanting to contribute. Can I start working on this issue? Is this the best place to ask questions, and is the python-for-good slack channel still active? I wasn't able to join it (it said "token revoked"). Thanks :)
Sisters of the Road Outbook
Description
Sisters is a safe space and is dedicated to maintaning a violence-free, respectful, and dignified environment in the cafe. If a customer violates the house rules, they can be put on an "out", meaning they are not invited to the cafe for some period of time. This duration is determined through a conversation with the customer and sisters staff.
We'd eventually like to be able to support the outbook for Sisters of the Road. We'd like to be able to allow the POS app to know if a client is currently out and we'd like to make it easy for SotR to generate the various reports that they are required to make.
Requirements
Outbook Events
OutbookEvents
is_barter_account_out
that takes aBarterAccount
object and returns abool
makes it easy to determine if a given barter account is currently outget_barter_account_out_reason
that takes aBarterAccount
object and returns astr
that makes it easy to see why a given barter account is currently outBarterAccount Model changes
add_out_event
that adds an event to the outbook for this barter account@property
namedis_out
toBarterAccount
that takes no parameters and returns abool
that usesself
in theis_barter_account_out
custom manager method@property
namedout_reason
toBarterAccount
that takes no parameters and returns an optionalstr
that usesself
to call theget_barter_account_out_reason
method.Tests
Notes:
on_delete
parameter set since we are using django 2.related_name
parameter to the foreign key field, tooTesting
Implement the following if the new testing system gets released before this work is done. Please feel free to pair with @mikelane for help on this.
The text was updated successfully, but these errors were encountered: