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

  • SEARCH
  • Home
  • 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 6582641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:18:23+00:00 2026-05-25T16:18:23+00:00

I have 3 url fields defined in my model as follows: image_1 = models.URLField(max_length=100,

  • 0

I have 3 url fields defined in my model as follows:

image_1 = models.URLField(max_length=100, verify_exists=True, blank=True)
image_2 = models.URLField(max_length=100, verify_exists=True, blank=True)
image_3 = models.URLField(max_length=100, verify_exists=True, blank=True)

My question is, is there a way I can test whether the verify_exists returns True or False and if so take action depending on the output?

  • 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-05-25T16:18:23+00:00Added an answer on May 25, 2026 at 4:18 pm

    What django does is it use’s the URLValidator to see if the url is valid or not.
    what you could is use the same validations which is present in django.core

    EDIT:
    For example lets say you have to validate if django official website with url https://www.djangoproject.com/, exists or not. the code would simply look like this:

    from django.core.validators import URLValidator
    from django.core.exceptions import ValidationError
    
    
    my_url_validator = URLValidator(verify_exists=True) #creates a URLValidator object with verify_exists.
    my_url = "https://www.djangoproject.com/" #url to be verified   
    
    #check if url is valid :)
    try:                           
       my_url_validator(my_url) 
    except ValidationError:
       #not valid!! :_( 
       #fix: custom stuff to the rescue :)     
       CustomStuff()...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have three models defined as follows: class Comic < ActiveRecord::Base has_many :feeds end
My MySQL table is simple. I have 3 fields: an index a url a
I have a Django model with a large number of fields and 20000+ table
I have the following routes defined in my Global.asax: routes.MapRoute(name: Home, url: , defaults:
I have the following models defined in my application User Profile Address Here is
I have a Django application that defines a one-to-many model relationship. The models look
I defined several models: Journals, volumes, volume_scanInfo etc. A journal can have more volumes
I have a field URL countryURL; in a Country class. I want to store
I have URL like: http://example.com#something , how do I remove #something , without causing
I have URL scheme for my blog like this: http://www.example.com/%YEAR%/%MONTH%/%CATEGORY%/%POST_TITLE%/ Now i want to

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.