No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Django deployment with quasar static files

    Help
    4
    6
    589
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      membrilloski last edited by

      Hi everyone!,

      has anyone tried deploying quasar using django as backend?.

      Im trying to deploy it using gitlab, so what im trying to do is the following:

      • run quasar build
      • Point Django static directory to the files generated by quasar
      • Copy index.html to the templates Django is going to use
      • Let collectstatic + whitenoise + AWS S3 do its job

      The problem I’m having (I guess) is that I need the static files to be inside a folder called ‘static’, for that, I guess I need to configure webpack.

      Is this the correct way for deployment?, Can I change the static folder where static files are generated? Does anyone have a pipeline or an example of how has he managed to deploy this configuration?

      Thanks!, I love this framework. v1 is beautiful!, works like magic. 🙂

      1 Reply Last reply Reply Quote 2
      • M
        mKomo last edited by

        HI, I’ve managed to get a site up with django as the backend.

        I’d suggest completely separating your back and front end. For instance I deployed my backend using heroku and fronent with next. Then it was a matter of making ajax requests for the content that was needed in the front end (and sending content back to the backend to be processed).

        So if needed you can just get the static content from your back-end which in turn uses S3 to store it.

        I’d recommend django-rest-framework

        1 Reply Last reply Reply Quote 0
        • M
          membrilloski last edited by

          Hi mkomo,

          Thanks for answering!!. I dont have problems with the api. Im more concerned about how to properly deploy to do ci/CD, and serve static files correctly.
          How are you serving static files using django? Are you using whitenoise + s3??.

          🙂

          1 Reply Last reply Reply Quote 0
          • I
            irnlogic last edited by

            Separating Quasar UI and Django rest backend should work, however please keep in mind couple of issues:

            1. You may have to configure CORS and deal with additional preflight requests
            2. If the UI is dynamically constructed based on some data in or reed critical config from Django, that can be problematic and will require less than optimal work arounds.
            1 Reply Last reply Reply Quote 0
            • B
              beheshtifar last edited by

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • B
                beheshtifar last edited by beheshtifar

                Add

                build: {
                publicPath:‘static’,
                }

                at qusar.conf.js
                This add static to js and css paths in index.html.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post