Forums

Flask-Admin page not found

Hi! I'm trying to create admin page using Flask-Admin. This small code works on localhost but doesn't work here. I've got '404 not found' error when going to http://mysite.com/admin. I've created links for static files in web tab of dashboard but still have an error. So I can't understand what i'm doing wrong. Help me please.

from flask import Flask
from flask.ext import admin

app = Flask(__name__)

if __name__ == '__main__':
    admin = admin.Admin(app)
    app.run()

Hi tema,

Have you created a webapp for http://<your-domain.com> ? Have you created a CNAME record that points at tema.pythonanywhere.com? If you want to email me your actual domain name (support@pythonanywhere.com) I can tell you if it has been set up correctly.

Hi I too have this issue. My site is bettapp.co.uk on klameer.pythonanythwere.com. It works fine on my development machine but when I send it to pythonanywhere http://bettapp.co.uk/admin is not available. I have tried this with and without the trailing slash.

Please help. I will also post this question separately,

Karim

Hi, I solved this. It seems I have to implement flask admin in my run.py file or the file that WSGI looks for. Sorry for the bother.

Karim

Please what do you mean by implementing it your run.py file? I itried importing flask admin on my main.py file but still not working. My domain is nathaniel.pythonanywhere.com

I see that you posted about this in another forum thread, so I've answered there.