Beispiel #1
0
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

from django.shortcuts import render
import feedparser
import logging
import sys
sys.path.append("/home/codercol/webapps/django_tamilnewssite/tamilnewssite")
import common as config

# Create your views here.
feeds = config.GetParseResults(config.business_urls)


def index(request):
    return render(request, 'business/home.html', {'test': feeds})
Beispiel #2
0
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.shortcuts import render
from django.http import HttpResponse
import feedparser
import sys
sys.path.append(
    "C:\\Sriram Sankar\\Python Projects\\TamilNewsSite\\tamilnewssite")
import common as config

# Create your views here.

feeds_bbc = config.GetParseResults(config.main_urls)
for i in feeds_bbc:
    print("testing ---->")
    print(i.desc)


def index(request):
    return render(request, 'webapp/tst.html', {'sports': feeds_bbc})
Beispiel #3
0
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.shortcuts import render
from django.http import HttpResponse
import feedparser
import sys

sys.path.append(
    "C:\\Sriram Sankar\\Python Projects\\TamilNewsSite\\tamilnewssite")
import common as config

# Create your views here.

feeds_bbc = config.GetParseResults(config.divine_urls)
for i in feeds_bbc:
    print("testing ---->")
    print(i.desc)


def index(request):
    return render(request, 'divine/home.html', {'divine': feeds_bbc})
Beispiel #4
0
from __future__ import unicode_literals

from django.shortcuts import render
from django.http import HttpResponse
import feedparser
import sqlite3
#import rssReader as feed
import sys

sys.path.append("/Users/saravananveeramani/Coding/pythonprj/mysite")
import common as config

# Create your views here.
#urls = config.cinema_urls
#print urls
feeds_ci = config.GetParseResults(config.cinema_urls)
feed_count = len(feeds_ci)
print "total rows : "
print feed_count
conn = sqlite3.connect('test.db', check_same_thread=False)
print "Opened database successfully"

cursor = conn.execute("SELECT id, name, address, salary from CUSTOMER")
results = cursor.fetchall()

print "Operation done successfully"
conn.close()

print feeds_ci

context = {'cinema': feeds_ci, 'rcount': feed_count, 'cust': results}
Beispiel #5
0
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

from django.shortcuts import render
import feedparser
import logging
import sys
sys.path.append("/home/codercol/webapps/django_tamilnewssite/tamilnewssite")
import common as config

# Create your views here.
feeds = config.GetParseResults(config.sport_urls)


def index(request):
    return render(request, 'sports/home.html', {'test': feeds})