Re: Django first example needs minor but significant improvement?

2016-11-06 Thread Vijay Khemlani
All the paths in that documentation are relative to the path of the project: polls/views.py polls/urls.py etc and at the beginning of the page it even shows the file tree mysite/ manage.py mysite/ __init__.py settings.py urls.py wsgi.py Also there are

Re: How to create a django model for a resume/CV app

2016-11-06 Thread ludovic coues
If you are using the default django admin, you can use inline model admins [1]. The django's tutorial covert this point with polls' questions having many possible choice in part 7 [2] [1] https://docs.djangoproject.com/en/1.10/ref/contrib/admin/#inlinemodeladmin-objects [2]

Re: Negative User ID's

2016-11-06 Thread Javier Guerra Giraldez
On 4 November 2016 at 18:28, wrote: > > Unfortunately, the apps are currently in different DB's. > > On Friday, November 4, 2016 at 10:26:34 AM UTC-7, Javier Guerra wrote: >> >> that's what foreign keys are for even so, a foreign key field is the answer. i see three

Re: Need help to catch "cart_id" based on session.

2016-11-06 Thread ludovic coues
I would try request.session.get('cart_id', None) instead of request.session['card_id']. Both act the same if the key exist in the dict. When the key is missing, the first return the second value (None in this case) while the second raise a Key Error exception. 2016-11-05 13:10 GMT+01:00 Shazia

Django first example needs minor but significant improvement?

2016-11-06 Thread Kilgore Sixsixone
I've just started learning Django from the Polls example which did not work for me after 30 minutes of really - and I mean *really* - checking that I had done exactly what I was told to do. I eventually found (i) I was not the first

How to create a django model for a resume/CV app

2016-11-06 Thread ronronald97 via Django users
Hi, I am rather new to django and not sure how to set up the relationship for all the fields of a resume app. Let's say each user can have 1 or more resume. In each Resume, there is a introduction/about, 1 or more education entries and 1 or more previous job entries. Is this correct? class

Re: How to delete a certain model instance in django after a given date

2016-11-06 Thread YOGITHA A N
menudeleted = MessMenu.objects.filter( day__lt = timezone.now()) for m in menudeleted: m.delete() menu = MessMenu.objects.all() use basic comparison filter to filter the dates On Sunday, November 6, 2016 at 12:01:20

Re: Django FORM for India Postal Address

2016-11-06 Thread Andreas Kuhne
Hi, There is a plugin called django-smart-selects, that enables you to get information from the server based on information in a select field. You could try that? The form_valid() method and clean methods where you can VALIDATE such information is only called when posting the form (as you have

Django FORM for India Postal Address

2016-11-06 Thread Priyabrata Das
I have a Django ModelForm as below. Primary objective is to select area pincode based on selected "state". I don't seem to find a way how can I filter Pincode based on a dynamic queryset on the chosen state. form_valid() method in CreateView is not invoked until the entire form is submitted.