Git Product home page Git Product logo

Comments (22)

emlinhax avatar emlinhax commented on July 20, 2024 1

This seems to be working! No issues so far

from django-approval.

emlinhax avatar emlinhax commented on July 20, 2024 1

Works fine as far as I can tell! 👍

from django-approval.

emlinhax avatar emlinhax commented on July 20, 2024

You broke the extension with your fix. You should try to patch that ASAP.
It will throw an ImproperlyConfigured error when a model is approved because if the misplaced if-check

from django-approval.

artscoop avatar artscoop commented on July 20, 2024

Hi, I just noticed your message. I rushed that thing and indeed, now it's obvious, I made this throw an exception by mistake...

from django-approval.

artscoop avatar artscoop commented on July 20, 2024

I'll just put the update of the object out of the condition. I'll only put the messaging under the if statement.

from django-approval.

artscoop avatar artscoop commented on July 20, 2024

So, I've spent a little more time and uploaded an update.
It adds a new boolean attribute to the sandbox model (see docs) to auto-delete approval info when approved.
Also, the message telling "this form is showing changes pending..." is only displayed when the approval is pending (it was also shown on denied changes).
Furthermore, when changes are denied, forms should not fetch the changes from the sandbox.

Tell me what you find if you can test it.

from django-approval.

emlinhax avatar emlinhax commented on July 20, 2024

ValueError at /admin/mylibrary/book/add/ (example)
save() prohibited to prevent data loss due to unsaved related object 'source'.

when creating a new object that is monitored

./approval/listeners/monitored.py, line 33, in before_save

from django-approval.

artscoop avatar artscoop commented on July 20, 2024

Fix attempted. I'll have to write automated tests but meanwhile, if you can tell me it works with the latest git version (pip install https://github.com/artscoop/django-approval/archive/refs/heads/master.zip)

from django-approval.

emlinhax avatar emlinhax commented on July 20, 2024

Error when viewing approvals:

TemplateDoesNotExist at /admin/mylibrary/dynamicsandbox/
approval/display/sandbox-data.html

from django-approval.

artscoop avatar artscoop commented on July 20, 2024

Now this one is weird. I tried hard working with setuptools to include the template (a nightmare). It finally worked in december. Given you don't have the folder when installing the archive, it seems that only the wheel package is correct. Same build, different results... It's almost comical. Anyway, I'll try fiddling with pyproject.toml to find the issue.

from django-approval.

emlinhax avatar emlinhax commented on July 20, 2024

Any progress?

from django-approval.

artscoop avatar artscoop commented on July 20, 2024

Yes, I ditched pyproject.toml (does not work well for packaging) in favor of the classic setup.py. It worked immediately, and both package versions (.tar.gz and .whl) seem to properly install the requested files (tried both in an empty venv). If you try installing again with pip install https://github.com/artscoop/django-approval/archive/refs/heads/master.zip tell me what you get

from django-approval.

emlinhax avatar emlinhax commented on July 20, 2024

Same error (TemplateDoesNotExist "dynamicsandbox").

I did the following. I cloned the repo, ran the command you gave me (python 3.10 works, python 3.11 fails building).
Then I migrated the migrations in "scenario" and ran the server.

Whenever I try to visit an approval model in the django-admin, I get that error.

I used your scenario project this time to make sure im not the one doing something wrong.

from django-approval.

artscoop avatar artscoop commented on July 20, 2024

Weird. I use Python 3.11. I'll have to test on another machine. And you're definitely not doing something wrong. That's the "it's working on my machine" syndrome, with something weird in the environment I'm working in. Note that I'm using Linux on both machines I code on.

from django-approval.

emlinhax avatar emlinhax commented on July 20, 2024

Hey, any updates?

from django-approval.

artscoop avatar artscoop commented on July 20, 2024

Hi,
Still not sure since the scope of build tools is HUGE but I think I got it: https://stackoverflow.com/a/14159430/726230

I'll make a change right now and tell you when it's done.

from django-approval.

artscoop avatar artscoop commented on July 20, 2024

Ok, so try reinstalling with
pip install -U --ignore-installed https://github.com/artscoop/django-approval/archive/refs/heads/master.zip

then pip freeze | grep approval (on Linux) should say you have version 0.15.1.

Just tried on a clean venv, twice. Tell me what you get.

from django-approval.

artscoop avatar artscoop commented on July 20, 2024

Excellent, thanks !
I'll prepare a new PyPI release then

from django-approval.

emlinhax avatar emlinhax commented on July 20, 2024

Hey, is it released yet?

from django-approval.

emlinhax avatar emlinhax commented on July 20, 2024

Ping

from django-approval.

artscoop avatar artscoop commented on July 20, 2024

Hi,
I just uploaded a new version on PyPI (0.15.1). I didn't have time yesterday because of work. If you test installing with pip install -U django-approval, is everything still working? (It will probably use the .whl version)

from django-approval.

artscoop avatar artscoop commented on July 20, 2024

Thanks a lot!

from django-approval.

Related Issues (7)

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.