neelxie / churchAPI

0 stars 0 forks source link

Could You Try Using Django Rest Framework? #2

Closed Tinitto closed 5 years ago

Tinitto commented 5 years ago

Is it possible to replicate the UnitedChurchAPI repository with the Django Rest Framework

Consider the example here.

neelxie commented 5 years ago

That was my implementation

neelxie commented 5 years ago

Hello Martin,

I do apologise for the late reply and slow progress. I am in the middle of a family emergency and the quest for a job makes it worse. I originally wanted to implement the application in Django restframework, but have changed my mind, I have gone with Flask because with it I get to customize my queries and other implementations unlike Django.

Sadly I am blocked, I can not seem to fully comprehend the requirements as they dont add up on my end hence I kindly request you shed more light on this to help me be able to implement this amidst everything going on around me.

1.The API requires only a google login, but the user record ought to show information on which church they "attend". This attribute for church can not be added with the google implementation as it works with no input from the user apart from their google credentials meaning this data can not be captured at signup/login.

  1. This would mean that the church ought to be created first then the user who subscribes to it. Secondly with the google authentication, user permissions can not be set as well since you can not determine them anywhere doing the authentication process, meaning that a default permission is created for everyone who signs up on the site meaning either we have everyone as Admin at the start and then later on change people to other permissions later on, which would be a tricky procedure that can easily be exploited.

The above have blocked my progress and I hoped to first work on the uploads but they are dependant on the signup and as stated above I need a way around that to be able to proceed.

Kindly do share with me insights into these issues and I could work around them in the little time I have even amidst the family emergency I have.

These are the queries for my preliminary implementation in flask https://github.com/neelxie/churchAPI/blob/flask-version/app/models/db.py

kind regards

On Tue, Oct 1, 2019 at 1:38 PM Martin Ahindura notifications@github.com wrote:

Assigned #2 https://github.com/neelxie/churchAPI/issues/2 to @neelxie https://github.com/neelxie.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/neelxie/churchAPI/issues/2?email_source=notifications&email_token=AH2IRHIXO7Q7ZQIEV5YIWSTQMOYMJA5CNFSM4I4OR342YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOT6TC2AI#event-2678467841, or mute the thread https://github.com/notifications/unsubscribe-auth/AH2IRHLOIMODA2S3J4GGGD3QMOYMJANCNFSM4I4OR34Q .

--

Derrick Sekidde

Software Engineer / +256 705 828612 https://twitter.com/andela

This message contains confidential information intended solely for the use of the parties named above.

Tinitto commented 5 years ago

@neelxie , So sorry to hear about your family emergency. If you need some extra time, please get in touch privately.

About your choice of Flask, great idea. Flask would be a faster alternative.

About your blocker:

1.The API requires only a google login, but the user record ought to show information on which church they "attend". This attribute for church can not be added with the google implementation as it works with no input from the user apart from their google credentials meaning this data can not be captured at signup/login.

Could you be knowing about user profiles? They are a common thing in user account systems. Try to sign up for a spectrum account and see the flow.

  1. This would mean that the church ought to be created first then the user who subscribes to it. Secondly with the google authentication, user permissions can not be set as well since you can not determine them anywhere doing the authentication process, meaning that a default permission is created for everyone who signs up on the site meaning either we have everyone as Admin at the start and then later on change people to other permissions later on, which would be a tricky procedure that can easily be exploited

Two issues here:

I hope this clears up a few things. Please get in touch in case you are still confused.

neelxie commented 5 years ago

I amm working on that here https://github.com/neelxie/churchAPI/tree/ft-heroku

Tinitto commented 5 years ago

Hey Derrick,

This shows up when I try visiting your site.

[image: image.png]

Regards, Martin Martin Ahindura Tel. +256777992539 Email.: martinahindura@gmail.com Github: https://github.com/Tinitto LinkedIn: https://www.linkedin.com/in/martin-ahindura-875a85a4 Website: https://martinahindura.carrd.co

On Sun, Oct 6, 2019 at 9:16 PM Sekidde Derrick notifications@github.com wrote:

I amm working on that here https://github.com/neelxie/churchAPI/tree/ft-heroku

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neelxie/churchAPI/issues/2?email_source=notifications&email_token=AFC7YFPV3WWDDKLQMTSZ4KTQNITPNA5CNFSM4I4OR342YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAOQM5I#issuecomment-538773109, or mute the thread https://github.com/notifications/unsubscribe-auth/AFC7YFIJGXJTAFFLFKHVCPTQNITPNANCNFSM4I4OR34Q .

Tinitto commented 5 years ago

The credentials you shared don't seem to be working.

On Mon, Oct 7, 2019, 09:16 Martin Ahindura martinahindura@gmail.com wrote:

Hey Derrick,

This shows up when I try visiting your site.

[image: image.png]

Regards, Martin Martin Ahindura Tel. +256777992539 Email.: martinahindura@gmail.com Github: https://github.com/Tinitto LinkedIn: https://www.linkedin.com/in/martin-ahindura-875a85a4 Website: https://martinahindura.carrd.co

On Sun, Oct 6, 2019 at 9:16 PM Sekidde Derrick notifications@github.com wrote:

I amm working on that here https://github.com/neelxie/churchAPI/tree/ft-heroku

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neelxie/churchAPI/issues/2?email_source=notifications&email_token=AFC7YFPV3WWDDKLQMTSZ4KTQNITPNA5CNFSM4I4OR342YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAOQM5I#issuecomment-538773109, or mute the thread https://github.com/notifications/unsubscribe-auth/AFC7YFIJGXJTAFFLFKHVCPTQNITPNANCNFSM4I4OR34Q .