Coder Social home page Coder Social logo

Can not run examples about bakerydemo HOT 4 CLOSED

sowinski avatar sowinski commented on August 16, 2024
Can not run examples

from bakerydemo.

Comments (4)

laymonage avatar laymonage commented on August 16, 2024

Hi, please be more specific about the error that you found so we can help you.

The main branch should work as-is.

from bakerydemo.

sowinski avatar sowinski commented on August 16, 2024

Lets start with Gitpod
Bildschirmfoto vom 2023-02-17 17-10-00

Building wheels for collected packages: dj-database-url, aws-requests-auth, uwsgi, psycopg2
  Building wheel for dj-database-url (setup.py) ... done
  Created wheel for dj-database-url: filename=dj_database_url-0.4.1-py2.py3-none-any.whl size=3779 sha256=160a33aa01b9cebd46109e3d375869971d7112f2a1a4d362bd4f9c52b7ec3004
  Stored in directory: /home/gitpod/.cache/pip/wheels/dd/53/6f/312266de55e8e67f2898e4c314dad7c02a700d12c485081463
  Building wheel for aws-requests-auth (setup.py) ... done
  Created wheel for aws-requests-auth: filename=aws_requests_auth-0.4.0-py3-none-any.whl size=6694 sha256=7be73aebc5284b427d980fcf15a4d6a3cebfa52afc87c74c6c290e06f7137cf3
  Stored in directory: /home/gitpod/.cache/pip/wheels/53/4b/7f/1169efe754e41b099c16cd61705d67df8c5d9c5893f6afdeb1
  Building wheel for uwsgi (setup.py) ... done
  Created wheel for uwsgi: filename=uWSGI-2.0.21-cp38-cp38-linux_x86_64.whl size=7099073 sha256=1c5ef9053dc45a186ea0bb53d5f55ba5ccc02e7c359f7c9e609534ecfc784ab6
  Stored in directory: /home/gitpod/.cache/pip/wheels/ff/1f/b4/8bd0ceee591f1fdbbff1b106e279b74db7f8df386291b2e79b
  Building wheel for psycopg2 (setup.py) ... done
  Created wheel for psycopg2: filename=psycopg2-2.9.5-cp38-cp38-linux_x86_64.whl size=592547 sha256=5f485cefdc1b4d492fdc25ae2ea50d35df3fe405cf71c80e3eb6d62db5715cbe
  Stored in directory: /home/gitpod/.cache/pip/wheels/ae/51/cd/0096c52b03b32a5ffea19b70f2c56c905b5d30774229808041
Successfully built dj-database-url aws-requests-auth uwsgi psycopg2
Installing collected packages: uwsgi, pytz, pyasn1, draftjs-exporter, django-dotenv, dj-database-url, Willow, whitenoise, wagtail-font-awesome-svg, urllib3, telepath, sqlparse, soupsieve, rsa, pyasn1-modules, psycopg2, protobuf, Pillow, l18n, jmespath, html5lib, google-resumable-media, et-xmlfile, docutils, cachetools, backports.zoneinfo, async-timeout, asgiref, anyascii, redis, openpyxl, googleapis-common-protos, google-auth, elasticsearch, Django, botocore, beautifulsoup4, s3transfer, google-api-core, djangorestframework, django-treebeard, django-taggit, django-storages, django-redis, django-permissionedforms, django-modelcluster, django-filter, django-debug-toolbar, django-basic-auth-ip-whitelist, aws-requests-auth, wagtail, google-cloud-core, boto3, google-cloud-storage
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
twine 3.8.0 requires urllib3>=1.26.0, but you have urllib3 1.25.11 which is incompatible.
Successfully installed Django-4.1.7 Pillow-9.4.0 Willow-1.4.1 anyascii-0.3.1 asgiref-3.6.0 async-timeout-4.0.2 aws-requests-auth-0.4.0 backports.zoneinfo-0.2.1 beautifulsoup4-4.11.2 boto3-1.9.189 botocore-1.12.253 cachetools-4.2.4 dj-database-url-0.4.1 django-basic-auth-ip-whitelist-0.5 django-debug-toolbar-3.8.1 django-dotenv-1.4.1 django-filter-22.1 django-modelcluster-6.0 django-permissionedforms-0.1 django-redis-5.2.0 django-storages-1.13.1 django-taggit-3.1.0 django-treebeard-4.6.1 djangorestframework-3.14.0 docutils-0.15.2 draftjs-exporter-2.1.7 elasticsearch-5.5.3 et-xmlfile-1.1.0 google-api-core-2.10.2 google-auth-1.35.0 google-cloud-core-1.7.3 google-cloud-storage-1.20.0 google-resumable-media-0.4.1 googleapis-common-protos-1.58.0 html5lib-1.1 jmespath-0.10.0 l18n-2021.3 openpyxl-3.1.1 protobuf-4.22.0 psycopg2-2.9.5 pyasn1-0.4.8 pyasn1-modules-0.2.8 pytz-2022.7.1 redis-4.5.1 rsa-4.9 s3transfer-0.2.1 soupsieve-2.4 sqlparse-0.4.3 telepath-0.3 urllib3-1.25.11 uwsgi-2.0.21 wagtail-4.2 wagtail-font-awesome-svg-0.0.3 whitenoise-5.0.1
WARNING: You are using pip version 22.0.3; however, version 23.0 is available.
You should consider upgrading via the '/home/gitpod/.pyenv/versions/3.8.12/bin/python -m pip install --upgrade pip' command.
No changes detected
Traceback (most recent call last):
  File "manage.py", line 14, in <module>
    execute_from_command_line(sys.argv)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/workspace/.pip-modules/lib/python3.8/site-packages/django/core/management/__init__.py", line 440, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/django/core/management/base.py", line 402, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/django/core/management/base.py", line 448, in execute
    output = self.handle(*args, **options)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/django/core/management/base.py", line 96, in wrapped
    res = handle_func(*args, **kwargs)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 114, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/django/db/migrations/executor.py", line 18, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/django/db/migrations/loader.py", line 58, in __init__
    self.build_graph()
  File "/workspace/.pip-modules/lib/python3.8/site-packages/django/db/migrations/loader.py", line 235, in build_graph
    self.applied_migrations = recorder.applied_migrations()
  File "/workspace/.pip-modules/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 81, in applied_migrations
    if self.has_table():
  File "/workspace/.pip-modules/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 57, in has_table
    with self.connection.cursor() as cursor:
  File "/workspace/.pip-modules/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/django/db/backends/base/base.py", line 323, in cursor
    return self._cursor()
  File "/workspace/.pip-modules/lib/python3.8/site-packages/django/db/backends/dummy/base.py", line 20, in complain
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.
Unknown command: 'load_initial_data'. Did you mean loaddata?
Type 'manage.py help' for usage.
CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False.
gitpod /workspace/bakerydemo (main) $ 

from bakerydemo.

laymonage avatar laymonage commented on August 16, 2024

Thanks, we made some changes to the setup in #393 which was merged yesterday. Looks like the Gitpod config hasn't been updated and the README was incorrect.

With a virtualenv setup, after the following step:

bakerydemo/readme.md

Lines 153 to 157 in 66aa555

Next, we'll set up our local environment variables. We use [django-dotenv](https://github.com/jpadilla/django-dotenv)
to help with this. It reads environment variables located in a file name `.env` in the top level directory of the project. The only variable we need to start is `DJANGO_SETTINGS_MODULE`:
cp bakerydemo/settings/local.py.example bakerydemo/settings/local.py
touch .env

Updating the .env file with the following content should fix it:

DJANGO_SETTINGS_MODULE=bakerydemo.settings.dev

or you can also update the same file on Gitpod (change local to dev), and then running the following commands afterwards:

      python manage.py makemigrations
      python manage.py migrate
      python manage.py load_initial_data
      echo "CSRF_TRUSTED_ORIGINS = ['https://*.gitpod.io']" >> bakerydemo/settings/local.py

from bakerydemo.

sowinski avatar sowinski commented on August 16, 2024

Thank you :)

Once it is published. Create a release so we know that this version should work for sure :)

Thank you for the fast reply

from bakerydemo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.