Re: Django TCP Socket Communication

2016-06-17 Thread Sergiy Khohlov
Simple script receives data from GPS tracker and stores data into database. Django has geodjango application for plotting point at the map. 17 черв. 2016 08:16 "Anil reddy reddy M" пише: > How i can store gps output in django model, how django will communicate > with micro controllar > > > On Th

Shouldn't formset show number of forms according to number o dicts in initial?

2016-06-17 Thread Rafał Szymański
I'd like to ask for a little help. I'd like to show few forms with on page using formset_factory. Number of forms should be dependent on number of dictionaries set in inital parameter. But the result is that one form is showed with three options avaliable to choose according to dicts from nitia

Re: Create admin/superuser for each tenant/schema, while using Django-Tenant-Schema

2016-06-17 Thread monoBOT
You can use one of the utils in that library from tenant_schemas.utils import schema_context from django.contrib.auth.models import User with schema_context('yourschemaname'): ... Or you can manually run the management command form the shell python manage.py createsuperuser 2016-06-16 7

Re: Recommended courses/materials for Python/Django course...

2016-06-17 Thread Fred Stluka
Ludovic, Thanks for the tip!  I'll check them out. --Fred Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: Wit

Re: Recommended courses/materials for Python/Django course...

2016-06-17 Thread 06userit
My 2 cents : I have started learning Python and Django from scratch 15 months ago. I have bought 3 books which were VERY useful : 1) Two scoops of Django (Django 1.8) Daniel & Audrey Roy GreenFeld : very good introduction to the Django world 2) Django by Example (Antonio Melé) : excellent implem

Django Filter

2016-06-17 Thread 'David Turner' via Django users
I am using django-filter I have create the the filter as follows: filters.py import django_filters from .models import Job class JobFilter(django_filters.FilterSet): class Meta: model = Job fields = ['practice_type'] And I have created the following view: from .models import

Re: Django Filter

2016-06-17 Thread 'David Turner' via Django users
The issue is that one of the fields use choices. If I remove this everything is fine! On 17 June 2016 at 16:58, 'David Turner' via Django users < django-users@googlegroups.com> wrote: > I am using django-filter > > I have create the the filter as follows: > filters.py > import django_filters > fr

Is using multi-table inheritance still a bad choice?

2016-06-17 Thread Aamu Padi
Hi, I want to create feeds activity using the models that I have. class Tender(models.Model): title = models.CharField(max_length=256) description = models.TextField() department = models.CharField(max_length=50) tags = models.ManyToManyField(Tag) pub_date = models.DateTimeFiel

We are looking for Django specialist to work highly scalable adaptive learning platform.

2016-06-17 Thread prabhatiitbhu
*We are looking for Django specialist to work highly scalable adaptive learning platform.* About Company Learnix Edutech is a fast emerging education and technology enterprise founded by IIT graduates. We provide comprehensive learning solutions to make education future ready. Our aim is to

Python NoReverseMatch when Viewing the Page

2016-06-17 Thread 'antanas skiudulas' via Django users
I'm a newbie trying to make a wiki page with Django, however, I keep running into this very annoying problem: NoReverseMatch at /wiki/page/Start/ Reverse for '' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: [] Sites urls.py urlpatterns = [ url(r'^admin

kwargs not available in ListView

2016-06-17 Thread Subramanyam
If we subclass ListView and try to override the get_content_data in 1.8.11 kwargs are not showing up, is this a bug ?? I have seen a bug already but I am not sure whether https://code.djangoproject.com/ticket/17242 is to be revisited Bala -- You received this message because you are subscrib

Re: Stripe Not Returning Token (test mode)

2016-06-17 Thread Kristofer Pettijohn
This is how I did it. This is using Stripe Checkout. forms.py ... (you can omit the address pieces if you don't need them) class StripeForm(forms.Form): stripeToken = forms.CharField(max_length=80) stripeBillingName = forms.CharField(max_length=80, required=False) stripeBillingAddressLine1 =

Display old instances as read only in admin inlines

2016-06-17 Thread Olivier Dalang
Dear List, I'm a bit stuck on a problem. I googled a lot, but didn't find an answer. I have a "Loan" model and a "Payment" model. In the admin, I display the payments for each loan in inlines. I want payements that are more than 3 days old to be displayed as readonly, as they are considered to be

UNION ALL in Django Orm?

2016-06-17 Thread cderwin
I have two different queries on the same model that are in essence like this: queryset_1 = models.Plan.object.filter(name__startswith='a').annotate(group= Value('Group A', output_field=CharField())) queryset_2 = models.Plan.object.filter(name__startswith='b').annotate(group=Value('Group B', ou

Authenticate problem

2016-06-17 Thread Briel
Hi I'm trying to use authenticate like the documentation shown at djangoproject, and when I try this authenticate returns None, although the user is registered, and the password is right: from django.contrib.auth import authenticate

Re: UNION ALL in Django Orm?

2016-06-17 Thread Ezequiel Bertti
Take a look on this project https://github.com/Suor/django-union/ On Fri, Jun 17, 2016 at 7:16 PM, wrote: > I have two different queries on the same model that are in essence like > this: > > queryset_1 = models.Plan.object.filter(name__startswith='a').annotate( > group=Value('Group A', output_

Re: Authenticate problem

2016-06-17 Thread Vijay Khemlani
usu.password shouldn't be "secret" (as in plain text "secret") it should be hashed. Try doing usu.set_password('secret') usu.save() # Not sure if it is necessary or set_password saves by itself then user = authenticate(username='john', password='secret') On Sat, Jun 18, 2016 at 6:33 AM, Briel

Re: Stripe Not Returning Token (test mode)

2016-06-17 Thread Chris Kavanagh
Thanks Kristofer, let me try that and see what happens. . . On Fri, Jun 17, 2016 at 4:49 PM, Kristofer Pettijohn < kristo...@cybernetik.net> wrote: > This is how I did it. This is using Stripe Checkout. > > forms.py ... (you can omit the address pieces if you don't need them) > > class Strip

Re: Stripe Not Returning Token (test mode)

2016-06-17 Thread Chris Kavanagh
Kristofen, could I see the template? The javascript/jQuery you're using in the template specifically? I think that's where the problem is. I copied it directly from https://stripe.com/docs/custom-form, but it doesn't appear to be running the jQuery. I get an error, js jquery referenceerror $ is n

Re: Stripe Not Returning Token (test mode)

2016-06-17 Thread Chris Kavanagh
Oh, never mind, you're using stripe checkout. My bad. Let me try it your way. On Fri, Jun 17, 2016 at 9:33 PM, Chris Kavanagh wrote: > Kristofen, could I see the template? The javascript/jQuery you're using in > the template specifically? > > I think that's where the problem is. > I copied it d

Re: Stripe Not Returning Token (test mode)

2016-06-17 Thread Chris Kavanagh
One last question, if you don't mind. Did you have to use a {% csrf_token %} on your form? I read somewhere on stackoverflow that Stripe Checkout wouldn't accept the csrf token? Thanks again, Kristofen. On Fri, Jun 17, 2016 at 4:49 PM, Kristofer Pettijohn < kristo...@cybernetik.net> wrote: > This