Hello everybody,
I'm working in a website using django. I would like that users could select
and delete data introduced for them. I've found some information on the web
and it seems that the ListView and DeleteView is what I need. However, when
I try to do a ListView, it doesn't work and I don'
Soory, it's a class, but it doesn't work properly neither. Do I have to
introduce anything in urls.py? I haven't put anything because I want the
listview in a url already created.
El lunes, 2 de febrero de 2015, 13:29:53 (UTC+1), elcaiaimar escribió:
>
> Hello everybody,
Hello!
I've written a code to delete db registers and I want to call an ajax
function when the delete is done.
At the moment, when I click my delete button I only receive a message:
{"status":"True","product_id":p.id} or {"status":"False"}
and this should be sent to the ajax function and I shou
Hello!
I've written a code to delete db registers and I want to call an ajax
function when the delete is done.
At the moment, when I click my delete button I only receive a message:
{"status":"True","product_id":p.id} or {"status":"False"}
and this should be sent to the ajax function and I shou
Hello,
I was wondering how I can send a response JSON in a good way, because I
have the next code:
if "product_id" in request.POST:
try:
id_producto = request.POST['product_id']
p = Pozo.objects.get(pk=id_producto)
mensaje = {"status":"
it!
Is there anything wrong in my code?
El jueves, 19 de febrero de 2015, 21:49:59 (UTC+1), Vijay Khemlani escribió:
>
> What do you mean with "in a good way"? Does your code work?
>
> On Thu, Feb 19, 2015 at 4:14 PM, elcaiaimar > wrote:
>
>> Hello,
>>
&g
, you can see the minute 12:16.
He clicks on the remove button and then, an alert appears!
My django version is 1.7
I hope this helps!
And Thank you for your answers!
El jueves, 19 de febrero de 2015, 20:14:32 (UTC+1), elcaiaimar escribió:
>
> Hello,
>
> I was wondering how I can sen
I solved it! Sorry, at last I had a bad called to jquery library in my
base.html. I had to check all my project
Thank you for your answers, you have helped me a lot!
El viernes, 20 de febrero de 2015, 21:01:46 (UTC+1), elcaiaimar escribió:
>
> Please, have a look at this tutorial:
&
Hello,
I have a website and I need that users can introduce a csv file and save
their data in a postgresql database. I can introduce a file and save it in
media_dir and in the database (only the url). But what I want is save each
row as a register in a table. I've searched some examples but I h
Hello!
I'm having problems in a form. I want to send some values with it to
'obras/edicionobra.html' but I also want to redirect to the page
"/edicionobra/". In the code below I send the values and I go to
edicionobra.html, however, the URL is /nuevacuenca/ and that's wrong.
I've tried to put
Finally, I've changed my way to send parameters, it's much better send them
by url.
El miércoles, 11 de marzo de 2015, 11:21:34 (UTC+1), elcaiaimar escribió:
>
> Hello!
>
> I'm having problems in a form. I want to send some values with it to
> 'obras/e
Hello
I wonder if somebody knows how to solve the next:
I want to send a value from the template to a script and it seems it works
but I get an error: Uncaught TypeError: Cannot read property 'value' of null
Below it is my code:
*Template:*
{{ obra.id }} is an object sended from views.py
*
Hello everybody, I'm working with django and geodjango and now I have a
problem with the geometry. I want that users can introduce coordinates in a
form and then, these are saved in a database (postgis).
Now, I can save X and Y coordinates, but the geom field doesn't work and I
don't know why.
Hello everybody, I've a problem with DecimalField at Forms. I've a long
form in my template and I want to left some fields in blank. I've declared
these fields with
*required=False*, but when I submit the form I receive this error: '*This
value must be a decimal number*'.
I've tried to declare
mal_places=0,
blank=True, null=True)
numacometidas = models.DecimalField(max_digits=2, decimal_places=0,
blank=True, null=True)
I think everything is ok, but if you find errors, please tell me. If not, I
will try to use south.
Thank you very much!
El domingo, 16 de noviembre de 2014 18:51:43 U
y.save()
I've tried to put default=None or default=Decimal('0.00') in my models.py
but it continues without working. I don't know what can I do
Thank you very much
El domingo, 16 de noviembre de 2014 18:51:43 UTC+1, elcaiaimar escribió:
>
> Hello everybody, I've a
Hi Collin
I'm using postgresql db, I' ve attached my views, forms and models. I' ve
thought to do the ModelForm when I solve this problem, thanks for your
advice!
Thank you very much!
El domingo, 16 de noviembre de 2014 18:51:43 UTC+1, elcaiaimar escribió:
>
> Hello ever
It works! You are great Collin! Thank you very much!
El domingo, 16 de noviembre de 2014 18:51:43 UTC+1, elcaiaimar escribió:
>
> Hello everybody, I've a problem with DecimalField at Forms. I've a long
> form in my template and I want to left some fields in blank. I've
Hello,
I have a CSV File and I want read it. The problem is that it has non ASCII
characters such as 'Ñ' and accents and I need that they are recognised to
save the CSV content in a DB.
To simplify, I've summed up my code in django to the next:
import csv
reader = csv.DictReader(open("file.c
;titulo']
pais=row['pais']
print titulo
print pais
However, when I compile it I get this error: *list indices must be
integers, not str*
How could I solve this problem?
Thank you again
El sábado, 6 de febrero de 2016, 3:14:01 (UTC+1), elcaiaimar escribió:
>
> He
Hello,
I have a problem because I don't know how could I send one specific
parameter. I've sent other parameters sometimes in others apps but this
time is more difficult.
Below it's my code. I want to send '*p*', which is an object. The problem
is that I can't send it in *else *because I've def
Hello,
I'm having a problem when I try to convert a python dictionary into a json
dictionary (*json.dumps(results, ensure_ascii=False)*).
Everything is ok, but when there is a date as a valure of the dictionary I
get this error: datetime.date is not json serializable. I don't know how to
solve
Hello,
I' ve an application where I upload a CSV file and save all its rows in a
database. This is ok, but, at the moment, when I upload the file and it
exists some error on it, it saves all rows until the wrong row. What I want
to achieve is that if there is an error when I save, don't save an
23 matches
Mail list logo