Skip to content

Comments

bug fix: install plugin error when use url() method#1366

Open
toan10921 wants to merge 2 commits intousmannasir:stablefrom
toan10921:stable
Open

bug fix: install plugin error when use url() method#1366
toan10921 wants to merge 2 commits intousmannasir:stablefrom
toan10921:stable

Conversation

@toan10921
Copy link

When install plugin via cyberCP, method upgradingURLs line 60 still use:
writeToFile.writelines(" url(r'^" + pluginName + "/',include('" + pluginName + ".urls')),\n")
i changed to
writeToFile.writelines(" path(r'^" + pluginName + "/',include('" + pluginName + ".urls')),\n")

@OnurTasci
Copy link

https://github.com/OnurTasci/cyberpanel-helloWorld-plugin/

You can check out the sample plugin I made

@toan10921
Copy link
Author

I’ve checked your sample plugin — thank you!
My changes are specifically aimed at ensuring compatibility with newer Django versions by replacing url() with path().
Let me know if there’s anything else you’d recommend improving in this PR.

master3395 added a commit to master3395/cyberpanel that referenced this pull request Sep 20, 2025
…Pattern method to generate URL patterns compatible with both Django 2.x and 3.x+. Update URL writing logic to utilize this method for improved maintainability and compatibility.

usmannasir#1366
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants