Update value in database

2019-12-19 Thread Nuno Vieira
Hi! I have a real estate django app and i have a form to users insert a new property. I also have in the form several images fields that users can use to upload images to database whitout problem. The problem is if the *user want to delete one of the images field.* I have an ajax request that

Trying to add radio button and store its value in database.. Django

2019-06-02 Thread abb
https://stackoverflow.com/questions/56407153/radio-button-with-default-selection-in-django Not understanding where am i going wrong here. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: Unable to Save form to mysql - How to save form field values to mysql database and get the value from database

2018-07-02 Thread Andréas Kühne
In your views file, you don't have any index method - that's what the error is saying. So you need to solve the url mapping for your index method. Regards, Andréas 2018-07-02 5:55 GMT+02:00 Tamilvanan Anbalagan : > Hi Team, > > I am very new to django framework, iI am trying to using simple

Unable to Save form to mysql - How to save form field values to mysql database and get the value from database

2018-07-02 Thread Tamilvanan Anbalagan
Hi Team, I am very new to django framework, iI am trying to using simple forms to save into mysql database. also any samples pls send it to me, which will help to understand the connectivity. *see my sample code:* *views.py* from django.http import HttpResponseRedirect from django.views

Re: Add value to database without using forms in django

2017-09-30 Thread Mitul Tyagi
Yup did it.save() method. I wanted to know if we need to create form for saving or other way's are present also...I got the answer. Thanks for the reply On Saturday, September 30, 2017 at 9:19:41 PM UTC+5:30, Derek wrote: > > Yes, its a strange question. > > You can of course always add a

Re: Add value to database without using forms in django

2017-09-30 Thread Derek
Yes, its a strange question. You can of course always add a new method to the City class: class City(models.Model): ... def get_cities(self): return ''.join([self.city1, self.city2, self.city3, self.city4, self.city5])) and then store those in Name; but from a design POV,

Re: Add value to database without using forms in django

2017-09-30 Thread Constantine Covtushenko
Hi Mitul, Can you clarify a little bit more your question? What are you trying to resolve? You asked: "How it will be done...?" It is not clear what exactly you are trying to be done. I guess that it my be saving cities into model 'cityval' fields. Am I correct? If so you can do something like

Add value to database without using forms in django

2017-09-30 Thread Mitul Tyagi
I have a model named "Name" which stores the list of all cities present in other model named "City". How can it be done internally in the views.py without using forms. Here is the code of models.py " # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models

Re: no value in database

2013-09-30 Thread Satinderpal Singh
On Mon, Sep 30, 2013 at 10:07 PM, Harjot Mann wrote: > Here is the code to my view, > http://tny.cz/57446220 > After filing form when I click on submit button , I am getting this > error "SsupenceEditJob matching query does not exist" and not getting I think it must be

no value in database

2013-09-30 Thread Harjot Mann
Here is the code to my view, http://tny.cz/57446220 After filing form when I click on submit button , I am getting this error "SsupenceEditJob matching query does not exist" and not getting any values in database. Help me please. -- Harjot Kaur Mann Blog: http://harjotmann.wordpress.com/ Daily

Re: Getting last or max "id" value from database

2010-09-05 Thread Jagdeep Singh Malhi
> Given that the ModelForm save() method actually returns the Input object > it has just created, wouldn't you be better simply saying > >     p = form.save() > Problem solved Thanks Sir. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Getting last or max "id" value from database

2010-09-05 Thread Steve Holden
On 9/5/2010 3:12 AM, Jagdeep Singh Malhi wrote: > I try to get the max value of id from database using max() function > but a face this error. > { > TypeError at /add_db/ > > 'builtin_function_or_method' object is not iterable > > Request Method: POST > Request URL:

Getting last or max "id" value from database

2010-09-05 Thread Jagdeep Singh Malhi
I try to get the max value of id from database using max() function but a face this error. { TypeError at /add_db/ 'builtin_function_or_method' object is not iterable Request Method: POST Request URL:http://localhost/django/add_db/ Django Version: 1.2.1 Exception Type:

Re: change a value of database

2008-07-16 Thread Alfredo Alessandrini
solved... from GAME.models import Game p = Game.objects.get(id=1) p.name = '2' p.save() --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

change a value of database

2008-07-16 Thread Alfredo Alessandrini
I've a simple a question... How can I update a single value of database?? I've try this: from GAME.models import Game Game.objects.filter(id=1) p.name='2' but don't update...It's add a row. thanks in advance, Alfredo --~--~-~--~~~---~--~~ You received