Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8194643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:53:28+00:00 2026-06-07T04:53:28+00:00

I’m writing a tool that monitors an external api and verifies that it works

  • 0

I’m writing a tool that monitors an external api and verifies that it works as documented.

Basically I have two models:

ServerTest, which has a url and a string of json that we expect the target server to return for that url

and

TestResult which has a foreign key relationship with ServerTest, a string containing the server’s actual response, and a timestamp for when the test occurred.

Periodically, the app will run through each ServerTest, ping the TargetServer, and create a new TestResult instance for each ServerTest.

Now what I want to do is view a json diff between the actual and expected json. I was thinking I might use this widget: http://tlrobinson.net/projects/javascript-fun/jsondiff/. I was also thinking I might embed that widget in the django admin. The problem is, in order to generate the diff I need to access both the ServerTest instance and the latest corresponding TestResult instance. It doesn’t seem like there’s a straight-forward way to do this through django admin. Should I give up and just make a separate view? I’d rather not do that, because I feel like I would keep adding functionality to that view until I had reimplemented half of the django admin interface.

To recap I need to:

1) Access a ServerTest instance

2) Access a TestResult instance

3) Add an html container (say, on the ServerTest admin page)

4) Run some javascript that has access to the currently viewed ServerTest’s expected_json and the latest corresponding TestResult’s actual_json

5) Have that javascript dynamically inject html into the aforementioned container

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T04:53:31+00:00Added an answer on June 7, 2026 at 4:53 am

    Since you’re injecting html anyway, i would do a simple view, that generates diff you need, and then call it inside admin page.

    In order to add custom JS in admin, you can use ModelAdmin Media

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.