Django Forms Date Format

2008-12-15 Thread Aldo
I am using django forms. I have created a model/form with 2 fields, name and date. Prior to saving the form i check if the form is_valid? if form.is_valid(): form.save() My problem is it wants the date in the format - MM/DD/ Otherwise it will not see the form as valid - and not save. H

Re: Django Forms Date Format

2008-12-15 Thread Aldo
Let me add, that my model contains this mydate = models.DateTimeField().input_formats = ('%Y.%m.%d %H:%M:%S',) But when i use the input_formats arg it allows my field to accept any numeric data eg: 2342342/42354235 is now accepted. On Dec 15, 2:57 pm, Aldo wrote: > I am using dj

Re: Django Forms Date Format

2008-12-15 Thread Aldo
Yes I have tried that but still nothing - thats what lead me to looking at this! On Dec 15, 3:28 pm, Lars Stavholm wrote: > Aldo wrote: > > I am using django forms. I have created a model/form with 2 fields, > > name and date. > > > Prior to saving the form i ch

Re: Django Forms Date Format

2008-12-15 Thread Aldo
Still no good lars. Thanks though. On Dec 15, 3:44 pm, Lars Stavholm wrote: > Aldo wrote: > > Yes I have tried that but still nothing - thats what lead me to > > looking at this! > > Try with "USE_I18N = False" in settings.py. > Some sort of known issu

Re: Django Forms Date Format

2008-12-16 Thread Aldo
the right direction. On Dec 15, 6:24 pm, "Karen Tracey" wrote: > On Mon, Dec 15, 2008 at 10:55 AM, Aldo wrote: > > > Still no good lars. Thanks though. > > http://docs.djangoproject.com/en/dev/ref/forms/fields/#datefield > > documents how to override the default v

Re: Django + mail server

2008-12-16 Thread Aldo
Have a look at this also! http://docs.djangoproject.com/en/dev/topics/email/ On Dec 15, 8:48 pm, Oliver Beattie wrote: > http://docs.djangoproject.com/en/dev/ref/settings/#email-host > > On Dec 15, 7:25 pm, prem1er wrote: > > > Didn't know about this. Where do I set the EMAIL_HOST parameter? >

Django date filter

2008-12-22 Thread Aldo
Hi folks, Simple enough problem but cant find the functionality - if it exists. this_week = datetime.date.today() - timedelta(7) Cars.objects.filter(created_date>this_week) I basically want to find all cars that were created in the last 7 days. I have seen there are things for the month and yea

Django Get/POST problem

2009-02-03 Thread Aldo
Hi folks, MY URL is x.y.z/list It shows a list of objects. They have link buttons to delete/update for each object. When I click delete for an object I go to a URL via POST with the object id in the url This brings me to a "Are you sure you want to delete this object page". MY URL is x.y.z/list/

Re: Django Get/POST problem

2009-02-05 Thread Aldo
t element. > I would use django.http.HttpResponseRedirect() to the list view, after > successful > deletion. > > Aldo schrieb: > > > > > Hi folks, > > > MY URL is x.y.z/list > > It shows a list of objects. They have link buttons to delete/update > > f

Simple Pagination Problem

2009-07-29 Thread Aldo
I want to display to my html page Displaying results 1- 10 of 55322 found. Is there something straight forward in the pagination to do this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

self unique symmetrical relation

2009-05-07 Thread Aldo
one other person (unique). If Alice is married to Bob, then Bob is automatically married to Alice (symmetrical). How would you model this relation ? Thanks. Regards, Aldo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Getting distinct objects (well attributes)

2009-05-20 Thread Aldo
Hi folks, The problem Im having is that I have a large number of objects. Objects are people (name, address, phone etc) I want to retrieve all the objects where name startswith "Mary" X = objects.filter(name__startswith="Mary").distinct() But, If there are 3 objects called "Mary Smith" I do not

Re: Getting distinct objects (well attributes)

2009-05-20 Thread Aldo
Ill help myself and anyone else who stumbles across this - The answer is: Place.objects.values_list('county', flat=true).distinct() On May 20, 2:52 pm, Aldo wrote: > Hi folks, > > The problem Im having is that I have a large number of objects. > Objects are people (na

quote_plus

2009-05-25 Thread Aldo
I want to use quote_plus in my django templates to display a url. Can anyone tell me how I call it in my template? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Django with ajax

2009-06-02 Thread Aldo
Hey, I have some ajax running on my pages. I want to have it pass back some objects. However, I am unsure if I can pass a list of objects back. So far I have only ever passed back raw xml or text. Can objects be passed and then iterated via the html template? Thanks --~--~-~--~~

Re: Django with ajax

2009-06-02 Thread Aldo
ly developing Dajax > (http://code.google.com/p/dajaxproject/) it will help you using ajax in > django. For example, for sending serialized objects to the browser and use > it as you want in JS. > > Thanks > > 2009/6/2 Aldo > > > > > Hey, > > > I have s

Reporting with Django

2008-02-14 Thread Aldo
Interested in generating some simple reports with Django. I have a number of text and dateFields and need some sample DB reports. I could do it myself by designing a page to give me counts - but would prefer if there was a sweeter way to do it in django. --~--~-~--~~~-

Django.cgi on Linux Hosting

2008-04-11 Thread Aldo
Hi folks I have a linux hosting account with digiweb. I want to run my django app on it - but am running into problems. http://care.register365.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=110&nav=0,21 http://seamusc.com/blog/2007/jun/11/how-get-django-working-digiwebie-using-djangoc

Re: Django.cgi on Linux Hosting

2008-04-11 Thread Aldo
rs.wsgi.WSGIHandler()) I am not sure anyone will be able to help - but my alternative is to give up - ive been working on this for hours. On Apr 11, 1:23 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, Apr 11, 2008 at 6:48 AM, Aldo <[EMAIL PROTECTED]> wrote: > &

Re: Django.cgi on Linux Hosting

2008-04-14 Thread Aldo
Yes, so thats fair enough - it just means that maybe MAYBE the dj script is being called - but when i access it via www.gfdfdf.com/admin/ it gives me a 404 On Apr 11, 4:28 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, Apr 11, 2008 at 9:28 AM, Aldo <[EMAIL PROTECT

Re: Django.cgi on Linux Hosting

2008-04-15 Thread Aldo
. Initially i got in touch with my hosting provider to confirm the rewrite rules were working - which they confirmed. Ive just sent an email again. On Apr 14, 3:21 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Mon, Apr 14, 2008 at 3:41 AM, Aldo <[EMAIL PROTECTED]> wrot

OneToOneField('self') problem

2008-07-03 Thread Aldo
matically married_to Paul. I am using today 0.97 trunk SVN version. Can anybody help me with this model or propose another one ? Thanks ! Ciao. Aldo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django user

one to one symmetric relationship

2008-07-08 Thread Aldo
is symmetric but not really unique in an object point of view. It is unique in a DB point of view. We can add (A,B) and (C,A) tuples in the m2m table, which creates multiple relationships A-B and A-C. Is it possible with existing fields ? Regards, Aldo

Re: error : Django with Apache and mod_python

2010-06-06 Thread Aldo Nievas
looks like ? Regards Aldo Nievas | SATIO Software Solutions aldo.nie...@satio.com.ar www.satio.com.ar MSN: aldo.nie...@gmail.com SKYPE: aldo.nievas On Sat, Jun 5, 2010 at 12:49 PM, Jagdeep Singh Malhi < singh.malh...@gmail.com> wrote: > > MOD_PYTHON ERROR > > ProcessId: 3219

problems accessing to media.djangoproject.com - perhaps from argentina ?

2010-07-04 Thread Aldo Nievas
/Django-1.2.1.tar.gz error: Download error for http://media.djangoproject.com/releases/1.2/Django-1.2.1.tar.gz: [Errno 60] Operation timed out (site.com)macbookpro~/.virtualenvs/site.com/bin# I'm also having problems accessing to www.djangoproject.com ISP: telecentro Regards. Aldo --

CSS retrieval

2008-06-19 Thread Aldo Bergamini
getting (or failing to get) a CSS file. Neither on the localhost setup or on the Apache server do I ever see a request for a CSS file (whatever browser I am using to do my little tests). Thanks for any pointer to an explanation/solution. Best regards, Aldo --~--~-~--~~---

Good practise on Form logic

2015-07-18 Thread Aldo Suarez
Say for example you have a Form with its validator methods. Then, in the view you normally do: in forms.py, if form.is_valid(): > # do some logic / add to database > # redirect Now: Is it good practise to do that "post-logic" inside Form methods or should I do it on the view? i.e. in views.

Re: Sale on Packt publishing

2019-01-08 Thread Okware Aldo
Django 2 by example - Antonio Mele and Django design patterns. On Tue, 8 Jan 2019, 16:58 Lehner Viktor, wrote: > Which Django book do you recomend to by from PACKT ? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from t

Re: Job Request

2019-01-25 Thread Okware Aldo
I am looking for projects I can contribute on. so if you have a project I can contribute on. I am happy to help 2 hours of code in a week for free. On Fri, Jan 25, 2019 at 3:51 PM Nitin Kalmaste wrote: > Where can I find Live Projects to work on So that I can Improve My python > Skills > > On Th

Re: drf - change Foreign key to another field in a serializer using modelviewset

2019-02-07 Thread Okware Aldo
Hi, I think you should consider creating a custom serializer, where you can modify that field, though I would advise you create another or modify yo return the json object of the organiser. https://www.django-rest-framework.org/api-guide/fields/#serializermethodfield On Thu, Feb 7, 2019 at 10:23

Re: Database setup

2019-04-19 Thread Okware Aldo
Hey, If you have xampp installed, just create a database using phpmyadmin, attach a user to that database. then ensure you have a driver package installed and setup for django. eg. pymsql has worked well for. then make the necessary changes in django settings file. On Fri, Apr 19, 2019 at 9:21 PM

Re: Database setup

2019-04-19 Thread Okware Aldo
ou for your valuable time. > > On Sat, 20 Apr 2019, 10:48 Okware Aldo, wrote: > >> Hey, If you have xampp installed, just create a database using >> phpmyadmin, attach a user to that database. >> then ensure you have a driver package installed and setup for django.

Re: Django makemigration polls error

2018-07-25 Thread Okware Aldo
Did you include Polls app in INCLUDE_APPS section in settings. On Wed, 25 Jul 2018, 06:34 Ashish Kumar, wrote: > I am trying to follow the latest Django tutorial at the documentation and > I faced the following error when I enter python manage.py makemigrations > polls > Traceback (most recent c

Re: Django makemigration polls error

2018-07-25 Thread Okware Aldo
I think he should share screenshot of his setting.py file, but from what I can see -- if he is running django 1.10 and above apps should be 'polls' not *'polls.apps.PollsConfig'* On Wed, Jul 25, 2018 at 2:23 PM theAloneOne wrote: > You may have missed a comma after *'polls.apps.PollsConfig'* in

Re: Django database problem

2018-08-17 Thread Okware Aldo
Mikko, Check out this link below, it will help you understand how to connect you Django project to any DB manager. https://docs.djangoproject.com/en/2.1/intro/tutorial02/ On Fri, Aug 17, 2018 at 6:55 PM Mikko Meronen wrote: > Hi, > > I'm quite new with django and python and I wish someone coul

Re: Error: C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2

2018-09-02 Thread Okware Aldo
Use pymysql package instead. On Sun, 2 Sep 2018, 17:04 Kasper Laudrup, wrote: > Hi Rupam, > > On 02/09/2018 15.15, Rupam Hazra wrote: > > Hi, > > > > I am stuck with this issue when i am installing mysqlclient this issue > > > > Installing mysqlclient from source on Windows is definitely not rel

Re: No module named "newsimage" app

2018-09-25 Thread Okware Aldo
Hi Mellisa, are you using the module/app 'newsimage' in some part of your application? first make changes to install apps section as Vinod Kumar suggested, then make sure whenever you make reference to the app its imported. On Tue, Sep 25, 2018 at 2:19 PM 'Vinod Kumar' via Django users < django

Re: Django UpdateView and Createview

2018-12-09 Thread Okware Aldo
Ryan's suggestion should give you a starting point. On Sun, Dec 9, 2018 at 3:43 PM Deepak Kumar wrote: > On Sunday, December 9, 2018 at 6:21:55 AM UTC+5:30, Ryan Nowakowski wrote: > > Take a look at > https://docs.djangoproject.com/en/2.1/topics/class-based-views/generic-editing/ > > > > > > On

Re: New to Django

2018-12-16 Thread Okware Aldo
I can remotely help, provide access me with remote access or push code github On Sat, 15 Dec 2018, 20:54 Hello - I'm trying to get Django up and running and I'm having some likely > trivial trouble. I'm following the "Writing your first Django app" > tutorial, but I'm getting stuck trying to crea

Re: STATIC FILES not working for admin site, projects and apps on DJANGO

2018-12-30 Thread Okware Aldo
I can have a look if you give me access to the code, we could do teamviewer, or repo. Let me know. On Sun, 30 Dec 2018, 22:40 abel otugeme, wrote: > I have done all that i used the docs first and it did not work. Then i > tired this video https://www.youtube.com/watch?v=YH-ipgxlJzs > > On Sun,

Re: Process Data during server initialization

2020-10-22 Thread Okware Aldo
Hi Lois, To expand on what Scott is saying. - model DB tables to store the data you need to render the graphs - build a service to preprocess the data - this service can run periodically depending on how up to date you need the graphs to be (a microservice) - build a single endpoint to simple fetc

Re: set school year and change boolean to False when school year is not active

2019-10-17 Thread Okware Aldo
hello, You could use signals pre_save https://docs.djangoproject.com/en/2.2/topics/signals/ On Fri, Oct 18, 2019 at 4:49 AM Rain wrote: > Hello!. thanks for your help.. > what i want to achieve is ti check if end year is already meet. > then if school year already ended. The field would be inac

Good afternoon, I need help to generate a PDF of my models in DJANGO

2018-05-29 Thread ALDO JAVIER VIGUERAS
Hallo, I want to do a view to retur me a PDF with my models tah I have in models.py , I habe python 3 Django 2.11 and the models are in POSTGRESQL . The next is my code that a I have, but gived TypeError: pruebapdf() missing 1 required positional argument: 'DesdeJango' 'DesdeJango'= is model nam

Re: Good afternoon, I need help to generate a PDF of my models in DJANGO

2018-05-29 Thread ALDO JAVIER VIGUERAS
Thanks for help me give me idea where is problem i'm will try it different from but when i finished will put it -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to