You are not logged in.

#1 2015-12-16 12:40:17

xanb
Member
Registered: 2012-07-24
Posts: 418

Refering to directories in Flask

I plan to create an app with Flask and Flask-SQLAlchemy. I have an article class:

class Article(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    text = db.Column(db.Text)

    def __init__(self, text):
        self.text = text

I plan to use HTML inside the text field, so I will use html links. So I link files. So, what is the best solution to refering to the directory in which the files are stored? It could be that each article has its own directory

Thanks in advance,


Owning one OpenRC (artoo way) and other three systemd machines

Offline

Board footer

Powered by FluxBB