How to save a result of multiplication

2021-04-24 Thread jose angel encinas ramos
Hi everyone i build a web application in Django 3.1.7 and i try to do the next opeation(multiplication). in my models a have: class Articles(models.Model): quantity = models.PositiveIntegerField() cost_buy = models.DecimalField(max_digits=10, decimal_places=2) total_todo = models.Dec

Try to save multiple files using a one to many fields django

2021-02-21 Thread jose angel encinas ramos
hello everyone, i working in my inventory django app, in this project i try to create a new area and in to each area has a posible to save multiples pdf. so, when i try to save pdf in some new area have this error in terminal ''' django.db.utils.IntegrityError: null value in column "microbusines

Re: multiplying two fields

2021-01-29 Thread jose angel encinas ramos
gt; F('quantity')).output_field=FloatField('result'), >> >> contains a type for the field "cost_buy" (i.e. not "coust_by"). >> >> If that isn't it please give us the traceback. >> >> On Fri, Jan 29, 2021 at 8:50 PM jos

multiplying two fields

2021-01-29 Thread jose angel encinas ramos
Guys gd evening I need help,really i don't kwnow how to do a multiply two fields, have a model called Articles. class Articles(models.Model): #models article Nuevo = 'Nuevo' Semi_nuevo = 'Semi_nuevo' Usado = 'Usado' Otros = 'Otros' STATE_ACTUAL = ( (Nuevo, 'Nuevo'), (Semi_nuevo,'Semi_nuevo'), (

Re: How can I multiply 2 or more fields in django views or models

2021-01-04 Thread jose angel encinas ramos
; On Mon, 04 Jan 2021 at 23:01, jose angel encinas ramos < > encinasj.an...@gmail.com> wrote: > >> Hi everyone, i'm a new in django and python and i have a problem >> >> I had a inventory app and I want to multiply 2 fields, coust_buy and >> quantity, but wh

Re: Django for beginers

2020-01-08 Thread jose angel encinas ramos
this is the documentation, is very useful https://docs.djangoproject.com/en/3.0/ https://www.valentinog.com/blog/drf/ El mié., 8 ene. 2020 a las 18:08, KULDEEP SHARMA (< onshadeeprmaald1...@gmail.com>) escribió: > How and where can we find the Django doc. And how can we llink Python with > our

Re: good day guys

2019-12-04 Thread jose angel encinas ramos
Buenas tardes, ya creaste un super usuario en django?, creo que te hace falta correr python manage.py makemigrations despues python manage.py migrate intenta eso El mié., 4 dic. 2019 a las 17:10, Tosin Ayoola () escribió: > halo guys, i'm working on a school management system that has multi user

tengo un problema a la hora de hacer deploying django app to heroku

2019-11-13 Thread jose angel encinas ramos
mas que nada el poblema que tengo es técnico , el detalle es que cuando escribo en la terminal git push heroku master me lanza el siguiente error y no entiendo cual es el error. (webapps) ➜ BuscadorTims git:(master) ✗ git push heroku master Counting objects: 221, done. Delta compression using u

Re: django deployment in a virtual machine.

2015-02-25 Thread Fernando Ramos
If there's more than one person using it your site will only grow. The Django web server is meant for debugging, not production. Go the extra step and setup ngnix or another simple http server. You will thank yourself later. El martes, 24 de febrero de 2015, 14:49:16 (UTC-7), dk escribió: > > i

Re: Newbie question about django-cas

2014-02-19 Thread Tobias Ramos
try to set your login url to: http://127.0.0.1:8000/accounts/login while you testing. Tobias On 19 February 2014 15:04, wasingej wrote: > Hello. > > I am trying to put together a little test application which allows a user > to log in to a CAS server and then redirects them back to the site a

Re: Upload image

2009-09-19 Thread Ramos
k" 5- sudo python2.6 PIL-1.1.6/setup.py install 6- sudo invoke-rc.d apache2 restart Refund my thanks for their support. On Sat, 2009-09-19 at 17:14 -0700, Mike Ramirez wrote: > On Saturday 19 September 2009 16:49:49 Ramos wrote: > > imagingtk.c:20:16: error: tk.h: No suc

Re: Upload image

2009-09-19 Thread Ramos
Hi: Mike Ramirez Thanks for your response so quickly. I install what I recommended, but continued presenting the same problem. On Sat, 2009-09-19 at 17:14 -0700, Mike Ramirez wrote: > On Saturday 19 September 2009 16:49:49 Ramos wrote: > > imagingtk.c:20:16: error: tk.h: No suc

Re: Searching IntegerField

2009-06-30 Thread Marcelo Ramos
: >            return self.name > >     class Admin: >         list_display=('name','rollNo') >         search_field=['name','rollNo'] The keyword name is "search_fields" and you are using "search_field". -- Marcelo R

Re: How to deal with problem about ForeignKey

2009-04-28 Thread Marcelo Ramos
Field() > then there are some records of A/B, > how can i delete records of A and do not delete records of B which have > foreignkey on A Did you mean how to delete records of A for which there are no records in B pointing to them through the foreign key "a", right?

Re: Template within a Template

2009-04-27 Thread Marcelo Ramos
ngerous html tags. [1] http://docs.djangoproject.com/en/dev/ref/templates/builtins/#safe [2] http://docs.djangoproject.com/en/dev/ref/templates/builtins/#removetags Regards. -- Marcelo Ramos Django/Python developer --~--~-~--~~~---~--~~ You received this message because y

Re: Query subset

2008-10-31 Thread Marcelo Ramos
tabase hits, but yes in terms of the "size" of the retrieved data. If you are avoiding a lot of fields the difference in traffic size from the database can be big. Regards. -- Marcelo Ramos --~--~-~--~~~---~--~~ You received this message because you are

Re: fetching images from database

2008-10-31 Thread Marcelo Ramos
iles/#using-files-in-models for more info. Regards. -- Marcelo Ramos --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com

Re: Query subset

2008-10-31 Thread Marcelo Ramos
tricting the select sql query only to those fields). You can read the docs http://docs.djangoproject.com/en/dev/ref/models/querysets/#values-fields for further information. Regards. -- Marcelo Ramos --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Making sure published date is respected in views

2008-09-12 Thread Marcelo Ramos
e. I > would assume using ".filter(...something...)" is the way to go but > what would be the best filter to apply? Any other ways to achieve > this? Yes, a filter is a good option. For example: from datetime import datetime .objects.filter(pub_d

Re: Using unique on a field

2008-09-11 Thread Marcelo Ramos
) method." About a legacy db where you put a unique constraint manually it is recommended to put the option unique to the field so you get a nice error in the Django forms instead of an error screen. Regards. [1] http://docs.djangoproject.com/en/dev/ref/models/fields/#unique -- Marcelo Ramos

Re: Timeout for URLField?

2008-06-28 Thread Marcelo Ramos
gt; No. Django's builtin validators has two results: validated or not. If you put a timeout then you are not validating, you are "trying" to validate which is a completely different thing :-) Why are you putting a validator if you allow it to be overriden. Just use a Ch

Re: create_object error

2007-04-05 Thread Marcelo Ramos
2007/4/5, Michael Radziej <[EMAIL PROTECTED]>: > > On Thu, Apr 05, Marcelo Ramos wrote: > > > es_AR: > > > > #: views/generic/create_update.py:43 > > #, python-format > > msgid "The %(verbose_name)s was created successfu

Re: create_object error

2007-04-05 Thread Marcelo Ramos
ó con éxito %(verbose_name)." When I changed LANGUAGE_CODE to es instead of es_AR it worked fine but es_AR will probably fail if i use create_update.update_object() because the translation for a successfull update has accented characters. Are the accented chars the problem? Maybe it is related

Re: create_object error

2007-04-04 Thread Marcelo Ramos
2007/4/4, Malcolm Tredinnick <[EMAIL PROTECTED]>: > > Hi Marcelo, > > On Wed, 2007-04-04 at 17:46 -0300, Marcelo Ramos wrote: > > After submitting a form using a generic view I get this error: > > > > Request Method: POST > > [...] > > Exce

create_object error

2007-04-04 Thread Marcelo Ramos
e correct value then i'm a bit lost here. I'm working with a svn copy of revision 4926 (today). Thanks in advance. -- Marcelo Ramos Fedora Core 6 | 2.6.19 Socio UYLUG Nro 125 --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: using Order-by with dynamic attribute

2007-03-28 Thread Marcelo Ramos
is no record in the DB I'm guessing that order_by will not work. Can > anybody advise on a way. You can make a custom sort_ by_total() function, create a list from the queryset result and sort the list with sort() and sort_by_total. I remember doing that some time ago and it worked but if the q

Re: tuples into a select list

2007-03-23 Thread Marcelo Ramos
c in categories %} > {{ c[1] }} > {% endfor %} Try: {{c|slice:"1:2"|first}} Regards. -- Marcelo Ramos Fedora Core 6 | 2.6.19 Socio UYLUG Nro 125 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups