Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Numinix MediaWiki Demo
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
API/Edit
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Edit conflicts === <!--T:19--> </translate> <translate><!--T:20--> The [[<tvar name=1>#Sample code</tvar>|Python sample]] is a basic implementation of an edit request by a registered user.</translate> <translate><!--T:21--> In real-world scenarios, care should be taken to prevent edit conflicts.</translate> <translate><!--T:22--> These occur when two or more users are attempting to edit the same page at the same time.</translate> <translate><!--T:23--> Conflicts can be prevented by retrieving the last timestamp when we request a CSRF token.</translate> <translate><!--T:24--> Adding <tvar name=1><code>prop=info|revisions</code></tvar> to the CSRF token request in Step 3 allows us to access the timestamp for the last revision.</translate> <translate><!--T:25--> This timestamp will be used as the <tvar name=1><code>basetimestamp</code></tvar> when we make our the edit request.</translate> <translate><!--T:26--> We also need the exact time when we start our edit.</translate> <translate><!--T:27--> This can be retrieved by adding <tvar name=1><code>curtimestamp</code></tvar> to the CSRF request as well.</translate> <translate><!--T:28--> This value will serve as our <tvar name=1><code>starttimestamp</code></tvar>.</translate> <translate> <!--T:29--> Finally, in the actual edit request, set the <tvar name=1><code>basetimestamp</code></tvar> and <tvar name=2><code>starttimestamp</code></tvar> parameters, like so: </translate> <translate>
Summary:
Please note that all contributions to Numinix MediaWiki Demo may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)