Kelvin Loh
@LohBoon
I have created an app, and required to connect with MySQL database, could Repl offer any connector or relevance connector with MySQL?
Please help.
Python
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
Python
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
Python
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 You need a main.py OUTSIDE a folder for it to run. Move everything out of the folder.1 year 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.
HTML, CSS, JS
Coder100 You do not have those two gifs:
image
please, upload img_trans.gif using this:
image2 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
Python
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 Repl.it doesn't support 127.0.0.1:5000, so none of these links will work. Try using something different.1 year 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
Python
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 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
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 i cannot see your /register or /login in your flask routes. thats probably why your getting 404s2 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
Python
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
I have pretising the Flask factory application both by REPL and Visual Studio, however the out put was could not import"flaskfactory.flaskfactory".
W
Python
I need to build a login and signup page for flask, however the a display of internal server error.
Why? how to fixed it?
Python
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 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
Is the Flask come with a SQLite database in REPL.IT? If no where is the package available to download?
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
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.
Python
RYANTADIPARTHI Solution
your auth url states /register. So type that URL in the browser, and you will get there.2 years ago
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
When I initialize the database file, it was return no such command "init-db'
Why and how?
Python
RYANTADIPARTHI i think that's because flask has no database associated with it in repl.it.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
Python
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 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
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
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
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
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
Python
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 blocked7 months 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
Python
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