self = <_mysql.connection closed at 0x564d766406e0>
query = b'CREATE DATABASE `test_my_awesome_project` '
def query(self, query):
# Since _mysql releases GIL while querying, we need immutable buffer.
if isinstance(query, bytearray):
query = bytes(query)
_mysql.connection.query(self, query)
MySQLdb._exceptions.OperationalError: (1044, "Access denied for user 'hTXMUAgmwadoPNtqiaAXbrqPWtbnuTxY'@'%' to database 'test_my_awesome_project'")
/usr/local/lib/python3.9/site-packages/MySQLdb/connections.py:254: OperationalError
Description
What are you proposing? How should it be implemented?
Add support for MySQL 8.0
Rationale
Why should this feature be implemented?
What happened?
On running cookiecutter for the template, getting jinja2.exceptions.TemplateSyntaxError: expected token 'end of print statement', got '['
- Host system configuration:
-
Version of cookiecutter CLI (get it with cookiecutter --version
): Cookiecutter 2.1.1
-
OS name and version: Ubuntu 22.04 LTS
On Linux, run
cookiecutter https://github.com/mabdullahadeel/cookiecutter-django-mysql.git
-
Python version, run python3 -V
: Python 3.10.4
Logs:
~/Projects/cookiecutter > cookiecutter https://github.com/mabdullahadeel/cookiecutter-django-mysql.git py venv-cookiecutter 14:09:23
You've downloaded /home/asus/.cookiecutters/cookiecutter-django-mysql before. Is it okay to delete and re-download it? [yes]:
project_name [My Awesome Project]:
project_slug [my_awesome_project]:
description [Behold My Awesome Project!]:
author_name [Daniel Roy Greenfeld]:
domain_name [example.com]:
email [[email protected]]:
version [0.1.0]:
Select open_source_license:
1 - MIT
2 - BSD
3 - GPLv3
4 - Apache Software License 2.0
5 - Not open source
Choose from 1, 2, 3, 4, 5 [1]:
timezone [UTC]:
windows [n]:
use_pycharm [n]:
use_docker [n]:
Select database_engine:
1 - postgresql
2 - mysql
Choose from 1, 2 [1]:
Select database_version:
1 - postgresql@14
2 - postgresql@13
3 - postgresql@12
4 - postgresql@11
5 - postgresql@10
6 - [email protected]
7 - [email protected]
8 - [email protected]
Choose from 1, 2, 3, 4, 5, 6, 7, 8 [1]:
Traceback (most recent call last):
File "/home/asus/venvs/venv-cookiecutter/bin/cookiecutter", line 8, in
sys.exit(main())
File "/home/asus/venvs/venv-cookiecutter/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/asus/venvs/venv-cookiecutter/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/asus/venvs/venv-cookiecutter/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/asus/venvs/venv-cookiecutter/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/asus/venvs/venv-cookiecutter/lib/python3.10/site-packages/cookiecutter/cli.py", line 194, in main
cookiecutter(
File "/home/asus/venvs/venv-cookiecutter/lib/python3.10/site-packages/cookiecutter/main.py", line 102, in cookiecutter
context['cookiecutter'] = prompt_for_config(context, no_input)
File "/home/asus/venvs/venv-cookiecutter/lib/python3.10/site-packages/cookiecutter/prompt.py", line 195, in prompt_for_config
cookiecutter_dict[key] = render_variable(env, raw, cookiecutter_dict)
File "/home/asus/venvs/venv-cookiecutter/lib/python3.10/site-packages/cookiecutter/prompt.py", line 160, in render_variable
template = env.from_string(raw)
File "/home/asus/venvs/venv-cookiecutter/lib/python3.10/site-packages/jinja2/environment.py", line 1105, in from_string
return cls.from_code(self, self.compile(source), gs, None)
File "/home/asus/venvs/venv-cookiecutter/lib/python3.10/site-packages/jinja2/environment.py", line 768, in compile
self.handle_exception(source=source_hint)
File "/home/asus/venvs/venv-cookiecutter/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "", line 1, in template
jinja2.exceptions.TemplateSyntaxError: expected token 'end of print statement', got '['
Description
Current Readme is identical to the standard PostgreSQL-based https://github.com/cookiecutter/cookiecutter-django
repo.
Rationale
This is both confusing (for example, it still has the link to this project in it) and not helpful.
It would be helpful for someone like me that only sets up a new environment once in a while to have instructions on how to setup my MySQL environment as it differs from PostgreSQL from the docs.
What happened?
Execute make -C docs livehtml in the project root path, and an error is reported
What should've happened instead?
Additional details
Description
Currently only supports Mysql5.7, expect to support 8.0.Because when using Mysql8 locally, an error will be reported
Rationale
When using Mysql8.0 locally, executing python manage.py migrate
will report an error, indicating that the version is inconsistent, specifically the file root_path/contrib/sites/migrations/0003_set_site_domain_and_name.py
The specific method is _update_or_create_site_with_sequence
The specific code is
if created:
# We provided the ID explicitly when creating the Site entry, therefore the DB
# sequence to auto-generate them wasn't used and is now out of sync. If we
# don't do anything, we'll get a unique constraint violation the next time a
# site is created.
# To avoid this, we need to manually update DB sequence and make sure it's
# greater than the maximum value.
max_id = site_model.objects.order_by('-id').first().id
with connection.cursor() as cursor:
cursor.execute("SELECT last_value from django_site_id_seq")
(current_id,) = cursor.fetchone()
print(123123, current_id)
if current_id <= max_id:
cursor.execute(
"alter sequence django_site_id_seq restart with %s",
[max_id + 1],
)
If you comment out if created this code will not report an error
Description
What are you proposing? How should it be implemented?
Update GitHub actions to include the tests with MySQL database in docker containers.
Rationale
Why should this feature be implemented?
Description
What are you proposing? How should it be implemented?
Update github actions to run bare metal tests with MySQL database
Rationale
Why should this feature be implemented?
Currently, no tests are being run when no docker container is being used.
Recommend Projects
-
-
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
An Open Source Machine Learning Framework for Everyone
-
The Web framework for perfectionists with deadlines.
-
A PHP framework for web artisans
-
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
Some thing interesting about web. New door for the world.
-
A server is a program made to process requests and deliver data to clients.
-
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Some thing interesting about visualization, use data art
-
Some thing interesting about game, make everyone happy.
-
Recommend Org
-
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Open source projects and samples from Microsoft.
-
Google โค๏ธ Open Source for everyone.
-
Alibaba Open Source for everyone
-
Data-Driven Documents codes.
-
China tencent open source team.
-