Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

reddit module #216

Merged
merged 6 commits into from
Oct 8, 2017
Merged

reddit module #216

merged 6 commits into from
Oct 8, 2017

Conversation

h-chauhan
Copy link
Contributor

No description provided.


logger = getLogger('django_th.trigger_happy')

cache = caches['th_reddit']
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line should now be cache = caches['django_th'] as in a recent issue we drop all dedicated cache (my fault I didnt update the django_th_ansible for that)


{% block content %}
<div class="col-md-12" id="trigger-content">
<h3><span class="glyphicon glyphicon-play"></span> Dummy informations</h3>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Dummy/Reddit/ ;) same as previously. I have to update django-th-ansible


{% block content %}
<div class="col-md-12" id="trigger-content">
<h3><span class="glyphicon glyphicon-play"></span> Dummy informations</h3>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as previously. I have to update django-th-ansible

trigger = models.ForeignKey('TriggerService')

class Meta:
app_label = 'django_th'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

app_label should now be 'th_reddit' otherwise, the migrations will go to django_th/migrations instead of th_reddit/migrations (and I think you will need to mkdir th_reddit/migrations + touch th_reddit/migrations/__init__.py too)

I have to update django-th-ansible for that too

# put whatever you need here
# eg title = models.CharField(max_length=80)
# but keep at least this one
subreddit = models.CharField(max_length=80)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we will need a "share_link" as BooleanField() which will allow us to know if the data we publish have to just be an URL, or a complet post that we share or not.

Copy link
Contributor Author

@h-chauhan h-chauhan Oct 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whether the model represents the subreddit, the redditor or a submission? In the case of the submission there should be following fields- title, id, author, score, and url (the URL the submission points to or the submission's URL if it's a self post).

Copy link
Owner

@foxmask foxmask Oct 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the model represents 2 aspect in same time: subreddit and submission because:

  • When the service will be use as a Provider of data, the user will set the subreddit field
  • When the service will be use as a Consumer of data, the user in which subreddit whe wants to post and set the share_link to yes or no, and then save_data() will create a post with just a link (if share_link is yes) or a complet post (if share_link is no)

I dont know what redditor is ? (I found the explanation and so no I dont think it is necessary for the moment)

@@ -0,0 +1,2 @@
VERSION = (0, 0, 1) # PEP 386
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a long time ago, I released each th_<service> in standalone, but now there are all provided in a bucket :) so we can keep this file empty.

@foxmask
Copy link
Owner

foxmask commented Oct 8, 2017

checking

@foxmask foxmask merged commit 4378c26 into foxmask:master Oct 8, 2017
@foxmask
Copy link
Owner

foxmask commented Oct 8, 2017

thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants