Closed SnehaR26 closed 7 months ago
On an unrelated note , I am unable to push through git so I added the changes via github
On an unrelated note , I am unable to push through git so I added the changes via github
The error message gives you a pretty good hint, I think: authentication for things like pushing via https
have been removed from github (for security reasons). Instead, you should be using ssh
urls, i.e. instead of
https://github.com/charludo/ycms.git
you should be using
git@github.com:charludo/ycms
You can probably switch by doing git remote set-url origin git@github.com:charludo/ycms
However, please be aware that you need to setup SSH authentication first. Githubs documentation has you covered: https://docs.github.com/en/authentication/connecting-to-github-with-ssh
So from what I am seeing, what you are trying to do is:
number_beds
on the WardForm
number_beds
/2 new roomsright?
Some things to consider:
bed_type
- you could just set them to bed_types.NORMAL
, of course, even though choice would be niceroom_number
- how are you planning on generating them?If you wanted to give the user more choice, while also avoiding the name generation issue:
room_number
and number_beds
inputWardForm
is submitted, use JS to prevent the submission, iterate over all the room forms, and create a JSON object looking something like this: { "room_number-1": 2, "another-room-number": 1, "04": 3}
, of course depending on what the user set as valuespost
method of the WardManagementView
, you receive this value, and can now just iterate over the list entries, creating a room with the given name, plus the given amount of beds for the room.This still wouldn't allow setting the bed type, although it could pretty easily be extended to include that functionality.
The error message gives you a pretty good hint, I think: authentication for things like pushing via
https
have been removed from github (for security reasons). Instead, you should be usingssh
urls, i.e. instead ofhttps://github.com/charludo/ycms.git
you should be usinggit@github.com:charludo/ycms
You can probably switch by doing
git remote set-url origin git@github.com:charludo/ycms
However, please be aware that you need to setup SSH authentication first. Githubs documentation has you covered: https://docs.github.com/en/authentication/connecting-to-github-with-ssh
Thank you, I was able to set up a new key and it seems to work for now. For the room addition, yup I must consider all this. Let me try with your comments
Short description
Adds options for adding rooms and beds to a new ward.
Proposed changes
Side effects
Resolved issues
Fixes: #77