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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:56:38+00:00 2026-05-16T17:56:38+00:00

un rails i can simply insert the params into the database with one command,

  • 0

un rails i can simply insert the params into the database with one command, when all form-field names are the same like the model-field names. is this possible in django as well, or do i have to set each param individually. i have like 20 fields, so it’s a bit of a mess.. 🙂

something like:

blah = Contact()
blah.content = params[]
blah.save()

thanks!

  • 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-16T17:56:39+00:00Added an answer on May 16, 2026 at 5:56 pm

    Well, if you’re using a form, you should use a ModelForm, so you can do form.save().

    But generally, you can instantiate an object from a dictionary of parameters using the **kwargs format:

    blah = Contact(**params)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A single Rails command can make lots of changes in an app - creating
I've heard that you can tie a model in rails to a database view
How would I create the following scenario that rails can provide for carrierwave, using
Can rails handle creating a view without a controller? For example, let say I
Hoping some learned Rails developers here can recommend an existing Ruby on Rails plugin
How can i read cookie set date? In rails api I can not find
i am currently writing a webapp in rails where users can mark items as
I am looking for an upload solution for Ruby on Rails where I can
How can I clean this up using rails 3 features? I have a post
Can I set rails to use mysql with MEMORY as the DB engine? I

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.