Comments (3)
It fails to create a row in one table, because one CharField
value is too long for the column in the database.
You haven't shared a lot of logs, so we don't see which migration fails. However, since you're claiming that it's a fresh project and that the size of the column is 50, I bet it's failing on sites.0003_set_site_domain_and_name
, which creates the site into the DB table from Django's sites framework:
The name
is 50 char long:
Did you redact the value of your project name by any chance? Is the actual value longer than 50 char? If that's the case, I suggest you to edit the name of the site in your migration sites.0003_set_site_domain_and_name
. AFAIK, it's just an internal alias for you project name within the admin, it doesn't affect what the users will see. Let me know it it fixes your issue.
As for a fix to the template itself, we could limit the length of the value in the migration:
def update_site_forward(apps, schema_editor):
"""Set site domain and name."""
Site = apps.get_model("sites", "Site")
_update_or_create_site_with_sequence(
Site,
schema_editor.connection,
"{{cookiecutter.domain_name}}",
- "{{cookiecutter.project_name}}",
+ "{{cookiecutter.project_name[:50]}}",
)
from cookiecutter-django.
alright, just a quick update. I've created another project with the same settings but a different project name (shorter).
The above error is gone and I have 26 passing tests.
I'll investigate it further later today or tomorrow to make sure it was related to the length of the project name, just FYI the exception was thrown on multiple occasions including your suspected sites app.
so far, thx for the response.
from cookiecutter-django.
now I've recreated the project with exactly the same inputs as yesterday but I couldn't reproduce the issue. so whatever it was, it was fixed by one of the last commits in between my try yesterday and today.
since I'm not able anymore to reproduce I'll just close this issue.
from cookiecutter-django.
Related Issues (20)
- whitenoise.runserver_nostatic is ignored HOT 5
- Upload media permission denied in production HOT 2
- Cannot connect to redis://redis:6379/0 HOT 1
- Link in README to http://12factor.net is broken - use HTTPS
- cookiecutter-django template django.db.utils.ProgrammingError HOT 3
- Django can't find assetss generated by Webpack HOT 2
- 504 Gateway Timeout HOT 2
- VSCode privileges .editorconfig over settings.json for single quotes HOT 3
- Unused gulp dependency added to package.json when Webpack is chosen HOT 2
- Collectfast is no longer maintained HOT 1
- Invalid HTTP_HOST header: <ip>. You may need to add <ip> to ALLOWED_HOSTS. (yes, again) HOT 1
- Addressing E203 Whitespace Error in Pre-commit using flake8 Configuration HOT 1
- Why prefer python than bash for wait the service start HOT 2
- Changes are not detected in docker windows without frontend pipeline HOT 2
- Lightweight Cookiecutter Project
- error on letsencrypt certificate renewal HOT 4
- Flower on production raises Permission denied
- Python 3.12 HOT 3
- Add rmbackup script to remove backups from postgres/backups in docker-compose
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookiecutter-django.