Skip to content

Increased size of blog from 120 to 1000 #21

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 9 additions & 13 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
{
"params":
{
"local_server":"True",
"params": {
"local_server": "True",
"local_uri": "mysql://root:@localhost/codingthunder",
"prod_uri":"mysql://root:@localhost/codingthunder",
"fb_url":"https://facebook.com/codingthunder",
"tw_url":"https://twitter.com/codingthunder",
"prod_uri": "mysql://root:@localhost/codingthunder",
"fb_url": "https://facebook.com/codingthunder",
"tw_url": "https://twitter.com/codingthunder",
"gh_url": "https://github.com/codingthunder",
"blog_name": "Coding Thunder",
"tag_line": "Heaven for programmers",
"gmail-user":"[email protected]",
"gmail-password":"gmailpassword",
"gmail-user": "[email protected]",
"gmail-password": "gmailpassword",
"about_text": "Hi my name is harry and I create programming tutorials and I am a good boy",
"no_of_posts": 3,
"login_image":"login.svg",
"admin_user":"harry",
"login_image": "login.svg",
"admin_user": "harry",
"admin_password": "subscribenow",
"upload_location":"C:\\Users\\Haris\\PycharmProjects\\Flask-tut\\static"


}

}
8 changes: 4 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from flask import Flask, render_template, request, session, redirect
from flask_sqlalchemy import SQLAlchemy
from werkzeug import secure_filename
# from werkzeug import secure_filename
from flask_mail import Mail
import json
import os
import math
from datetime import datetime


with open('config.json', 'r') as c:
params = json.load(c)["params"]

params = json.load(open("./config.json", "r"))['params']

local_server = True
app = Flask(__name__)
Expand Down Expand Up @@ -44,7 +44,7 @@ class Posts(db.Model):
sno = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(80), nullable=False)
slug = db.Column(db.String(21), nullable=False)
content = db.Column(db.String(120), nullable=False)
content = db.Column(db.String(1000), nullable=False)
tagline = db.Column(db.String(120), nullable=False)
date = db.Column(db.String(12), nullable=True)
img_file = db.Column(db.String(12), nullable=True)
Expand Down