"""
The module for migration articles to db.

Articles is represented as .md files and saved in sorted folders.
"""

import os
import sys

import django

import settings
import db
from lookup_dirs import lookup_dirs


# The run part
if __name__ == '__main__':
    chapters, sections, articles = lookup_dirs(root_path = settings.PATH_TO_CONTENT)
    db.clear_db()
    db.populate_db(chapters=chapters, sections=sections, articles=articles)

995c844b7194907df25578655f1c1315afaedd1d
<mask token>

<mask token>
if __name__ == '__main__':
    chapters, sections, articles = lookup_dirs(root_path=settings.
        PATH_TO_CONTENT)
    db.clear_db()
    db.populate_db(chapters=chapters, sections=sections, articles=articles)

<mask token>
import os
import sys
import django
import settings
import db
from lookup_dirs import lookup_dirs
if __name__ == '__main__':
    chapters, sections, articles = lookup_dirs(root_path=settings.
        PATH_TO_CONTENT)
    db.clear_db()
    db.populate_db(chapters=chapters, sections=sections, articles=articles)

"""
The module for migration articles to db.

Articles is represented as .md files and saved in sorted folders.
"""

import os
import sys

import django

import settings
import db
from lookup_dirs import lookup_dirs


# The run part
if __name__ == '__main__':
    chapters, sections, articles = lookup_dirs(root_path = settings.PATH_TO_CONTENT)
    db.clear_db()
    db.populate_db(chapters=chapters, sections=sections, articles=articles)
