-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some handlers don't seem to work #158
Comments
Solution for the html form handler (where $PBROOT is the root directory of your pb clone):
Edit:
This won't have the normal /f link work, though. Instead you will need /~f.html. You can then edit pb/templates/index.rst to change the /f link to /~f.html. Then you will have similar functionality to the official implementation. |
@jetpacktuxedo Edit: If |
Oh interesting, the way that I fixed it didn't use it as a paste, and I was sort of confused by what the page meant when it said it was just a paste. So the actual solution doesn't copy it into the project itself, but instead curls it to a novelty paste. Does anyone have any insight as to how the /f handler works internally? It looks like it used to be built in, but was removed in commit 6128ee2 |
Sorry for taking so long to respond; someone mentioned this issue to me awhile ago, but I forgot about it until I happened to see it again now.
Correct. I never really wanted to include UI like that in pb (which is supposed to just be an API), but I caved to demand and created the old
Internally, The docs don't have parity with this information--related: #151. |
Ah, that makes sense. I was trying to set it up on my local copy and couldn't write to the single character label. I didn't even think about writing it directly to the db. I ended up doing a vanity paste to /~f and changing the index to point there instead. I'll switch mine out to closer match the official implementation and maybe put some work into improving the docs for single character labels like was mentioned in #151. |
Just to add onto this in case someone runs into the same issue and stumbles across this post, here is the solution I settled on to get my configuration to mirror the official one: $ git clone https://github.com/sudokode/pbwww
$ cd pbwww
$ python deploy.py index.html js/index.js css/index.css | \
curl -F 'c=@-;filename=_.html' http://pb.west.isilon.com:8000/~htmlform
$ mongo pb
> db.pastes.update({label: "~htmlform"}, {$set: {"label": "f"}}) Note the Thanks @sudokode and @buhman for the pointers. Feel free to close this issue if you'd like. |
I modified your thing trivially, for clarity. Github is now stackoverflow. |
Specifically /f for the html form always returns
status: not found
I sort of suspect that this might be an artifact of my configuration (and might just be something that needs more documentation)
local/pb/paste/views.py has routes defined for /s, /l, /lf, and /ls, but nothing for /f, so maybe it is being tested as though it is a paste, seeing that it isn't a valid paste, and then dumping me out there?
I'm not sure why my local install is having this issue while https://ptpb.pw/ handles it fine.
The text was updated successfully, but these errors were encountered: