Code Monkey home page Code Monkey logo

Comments (6)

kingbuzzman avatar kingbuzzman commented on July 2, 2024 1

Inside the extract_function(), it gets called here.

Please add an option to turn function renaming on/off. In case someone wants to opt out.

Lastly. Please add tests. I can't stress this last one enough.

from django-squash.

kingbuzzman avatar kingbuzzman commented on July 2, 2024

That makes sense, PRs are welcome :D

from django-squash.

luzfcb avatar luzfcb commented on July 2, 2024

@kingbuzzman Since you know the codebase, can you please point me to the relevant parts of the source code that I should study in order to change and implement the proposed feature? This will probably save me some debug time....

from django-squash.

kingbuzzman avatar kingbuzzman commented on July 2, 2024

@luzfcb I really want to close this issue, but didnt want to leave you hanging either.

I started https://github.com/kingbuzzman/django-squash/pull/42/files to address this, im not sold on the name DJANGO_SQUASH_CUSTOM_RENAME_FUNCTION -- but its a working draft.

The idea is that you define a function somewhere in your code, and add DJANGO_SQUASH_CUSTOM_RENAME_FUNCTION='dot.path.location.where.is.the.function' in your settings.py and implement it obviously.. then this function would be called every time the squash finds an non-elidable operation and you can there dictate the name of the function. Still need to write an integration test for it.

But, does this work? is this what you had in mind? So far here are the variables you would have available migration (where the function is), name (name of function), app (name of the app), operation (operation object). From there you can name the functinon as you see fit.

Please let me know what you think. Thanks

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.