Giter Site home page Giter Site logo

Comments (3)

philgyford avatar philgyford commented on June 24, 2024

Wow, you are on fire :) 🔥 🔥

Having it as a method on the mixin is a much better idea than mine too, very good.

Thank you. I shall give this a whirl tomorrow.

from django-wm.

beatonma avatar beatonma commented on June 24, 2024

Thanks for the suggestion - it was silly to have it require a unique slug in the first place, this makes it much more flexible.

I had a look at your repo and used a simplified version of your models and urlpatterns to test against so hopefully it's good to go!

from django-wm.

philgyford avatar philgyford commented on June 24, 2024

Just wanted to let you know that I've got the basics working and have it live on my site now, quietly! Thank you so much for your assistance.

I just need to work out how best to make it visible to people on my site now which is my own problem :)

One odd thing I noticed with my /webmentions/ endpoint, and I'm not sure if it's intentional...

  1. Using a valid blog post target URL returns a 200 and no error message
  2. Using an invalid URL returns a 404 and the "Target not found" message
  3. Using a URL that's a valid blog post URL format, but doesn't match a post object returns a 200 and no error message
  4. Using the valid target URL but without the trailing slash returns a 404 and the "Target not found" message
  5. Using a URL that's any other valid page, but not a blog post, returns a 200 and no error message

1 & 2 seem correct.
3. Seems wrong - not sure if it's a bug or if I need to do something further in my resolve_from_url_kwargs() method?
4. Is maybe technically correct, but I've seen bits of the django-wm code that tries both with and without trailing slashes, so I was surprised.
5. I could see a case for being correct - the page does exist! I assume it's not within the scope of the webmention endpoint to say whether it accepts mentions or not?

from django-wm.

Related Issues (20)

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.