Re: EmailField: unable to make it mandatory?

2016-01-03 Thread James Schneider
On Jan 3, 2016 9:02 PM, "gerard" wrote: > > Hello all and happy new year, > > with Django 1.7, i have this model: > class Subscription(models.Model): > email = models.EmailField(max_length=75) > created_by = models.ForeignKey(User) > > sub = Subscription.objects.create(created_by=self.user

Re: Running Python3 code and placing results in a view

2016-01-03 Thread Daniel Roseman
On Sunday, 3 January 2016 23:37:50 UTC, Andrew Stringfield wrote: > > Hello all, > > I am interested in running the code of: > #!/usr/bin/python3 > from wifi import Cell, Scheme > ssid = [cell.ssid for cell in Cell.all('wlan0')] > print(ssids) > > > with a view in Django and the results displa

Re: Guidelines For A Newbie

2016-01-03 Thread Avraham Serour
1 - learn django if you already know python start with the django tutorial https://docs.djangoproject.com/en/1.9/intro/tutorial01/ if you don't know python so well I recommend http://www.learnpython.org/ after that if you still don't know the path to take feel free to ask again on how to continue

Re: hello. get_queryset question

2016-01-03 Thread James Schneider
On Sun, Jan 3, 2016 at 6:28 PM, Vijay Khemlani wrote: > Try with > > self.request.GET['name'] > Yes, this is is what you want. Normally, though, I've seen it written as self.request.GET.get('name'). This calls the .get() dict method on the GET attribute of the request, which will return None in

EmailField: unable to make it mandatory?

2016-01-03 Thread gerard
Hello all and happy new year, with Django 1.7, i have this model: class Subscription(models.Model): email = models.EmailField(max_length=75) created_by = models.ForeignKey(User) sub = Subscription.objects.create(created_by=self.user) this does not product an error due to email missing.

Re: hello. get_queryset question

2016-01-03 Thread Jai Goyal
Hello All, Greetings of New Year !! I wanted to ask that i have just started web development and i wanted to learn django in deep by making a full dynamic website. What Should Be the path which i should follow i.e. what are the prerequisites which i have to fulfill to become a full stack Django

Guidelines For A Newbie

2016-01-03 Thread Jai Goyal
Hello All, Greetings of New Year !! I wanted to ask that i have just started web development and i wanted to learn django in deep by making a full dynamic website. What Should Be the path which i should follow i.e. what are the prerequisites which i have to fulfill to become a full stack Django

Re: hello. get_queryset question

2016-01-03 Thread Vijay Khemlani
Try with self.request.GET['name'] On Sun, Jan 3, 2016 at 11:22 PM, Víctor Suárez wrote: > Hello all, > as it's my first post, if any django developer around, nice work! I > appreciate the package, I've been able to pull a small project I had in > mind for long, very easily with this. > > I am n

hello. get_queryset question

2016-01-03 Thread Víctor Suárez
Hello all, as it's my first post, if any django developer around, nice work! I appreciate the package, I've been able to pull a small project I had in mind for long, very easily with this. I am needing help with one part of the Views. I'm using a generic.ListView, nothing fancy, but then, as the

Running Python3 code and placing results in a view

2016-01-03 Thread Andrew Stringfield
Hello all, I am interested in running the code of: #!/usr/bin/python3 from wifi import Cell, Scheme ssid = [cell.ssid for cell in Cell.all('wlan0')] print(ssids) with a view in Django and the results displayed in a drop down list. Here is the information about the WIfi module that I am us

Re: ModelForm.is_valid() doesn't work the first time but does the second

2016-01-03 Thread Michael Molloy
Thank you for your help. --M On Sunday, January 3, 2016 at 7:53:02 AM UTC-6, Vijay Khemlani wrote: > > Well, it's not supposed to be bound if you don't pass any data to it > > the "instance" in the ModelForm (if i remember correctly) just sets the > initial values for the fields when you render

Re: ModelForm.is_valid() doesn't work the first time but does the second

2016-01-03 Thread Michael Molloy
That makes sense. Thank you. --M On Sunday, January 3, 2016 at 8:05:21 AM UTC-6, knbk wrote: > > >>> uf = UsersForm(u) > > Here you are passing the user instance as if it were the POST data. The > form expects a dictionary or None as the first argument. `form.is_bound` > simply checks `data is

Re: Is it a bad idea to start a project using Django 1.7 at this moment?

2016-01-03 Thread Gary Roach
Do I detect someone using Tango With Rango as a tutorial. I agree that, for me, it made more sense than the other tutorials. I tried most of them. To bad that he hasn't updated to 1.8 and python 3 . I solved the problem by setting up a virtual environment using python 2.7 and django 1.7.11 for

Re: Is it a bad idea to start a project using Django 1.7 at this moment?

2016-01-03 Thread Derek
"Explaining everything" is too much of a generalisation to be a useful criticism. Django has been built incrementally, with a high degree of backwards-compatibility, so many older tutorials will still be valid. The docs are *always* up-to-date and highlight clearly where new features have bee

Re: ModelForm.is_valid() doesn't work the first time but does the second

2016-01-03 Thread knbk
>>> uf = UsersForm(u) Here you are passing the user instance as if it were the POST data. The form expects a dictionary or None as the first argument. `form.is_bound` simply checks `data is not None`, which is True in this case. If you want a bound form, you should pass a dictionary with the

Re: ModelForm.is_valid() doesn't work the first time but does the second

2016-01-03 Thread Vijay Khemlani
Well, it's not supposed to be bound if you don't pass any data to it the "instance" in the ModelForm (if i remember correctly) just sets the initial values for the fields when you render the form in HTML and modifies that instance when you call "save" on the ModelForm. On Sun, Jan 3, 2016 at 1:29

Re: Django + Ckeditor

2016-01-03 Thread whycrying
Hi, David, You can close the auto-escaping behavior like this :: {% autoescape off %} {{ content }} {% endautoescape %} ref: https://docs.djangoproject.com/en/1.8/ref/templates/builtins/#autoescape On Sun, Jan 3, 2016 at 5:12 AM, David Pineda wrote: > Hello folks! Happy new yea