Skip to content
Sign upLog in
Profile icon

Kelvin Loh

@LohBoon
  • Lesson 1b. Simple site (Hello world! ok)

    Cover page
    Made with Python
    Recent comments (0)
Repls
Community
LohBoon
LohBoon
shared a Post
1 year ago
Can a Tkinter app connect with MySQL in Repl
I have created an app, and required to connect with MySQL database, could Repl offer any connector or relevance connector with MySQL? Please help.
CRUD 4
Python
LohBoon
LohBoon
shared a Post
1 year ago
I have created a Treeview app, unfortunately the height is limited by window size. How could I move up the app and access the bottom button which is n
CRUD 3
Python
LohBoon
LohBoon
shared a Post
1 year ago
I have come accross an above problem. How to fixed it?
Lesson 4 - Writing a first Dango with generic view
Python
LohBoon
LohBoon
shared a Post
1 year ago
I have upload a python file from VS core, it can be run in VS core. When I want run the same file in REPL, the above message box was appear in the con
Add / remove book from database
Python
lsikora
lsikora
Hey! So on your left there should be a option to select different files. Here you can add a new file on the top left corner and you will have the option to name the file. Name the file `.replit like shown. When you open the file, you will have the option to type in code and here you will type, run = "blah blah blah". Replace the blah blah blah with the code you want to run. So for example, run = "main.py"`. Hope this helps!1 year ago
MrVoo
MrVoo
You need a main.py OUTSIDE a folder for it to run. Move everything out of the folder.1 year ago
LohBoon
LohBoon
shared a Post
2 years ago
I have create an images home and next in the HTML, and CSS style design. However, it failed to load. Why? and how? Thank you.
CSS image sprites (incomplete)
HTML, CSS, JS
Coder100
Coder100
You do not have those two gifs: image please, upload img_trans.gif using this: image2 years ago
LohBoon
LohBoon
shared a Post
2 years ago
I have attempted the Flask tutorial on Blueprints and Views and Templates, but i have encounter a problem to load register.html and login.html How t
Lesson 4 - Blueprints and views
Python
LohBoon
LohBoon
shared a Post
2 years ago
When i was reworked for the Flask template tutorial and deleted the index.html and run flask again, however, this time whether i have entered both web
littlepenguin
littlepenguin
Repl.it doesn't support 127.0.0.1:5000, so none of these links will work. Try using something different.1 year ago
LohBoon
LohBoon
shared a Post
2 years ago
I was to run the Flask server to view the login and register html, but the displaty shown "Internal Server Error". How to resolve it and why it happe
Lesson 4 - Blueprints and views
Python
RYANTADIPARTHI
RYANTADIPARTHI
your error is probably because you should name your folder templates instead of flaskr. And then, render it from there, with the proper file directory.2 years ago
19wintersp
19wintersp
I think the issue is that you are trying to render "index.html" (main.py:14) but that file doesn't exist. Edit: apparently I wasn't clear enough. The file "index.html" does not exist in your template directory for the app, which is undefined. You should modify your template folder to be "flask-tutorial/flaskr/templates", by modifying main.py:4 as follows: website = Flask(name, templatefolder="flask-tutorial/flaskr/templates") Note that if you are trying to render "blog/index.html" as the home2 years ago
LohBoon
LohBoon
shared a Post
2 years ago
I am attempting the Flask Blueprint and Views, however i have encounter an error of import error Please help, where is the login pages? (When I type
DaGuacaplushy
DaGuacaplushy
i cannot see your /register or /login in your flask routes. thats probably why your getting 404s2 years ago
LohBoon
LohBoon
shared a Post
2 years ago
I have try the Flask application factory, however screen shown "This site can’t be reached" I run my code as below Application factory $ export FLASK
Application factory (Workable in Visual Studio)
Python
SixBeeps
SixBeeps
Make that last command flask run -h 0.0.0.0 --p 80802 years ago
btfuss
btfuss
Problems A problem may be that repl doesnt support flask. Open tkinter or pygame and test. If it doesnt work, either repl isnt working, check the encoding. Reference link: https://stackoverflow.com/questions/30554702/cant-connect-to-flask-web-service-connection-refused > :D hope this helps2 years ago
LohBoon
LohBoon
Screenshot 2021-02-02 at 12.05.25 PM2 years ago
LohBoon
LohBoon
shared a Post
2 years ago
I have pretising the Flask factory application both by REPL and Visual Studio, however the out put was could not import"flaskfactory.flaskfactory". W
Application factory (Workable in Visual Studio)
Python
LohBoon
LohBoon
shared a Post
2 years ago
I need to build a login and signup page for flask, however the a display of internal server error. Why? how to fixed it?
Build a user login system (Workable in Visual Studio)
Python
KHZ
KHZ
@LohBoon You need to create a new folder called templates and shift all your html files to that folder. The code won't detect the templates in the login-template folder by itself. If you want to do that you can declare the templates folder to login-template like this: app = Flask( name, template_folder="login-template" ) `2 years ago
CoolJames1610
CoolJames1610
I think for flask, you need to have your .html files in a folder named templates. Otherwise it doesn't work. Hope this helps2 years ago
LohBoon
LohBoon
shared a Post
2 years ago
Is the Flask come with a SQLite database in REPL.IT? If no where is the package available to download?
RYANTADIPARTHI
RYANTADIPARTHI
No nope. Doesn't come with sqlite. It comes with no databases. You can only make a few non-db projects with it. On repl.it, no db is provided.2 years ago
LohBoon
LohBoon
shared a Post
2 years ago
I have create the auth.py for login and logout view. But I am not sure where or how to access the login page? Thank you.
Lesson 4 - Blueprints and views
Python
RYANTADIPARTHI
RYANTADIPARTHI
Solution your auth url states /register. So type that URL in the browser, and you will get there.2 years ago
LuckyOreos
LuckyOreos
I’m a little confused but do you mean this page - https://repl.it/ or this- https://repl.it/login?goto=%2F~ Like do you mean the repl.it’s auth page and stuff or like in this repl above....2 years ago
LohBoon
LohBoon
shared a Post
2 years ago
When I initialize the database file, it was return no such command "init-db' Why and how?
Lesson 3 - Define & access  database (Workable in V. Studio)
Python
RYANTADIPARTHI
RYANTADIPARTHI
i think that's because flask has no database associated with it in repl.it.2 years ago
LohBoon
LohBoon
shared a Post
2 years ago
Ordinately I want to customizing my project template according to Django tutorial 7 writing your first Django app, however 'DIRS : [BASE_DIR / 'djang
Lesson 7. Customize the admin form
Python
RYANTADIPARTHI
RYANTADIPARTHI
Solution your error is in mysite/settings.py, your DIRS part is wrong. In django, you need to use .join(). Because you are trying to include your templates file. 'DIRS': [os.path.join(BASE_DIR, 'templates')], i think it's something like that. Try that code. It should work2 years ago
Coder100
Coder100
make sure you are dividing by numbers. Did you perhaps mean int(a) / int(x) where a and x are the variables in question.2 years ago
LohBoon
LohBoon
shared a Post
2 years ago
Where can I download the Flask template? Can I download from the package? or a ready template such as Django? I might interested to learn the Flask so
SixBeeps
SixBeeps
There is a "Multi-Page Flask Website" template you can start from: image2 years ago
LohBoon
LohBoon
shared a Post
2 years ago
I am using Flask template to display the hello world, however fail. Why and how to fix? Screenshot 2021-01-18 at 6.30.58 PM Screenshot 2021-01-18 at
CodingCactus
CodingCactus
the form goes to /user not /hello image2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
i think in the app.route, you need to name hello world with a str, and call that var in the return.2 years ago
LohBoon
LohBoon
shared a Post
2 years ago
When i want to runserver i was discover the message the port in use What happen? How to fix it? Capture the port in use
Lesson 6 - Adding background image
Python
Le-BotBot
Le-BotBot
All the ports i tried are already in use I is kind of boring... If it worked, i could pay PRO version but i am blocked5 months ago
POGORELOV
POGORELOV
Did you solve it?2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
8080 is the port, that works fine here.2 years ago
LohBoon
LohBoon
shared a Post
2 years ago
I have follow exactly the tutorial 6 in Django customise the app's look and adding a background-image. However, when i runserver, the html & css did n
Lesson 6 - Adding background image
Python
RYANTADIPARTHI
RYANTADIPARTHI
@19wintersp nice job for deleting your solution.2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
Solution the reason your static folder is not working is because, in your mysite/settings.py, you haven't told django, where the settings is. Also, you might want to move your settings folder outside of polls. So, put this code in your settings file. STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'static') ] STATICFILES = ( os.path.join(BASE_DIR, 'static'), ) like that. That should work2 years ago
yzhacker
yzhacker
Invite me to the project2 years ago