Комментарии •

  • @prettyprinted
    @prettyprinted 4 года назад +2

    Join my free course on the basics of Flask-SQLAlchemy: prettyprinted.com/flasksql

  • @stephencollins2831
    @stephencollins2831 4 года назад +17

    This is a fantastic video I wish more people made. Getting something to work can be fairly easy, but structuring the project logically comes only with experience. This is going to help a lot of people (including me).

    • @prettyprinted
      @prettyprinted 4 года назад +1

      I'm glad it helps! Thanks for watching.

  • @rhettsmedia
    @rhettsmedia 3 года назад +1

    Great job Anthony this is exactly what I was looking for

  • @md.akib5124
    @md.akib5124 4 года назад +1

    anthony i love your teaching. Your code is so clean

  • @prabhashswain1878
    @prabhashswain1878 3 года назад

    TQ sir ,this is really awesome flask structure to work with.

  • @harshasomisetty
    @harshasomisetty 3 года назад

    This video is sooo helpful, for anyone who wants to restructure into folders in the future just change .extensions to ..extensions.
    Also for me I had to import the views after I inited the db with the app

  • @b87b84
    @b87b84 4 года назад +1

    Great video! Thanks!

  • @martintichy3494
    @martintichy3494 4 года назад +2

    Very useful. Just one question -> how to create database from console with create_app and .extensions. Thanks for your for your work and insights

    • @prettyprinted
      @prettyprinted 4 года назад +1

      Check out my video commands. ruclips.net/video/wyG3BiL-E5c/видео.html

  • @lator1941
    @lator1941 Год назад

    I read on a SO post that one should use the already "initialized" db object to create the db model class. Although I structured my app the same way you did, I didn't have issues with my app. Everything was all good.
    Is it recommended to use your method? And how about extensions that need extra configuration after their "extension.init_app()" call

  • @panzorax.
    @panzorax. 3 года назад

    hi bro! i want to selected file path or selected folder how can i do ?? (Without save file)

  • @admaxcool
    @admaxcool 4 года назад +1

    Hi Anthony,
    How do I setup a project with multiple app and blueprints and setup flask dance for all of them .

    • @prettyprinted
      @prettyprinted 4 года назад

      That's hard to answer, but you should only need instance of Flask-Dance and then you check if they're authorized in the parts of the app you want ot keep protected.

    • @admaxcool
      @admaxcool 4 года назад

      @@prettyprinted Thanks Anthony

  • @MohamedAshraf-zs6nv
    @MohamedAshraf-zs6nv 3 года назад

    I have multiple applications in blueprint structure, but I'm struggling to access this db object inside applications and use it to create tables.
    I want to create model.py file for each application separately

  • @sainco3036
    @sainco3036 4 года назад

    thanks.

  • @muasx1985
    @muasx1985 3 года назад

    how to setting port or host in this pattern

  • @drac8854
    @drac8854 3 года назад +2

    Hi Anthony i have a small question how will i add data to my db in views.py
    I import db from extension
    And did db.session.add()
    And it in giving me an error saying that
    Application not found

    • @prabhashswain1878
      @prabhashswain1878 3 года назад

      from . extension import db

    • @drac8854
      @drac8854 3 года назад +1

      @@prabhashswain1878 thanks for answering i figured it out
      Thanks anyway

  • @footballforfun2054
    @footballforfun2054 3 года назад

    what is in .env and .flaskenv file?

  • @VeronicaSantos
    @VeronicaSantos 4 года назад

    Basic question (but I am a newer user): what is blueprint?

    • @camnooten110
      @camnooten110 4 года назад

      A blueprint allows you to separate your endpoints (or routes) into seperate files.

  • @lawrencekatuva8735
    @lawrencekatuva8735 4 года назад

    File "C:\Users\User\Desktop\Flask\clean\app_stracture\__init__.py", line 3, in
    from .views import main
    ImportError: attempted relative import with no known parent package

    • @I3orjoyzee
      @I3orjoyzee 4 года назад

      Hi, did you manage solve this errror?

    • @oumao
      @oumao 4 года назад

      It should be something like
      from myapp.views import main
      where myapp is the name of the folder containing the __init__.py in your case I guess it is app_stracture
      Avoid at all cost naming folder like "app_stracture" try making it simple like cleanapp, appclean, structureapp etc

  • @kishoreandra
    @kishoreandra 4 года назад

    Hey mate....cool video....but what if I want to use a class of different flask project, how can I import it ??note: they both are in different local disc's say E and F

    • @prettyprinted
      @prettyprinted 4 года назад +1

      You don't want to import from other parts of your computer because once you move you project, it will stop working. Instead either install things as a package or move them into your project.

  • @wilsonreuben5307
    @wilsonreuben5307 4 года назад

    Is your website built with flask?

    • @prettyprinted
      @prettyprinted 4 года назад

      It isn't. For the main site it's just HTML. The part for the courses is hosted by Teachable.

    • @wilsonreuben5307
      @wilsonreuben5307 4 года назад

      @@prettyprinted Can something like that be built with flask, the course part?

    • @prettyprinted
      @prettyprinted 4 года назад

      @@wilsonreuben5307 Yeah definitely. I eventually want to remake the site and I might use Flask.