Code Monkey home page Code Monkey logo

Comments (12)

harishr1308 avatar harishr1308 commented on July 21, 2024

The above was resolved by making the below change

migrations.RunPython(
            code=migrations.RunPython.noop,
            reverse_code=add_legacy_name,
            hints={"model_name": "contenttype"},
            elidable=False,
        ),

from django-squash.

kingbuzzman avatar kingbuzzman commented on July 21, 2024

The bigger issue i see is that anything inside site packages should be ignored and it decided to squash it.. Iā€™m on vacation now, but i will look into this when i have a chance. thank you for bringing it up to my attention.

from django-squash.

kingbuzzman avatar kingbuzzman commented on July 21, 2024

@harishr1308 thank you for your patience. I've tried replicating your issue to no avail, if i can ask you to give me a couple of details:

  • where is your code installed?
  • why this this function failing to see the difference between your env (/env/lib/python3.9/site-packages) vs where your code is installed in?

i should reiterate: site-packages should be ignored completely by django-squash, i need to understand why it's not doing whats intended.

from django-squash.

harishr1308 avatar harishr1308 commented on July 21, 2024

Welcome back from your vacation! My environment is within the project root directory.

from django-squash.

kingbuzzman avatar kingbuzzman commented on July 21, 2024

Just to clarify: your code is installed inside the site-packages ? i.e. you have a setup.py and you ran install?

from django-squash.

kingbuzzman avatar kingbuzzman commented on July 21, 2024

May i ask, what is your dev environment doing inside site-packages?

from django-squash.

kingbuzzman avatar kingbuzzman commented on July 21, 2024

@harishr1308 ?

from django-squash.

harishr1308 avatar harishr1308 commented on July 21, 2024

Hi! Sorry for getting back to you sooo late. My code is not installed inside site-packages. I've got my local environment sitting on the root of the project directory. This package was installed by running pip install and I configured it as an app in Django Settings and ran python manage.py squash_migrations.

from django-squash.

kingbuzzman avatar kingbuzzman commented on July 21, 2024

Right, that's an issue. Very few django projects ive seen work this way, and i've personally never worked with one that does.
I can see this working if i create a kind of project variable that holds the apps you want to squash.. or just tell the squash command.

I'll think about it a bit more and get back to you.

from django-squash.

kingbuzzman avatar kingbuzzman commented on July 21, 2024

Looks like i did think ahead. I included --only and --ignore-apps arguments to the squash_migrations management command. Depending on how many apps you're using, you would chose one or the other, personally, i'd go with --only since that would be the most explicit way, but up to you.

Let me know if that solves your issue.

from django-squash.

kingbuzzman avatar kingbuzzman commented on July 21, 2024

@harishr1308?

from django-squash.

harishr1308 avatar harishr1308 commented on July 21, 2024

Hi! I'm sorry but I have since removed the project from my dependencies. We can close this issue as it stands. I'll test it out again with some other personal projects.

from django-squash.

Related Issues (10)

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.