Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alerts for job posts based on filtersets [WIP] #435

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
23519c0
subscriptions [wip]
shreyas-satish Apr 5, 2018
620d045
working backend for job alerts
shreyas-satish Apr 9, 2018
3c457f0
simplify and cleanup
shreyas-satish Apr 9, 2018
df699d7
Using StateManager for JobApplication model (#432)
Apr 11, 2018
7e87088
turn off autocomplete for the filters form
shreyas-satish Apr 11, 2018
3681656
changed background job to 10 minutes, custom __init__ for Filterset, …
shreyas-satish Apr 11, 2018
75c8976
added user association. added timing for alerts. cleanup
shreyas-satish Apr 11, 2018
3583eb3
Merge branch 'job-alerts' into jobalerts
shreyas-satish Apr 12, 2018
661d6c7
added time check for alert sending. cleanup. set sitemap
shreyas-satish Apr 12, 2018
9903e76
Merge branch 'master' into jobalerts
shreyas-satish Apr 16, 2018
c085782
removed fail logging. versioned api endpoints. added cascade for jobp…
shreyas-satish Apr 17, 2018
dfe052e
make title and name in filterset nullable
shreyas-satish Apr 17, 2018
ed3a605
changed function name
shreyas-satish Apr 17, 2018
0f9e3ac
Merge branch 'master' into jobalerts
shreyas-satish Apr 17, 2018
9d0432d
user or anon_user
shreyas-satish Apr 17, 2018
20512a2
added frequency to subscription init
shreyas-satish Apr 17, 2018
da775ca
Add form to subscribe to email alerts for job posts.
vidya-ram Apr 19, 2018
30993bd
Sync with latest.
vidya-ram Apr 19, 2018
27c2104
use form for email_frequency
shreyas-satish Apr 21, 2018
0623088
Update UI of job alerts form.
vidya-ram Apr 23, 2018
1219f55
Update text of subscribe form. Remove the border.
vidya-ram Apr 23, 2018
7a818d0
Update alert mailer template.
vidya-ram Apr 26, 2018
f82ee05
Merge branch 'master' into jobalerts
vidya-ram Apr 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
user or anon_user
shreyas-satish committed Apr 17, 2018
commit 9d0432d6ca814d5313d3872fcf63b6bfe3bac8fa
2 changes: 1 addition & 1 deletion hasjob/models/jobpost_alert.py
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ class JobPostSubscription(BaseMixin, db.Model):

__table_args__ = (db.UniqueConstraint('filterset_id', 'email'),
db.CheckConstraint(
db.case([(user_id != None, 1)], else_=0) + db.case([(anon_user_id != None, 1)], else_=0) <= 1, # NOQA
db.case([(user_id != None, 1)], else_=0) + db.case([(anon_user_id != None, 1)], else_=0) == 1, # NOQA
name='jobpost_subscription_user_id_or_anon_user_id'))

@classmethod
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ def upgrade():
sa.Column('unsubscribed_at', sa.DateTime(), nullable=True),
sa.Column('email_frequency', sa.Integer(), nullable=True),
sa.Column('id', sa.Integer(), nullable=False),
sa.CheckConstraint(u'CASE WHEN (user_id IS NOT NULL) THEN 1 ELSE 0 END + CASE WHEN (anon_user_id IS NOT NULL) THEN 1 ELSE 0 END <= 1', name='jobpost_subscription_user_id_or_anon_user_id'),
sa.CheckConstraint(u'CASE WHEN (jobpost_subscription.user_id IS NOT NULL) THEN 1 ELSE 0 END + CASE WHEN (jobpost_subscription.anon_user_id IS NOT NULL) THEN 1 ELSE 0 END = 1', name='jobpost_subscription_user_id_or_anon_user_id'),
sa.ForeignKeyConstraint(['anon_user_id'], ['anon_user.id'], ),
sa.ForeignKeyConstraint(['filterset_id'], ['filterset.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),