mirror of
https://github.com/taroved/pol
synced 2025-05-17 23:00:10 -07:00
feed url
This commit is contained in:
parent
b468a66316
commit
aa5c6e294a
@ -168,8 +168,10 @@ PIPELINE_JS = {
|
||||
}
|
||||
|
||||
DOWNLOADER_PAGE_URL = '/downloader?url='
|
||||
FEED_PAGE_URL = '/feed/'
|
||||
FEED1_PAGE_URL = '/feed1/'
|
||||
|
||||
# replace 127.0.0.1 with your VPS server IP or domain.name
|
||||
FEED_PAGE_URL = '//127.0.0.1/feed/'
|
||||
|
||||
DOWNLOADER_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36'
|
||||
# limit of seconds in which user can access separate feed
|
||||
FEED_REQUEST_PERIOD_LIMIT = 0
|
||||
|
@ -18,7 +18,7 @@
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">{% trans 'subscribe.your_feed' %}:</h4>
|
||||
<h3>
|
||||
<a href="{{ feed_url }}" target="_blank">http://politepol.com{{ feed_url }}</a>
|
||||
<a href="{{ feed_url }}" target="_blank">{{ feed_url }}</a>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
<script type="text/javascript">
|
||||
function tryGetFeed() {
|
||||
$.getFeed({
|
||||
url: '{{ feed1_url }}',
|
||||
url: '{{ feed_url }}',
|
||||
success: function (feed) {
|
||||
if ('items' in feed) {
|
||||
$('#preview').empty()
|
||||
@ -59,10 +59,10 @@
|
||||
}
|
||||
},
|
||||
failure: function () {
|
||||
$('#preview').text('Something wrong. Reloaad the page or contact us by email: politepol.com@gmail.com');
|
||||
$('#preview').text('Something wrong. Reload the page or contact us by email: politepol.com@gmail.com');
|
||||
},
|
||||
error: function () {
|
||||
$('#preview').text('Something wrong. Reloaad the page or contact us by email: politepol.com@gmail.com');
|
||||
$('#preview').text('Something wrong. Reload the page or contact us by email: politepol.com@gmail.com');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ from django.core.exceptions import ValidationError
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
from .forms import IndexForm
|
||||
from .settings import DOWNLOADER_PAGE_URL, FEED_PAGE_URL, FEED1_PAGE_URL
|
||||
from .settings import DOWNLOADER_PAGE_URL, FEED_PAGE_URL
|
||||
|
||||
from .setup_tool import get_selection_tag_ids, build_xpathes_for_items
|
||||
from .setup_tool_ext import build_xpath_results
|
||||
@ -204,8 +204,7 @@ def preview(request, feed_id):
|
||||
if request.method == 'GET':
|
||||
return render(request, 'frontend/preview.html',
|
||||
{
|
||||
'feed_url': FEED_PAGE_URL + feed_id,
|
||||
'feed1_url': FEED1_PAGE_URL + feed_id,
|
||||
'feed_url': request.build_absolute_uri(FEED_PAGE_URL + feed_id)
|
||||
})
|
||||
|
||||
return HttpResponseBadRequest('Only GET method supported')
|
||||
return HttpResponseBadRequest('Only GET method supported')
|
Loading…
x
Reference in New Issue
Block a user