Python Forum
How to change language line by line?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to change language line by line?
#1
This below website built by php.but i want to change it to python.is it possible?

https://www.dialbro.com
Reply
#2
(Sep-18-2017, 03:16 PM)dialbrocom Wrote: This below website built by php.but i want to change it to python.is it possible?
That is possibly,not to much work site is pretty basic and using Bootstrap.
I would have done it Flask.
A quick demo how to start,a little tutorial here.
from flask import Flask, render_template, jsonify, request
 
app = Flask(__name__)
# The main page html and css load here
@app.route('/')
def index():
   return render_template("index.html")
 
# Push Dance button taken to a new route,the load html and css for this route.
@app.route('/top-10-best-dance-classes-in-chennai',  methods=['GET'])
def dance():
   return render_template("dance.html")
 
@app.errorhandler(404)
def page_not_found(e):
   return render_template('404.html'), 404
 
if __name__ == '__main__':
   app.run()
Reply
#3
Of coarse it's possible.  Python can do anything php can do.

It looks like it doesn't change that much, so you could even use a static site generator so everything was just plain text files.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Line graph with two superimposed lines sawtooth500 4 325 Apr-02-2024, 08:56 PM
Last Post: sawtooth500
  How to add multi-line comment section? Winfried 1 202 Mar-24-2024, 04:34 PM
Last Post: deanhystad
  break print_format lengthy line akbarza 4 368 Mar-13-2024, 08:35 AM
Last Post: akbarza
  Reading and storing a line of output from pexpect child eagerissac 1 4,244 Feb-20-2024, 05:51 AM
Last Post: ayoshittu
  coma separator is printed on a new line for some reason tester_V 4 487 Feb-02-2024, 06:06 PM
Last Post: tester_V
  problem with spliting line in print akbarza 3 382 Jan-23-2024, 04:11 PM
Last Post: deanhystad
  Unable to understand the meaning of the line of code. jahuja73 0 305 Jan-23-2024, 05:09 AM
Last Post: jahuja73
  Receive Input on Same Line? johnywhy 8 717 Jan-16-2024, 03:45 AM
Last Post: johnywhy
  Reading in of line not working? garynewport 2 837 Sep-19-2023, 02:22 PM
Last Post: snippsat
  'answers 2' is not defined on line 27 0814uu 4 733 Sep-02-2023, 11:02 PM
Last Post: 0814uu

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020