Giter VIP home page Giter VIP logo

epicserve / django-base-site Goto Github PK

View Code? Open in Web Editor NEW
361.0 361.0 41.0 7.38 MB

The Django Base Site is a Django site that is built using the best Django practices and comes with all the common Django packages that you need to jumpstart your next project.

License: MIT License

Python 46.47% Shell 4.97% JavaScript 5.54% HTML 31.05% SCSS 1.43% Just 10.54%
boilerplate django python starter-template tools vite

django-base-site's People

Contributors

codyfletcher avatar collinanderson avatar dependabot[bot] avatar epicserve avatar github-actions[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-base-site's Issues

Upgrading npm dependencies (just upgrade_node_requirements) makes `node` container stop working

How to reproduce the issue.

  1. Create a new project (following the README.md)
just start
just upgrade_node_requirements
  1. Stop containers (ctrl-c)
  2. Attempt to bring containers up: just start

The above command fails with:

node    |
node    | > dev
node    | > vite --config src/config/vite.config.js
node    |
node    | sh: 1: vite: not found
node exited with code 127

One potential solution

All I could find to resolve this error was to prefix the vite command in package.json with npx:

    "dev": "npx vite --config src/config/vite.config.js",

I'd submit a PR, but wasn't sure it was inline with how you would solve it. Very interested in your thoughts! This is an AMAZING project, by the way. 👍👍👍

A non-code solution

This might be akin to saying "don't end up here", but...

  1. Stop containers, if running (ctrl-c)
  2. Delete containers: docker ps -a | grep "django-base-site" | awk '{print $1}' | xargs docker rm
  3. Delete volume: docker volume ls | grep "django-base-site" | grep "node_data" | awk '{print $2}' | xargs docker volume rm
  4. Bring containers back up: just start

Setup error for six package of django.utils

I was following along the docs (https://django-base-site.readthedocs.io/en/latest/setup-and-usage.html) and I got this long error which is occured for django.utils.six while running migrate command.
Here is the error log:

django.core.cache.backends.base.InvalidCacheBackendError: Could not find backend 'redis_cache.RedisCache': cannot import name 'six' from 'django.utils' (/home/tareq/.local/share/virtualenvs/example-Y5_gWTrw/lib/python3.9/site-packages/django/utils/__init__.py)

Python: 3.9
OS: Manjaro
Am I missing any config or anything else?

Complete Error Log:

Traceback (most recent call last):
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/django/core/cache/__init__.py", line 39, in create_connection
    backend_cls = import_string(backend)
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/django/utils/module_loading.py", line 17, in import_string
    module = import_module(module_path)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/redis_cache/__init__.py", line 1, in <module>
    from redis_cache.backends.single import RedisCache
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/redis_cache/backends/single.py", line 9, in <module>
    from redis_cache.backends.base import BaseRedisCache
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/redis_cache/backends/base.py", line 18, in <module>
    from redis_cache.utils import get_servers, parse_connection_kwargs, import_class
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/redis_cache/utils.py", line 5, in <module>
    from django.utils import six
ImportError: cannot import name 'six' from 'django.utils' (/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/django/utils/__init__.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/tareq/code/explore-dj/wow_djbase/manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 79, in execute
    return super().execute(*args, **options)
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/django/core/management/base.py", line 393, in execute
    self.check()
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/django/core/management/base.py", line 419, in check
    all_issues = checks.run_checks(
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/django/core/checks/registry.py", line 76, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/django/core/checks/caches.py", line 63, in check_file_based_cache_is_absolute
    cache = caches[alias]
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/django/utils/connection.py", line 62, in __getitem__
    conn = self.create_connection(alias)
  File "/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/django/core/cache/__init__.py", line 41, in create_connection
    raise InvalidCacheBackendError(
django.core.cache.backends.base.InvalidCacheBackendError: Could not find backend 'redis_cache.RedisCache': cannot import name 'six' from 'django.utils' (/home/tareq/.local/share/virtualenvs/wow_djbase-YT6snu27/lib/python3.9/site-packages/django/utils/__init__.py)

Development environment is using sqlite instead of the Postgres `db` container

When I ran just start I watched the containers come online and assumed my database migrations were running in the db container. My assumption was wrong—that the database used in my local development environment was the postgres/db container—but it took me an embarassingly long time to figure it out. :P

Figured I'd bring it up here before looking into it to see what your thoughts are. I was thinking along the lines of the "Dev/prod parity" from 12 Factor App.

Tailwind CSS

Hi, given its popularity, adding support to Tailwind could be a winning move.

It's just a suggestion and anyway it can be added later using this application https://github.com/timonweb/django-tailwind

But I'm curious to know what you think and if it can be feasible.

👋

Pull access denied for epicserve/django-base-site

$ just start
[+] Running 3/3
 ! web Warning                                                                                                                                                    1.8s 
 ✘ worker Error                                                                                                                                                   1.8s 
 ! node Warning                                                                                                                                                   1.8s 
Error response from daemon: pull access denied for epicserve/django-base-site, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
error: Recipe `start` failed on line 159 with exit code 18

Looks like the image is missing on dockerhub?

Remove Node Deprecation Warnings

There are a few deprecation warnings in the terminal when running webpack. I would gladly accept a pull request that removes them.

Error when trying to commit

I get this error message when I want to commit my changes in config/urls.py

.git/hooks/pre-commit: 5: export: config/urls.py: bad variable name

Can anyone help me resolve it. I think it has something to do with the type of shell inside the container

VPS Deployment?

Just want to confirm that this starter is specifically for deployment to fly.io and not to a VPS.

Poetry support

This project is very interesting and I use Poetry locally for the venv management (so I don't need docker locally to work).

Do you will consider poetry support?

Sign-in tweaks

  • Turn off the success message after you've signed in
  • Maybe don't require verification of a user's email when they first sign-up. This is a pain if you haven't setup email on a new system yet. Maybe this could be changed later after a new app/system has setup an email service.

Windows Documentation Needed

It would be great if there was someone out there that would help develop and maintain documentation for Windows. Hopefully, it could be something simple like follow the Docker WSL 2 instructions and then follow the rest of the Django Base Site's instructions.

Select latest stable Python version

I would create a PR, but figured the end result would depend on your preference.

Locally, in my Dockerfile.web I changed python:3-buster to python:3.11-bookworm (in 2 places)

Reasoning:

  1. Latest "stable" release of debian is bookworm (buster is "oldoldstable")
  2. Selected Python version 3.11 instead of 3 to get the latest stable minor version. That seemed like a good idea. :)

Upgrade to ESLint v9

Upgrade to ESLint v9 once the issue in Airbnb Javascript project has been completed which is currently blocking the upgrade.

Improve documentation

  • Add more rationale and reasons for why packages were chosen
  • Add more about the directory structure and rationale for it
  • Add a goals sections
  • Add documentation on how Vite works
  • Add documentation on make
  • Add a roadmap
    • Add easy deployment to several PaaS
    • Reduce the number of files in the root directory
    • Choose a better name
    • Create a cool logo

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.