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 7079847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:43:19+00:00 2026-05-28T06:43:19+00:00

I have created models and from the models, I created ModelForms . However, I

  • 0

I have created models and from the models, I created ModelForms. However, I noticed that the widgets generated from the ModelForm are not as same as the widgets when I am in Admin pages.

How can I:

  1. Get the same widget as the ones in admin pages. Those are awesome. The foreign key field comes with ‘plus’ icon that enables you to add new item being referenced to.

  2. Date time widget has ‘Now’ button that enables you to populate the field instantly with the current time.

  3. Is there any other cool plugin out there for the widgets? So far all I got is meh, just plain html widget that doesnt make sense even for field like Datetime (it generates normal plain input control).

  • 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-28T06:43:20+00:00Added an answer on May 28, 2026 at 6:43 am

    You should have a look to django/contrib/admin/widgets.py You will find here the admin site widgets. Then in you form, make something like:

    from django.contrib.admin.widgets import AdminDateWidget
    
    class MyForm(ModelForm):
    
        class Meta:
            widgets = {
                'date': AdminDateWidget(),
            }
    

    Make sure that your template includes the required media files (css, js)

    I also recommend to look at django-floppyforms which is a very nice lib if you want better widgets

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

Sidebar

Related Questions

Hi Everyone I m dealing with some serious issue in django-admin.I have created models
I have a ModelForm field that is based on the following Model: class Phrase(models.Model):
if i have created a view model and have a partial form that is
I have an Entity Data Model that I have created, and its pulling in
Basically, I have a model where I've created a superclass that many other classes
Is it possible to have multiple models included in a single ModelForm in django?
I have a class Book : from django.db import models from users.models import User
I have the following model and it's form: class Project(models.Model) class ProjectForm(forms.ModelForm) class Meta:
I have a question on ModelForms in Django. If I'm creating a form from
I have a form: class AdForm(ModelForm): class Meta: model = Ad widgets = {

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.