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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:36:34+00:00 2026-06-12T05:36:34+00:00

How to create specific function in admin site that send a e-mail to People(email)

  • 0

How to create specific function in admin site that send a e-mail to People(email) with information (name, price) from my model ?

Something like this but “Sending email to selected people”:

enter image description here

models.py

from django.db import models

class People(models.Model):
    name = models.CharField(max_length=255)
    price = models.DecimalField(max_digits=5, decimal_places=2)
    email = models.EmailField()

    def __unicode__(self):
        return self.name

admin.py

from django.contrib import admin
from demo.app.models import People

class PeopleAdmin(admin.ModelAdmin):
    list_display = ('name', 'email')

admin.site.register(People, PeopleAdmin)

email

send_mail('People information', 'People name is People.name, People price is People.price', 'mymail@gmail.com',
    ['email_from_email_field_from_model'])
  • 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-12T05:36:35+00:00Added an answer on June 12, 2026 at 5:36 am

    You need create a function, and make that.

    def send_mail(modeladmin, request, queryset):
        for msg in queryset:
            send_mail('People information', msg.name, msg.price, msg.email,
        [msg.email])
    send_mail.short_description = u'Send e-mail to selected objs'
    
    class PeopleAdmin(admin.ModelAdmin):
        list_display = ('name', 'email')
        actions = (send_mail,)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create a function in C# that takes a specific webpage
Question How do you procedurally create a function in Python which takes specific named
I like to create a specific filename for a file that will be created
I want to create a HTTP request from a specific port using C on
We need to create a program in PHP/MySQL that will display all the 'people',
I'm currently integrating information from a third party API into a wordpress site. What
I need to create a WordPress plugin that calls a PHP function when a
I wanted to know how to use JQuery to create a function that will
I'm trying to create specific custom filter effects on image for iOS. So far,
I am trying to create a specific aspx page where I display clickable links

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.