These are chat archives for fossasia/open-event-server

7th
Jul 2018
Saurav Tiwary
@srv-twry
Jul 07 2018 02:53 UTC
@schedutron @bhaveshAn @mayank8318 @maxlorenz @Kreijstal Since issues were piling up in the repository, I closed a lot of outdated ones. I have also asked for status on various issues. Please respond to them and close them if they are already fixed.

Also, I have created a Sendgrid key to send emails but when I test it, I don't receive any emails although Sendgrid's web dashboard says it's been delivered. Any idea why?

I think it's very difficult to say from here. You'll have to check everything from scratch. I am not familiar with how emails are setup on the server. Please take a day to check everything about the email system from scratch and do some research using blogs/stackoverflow. @schedutron

Nguyễn Hồng Quân
@hongquan
Jul 07 2018 04:07 UTC

I'm getting a 404 error when I POST to it.

Check the URL that you are posting to, if it matches the one you setup with Flask route.

I have created a Sendgrid key to send emails but when I test it, I don't receive any emails although Sendgrid's web dashboard says it's been delivered

I don't have experience with Sendgrid , but it seems to be related to your Sendgrid account. May be that key is just for testing, without actually sending out email, to prevent spamming recipient?

Saurabh Chaturvedi
@schedutron
Jul 07 2018 04:45 UTC
@srv-twry @hongquan Thanks, I'll review the code and Sendgrid API.
Saurav Tiwary
@srv-twry
Jul 07 2018 05:11 UTC

@schedutron @mishuvs Please review: fossasia/open-event-server#5007
@mayank8318 Please merge: fossasia/open-event-server#5015

I need these in order to move ahead.

Saurabh Chaturvedi
@schedutron
Jul 07 2018 08:34 UTC
@mayank8318 @bhaveshAn @srv-twry Please review fossasia/open-event-server#5036
Saurav Tiwary
@srv-twry
Jul 07 2018 08:38 UTC
@schedutron Fix hound issues. You always have hound issues in the PR which means that you don't check for them before pushing the code. Please install a PEP8 checker for the IDE that you use to avoid it.
Or simply use Pycharm.
Saurabh Chaturvedi
@schedutron
Jul 07 2018 08:39 UTC
@srv-twry Yes, fixing it. That's why I once recommended a pre-commit hook instead of Hound :smile:
Saurav Tiwary
@srv-twry
Jul 07 2018 08:40 UTC

That's why I once recommended a pre-commit hook instead of Hound

In the project ?

Saurabh Chaturvedi
@schedutron
Jul 07 2018 08:40 UTC
Yes
Saurav Tiwary
@srv-twry
Jul 07 2018 08:40 UTC
What will it do ?
Saurabh Chaturvedi
@schedutron
Jul 07 2018 08:40 UTC
It won't allow me to commit unless I fix linting issues.
Saurav Tiwary
@srv-twry
Jul 07 2018 08:41 UTC
Okay, I don't think we should waste time on something like that. All the modern IDEs have PEP8 support for Python.
Please use it.
Saurabh Chaturvedi
@schedutron
Jul 07 2018 08:42 UTC
:+1:
Saurav Tiwary
@srv-twry
Jul 07 2018 10:11 UTC
@mayank8318 Please merge these: fossasia/open-event-server#5034, fossasia/open-event-server#5007
Saurabh Chaturvedi
@schedutron
Jul 07 2018 12:30 UTC

For discount code, the schema is always DiscountCodeSchemaEvent no matter whether it's used for eventor ticket before posting.
Since the before_post method is not really called "before" but in between the actual post function in flask-rest-jsonapi, the code to change schema based on the value of used-for attribute of discount codes doesn't really work.
So even if I post a discount code of type ticket, it's schema remains DiscountCodeSchemaEvent instead of DiscountCodeSchemaTicket.
To fix this, should I create a new method decide_schema()of ResourceList that does this part?

@SaptakS Can you please guide us here?