Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 141
    • Merge requests 141
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !431

You need to sign in or sign up before continuing.
Merged
Created Oct 03, 2017 by Georgios Dagkakis@georgios.dagkakisDeveloper

Add an API to be able to construct urls

  • Overview 42
  • Commits 2
  • Changes 12

[ this was merged, but later reverted by f236d898 because of a regression ]

This merge request is trying to provide an API so that we can construct urls in a more organised manner than manipulating strings.

The motivation, started from this merge request: !333, where absolute_url is overriden for Web Section and Web Site. Then we found that we have to do many dirty changes like:

              absolute_url python: here.absolute_url();
              absolute_url python: absolute_url[:-1] if absolute_url.endswith('/') else absolute_url;

(more of those in f601d7a5).

So we said we should make an API to have an organised manner, like we have e.g. Base_redirect to handle redirects.

  • First commit adds this as a script in erp5_core, along with a test.
  • Second commit uses it. It is not on my scope to change all erp5 code, but I focused on changing on the things I already had to in f601d7a5

@romain , @kazuhiko please make comments. Tests passed, but not on the final revision (did some amendments) and I think better not to re-run suite before getting comments. Also, @tatuya , I think you are responsible for ERP5 interfaces, so I would like your opinion if erp5_core is the good place, or maybe some other BT or product.

My plan would be to merge this and then !333 rebased on this. But in any-way this should be separate from !333.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: construct_url_api
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7