Re: Add model item with AJAX pop up

2016-02-08 Thread pa xapy
hi easiest way is to write separate view which will handle ajax requests (get and post) and render html (as a json field) and success status as response. on frontend you will handle this response to show modal with form and submit it until model will successfully saved once it happens, you can re

Re: How to show python data on html

2016-02-08 Thread Omar Abou Mrad
On Sun, Feb 7, 2016 at 11:15 AM, 123asror wrote: > So currently i have a python console application that reads from an api > and print some data i want. I followed the django course and they use > models/database in it. The data that they show comes from that. So i was > wondering how to add a ht

Re: Implement page view count without using database for Hit

2016-02-08 Thread James Schneider
On Feb 7, 2016 7:03 PM, "sonu kumar" wrote: > > Hi all, > We have develop a site where we need to maintain page view count like SO, Quora,YouTube etc. Current approach is based on number of retrieval using view this leads to problem to user that they are seeing that when a page is reloaded then c

Re: Django formtools wizard produces blank page (No error returned)

2016-02-08 Thread James Schneider
On Feb 7, 2016 11:46 AM, "Martín Torre Castro" < martin.torre.cas...@gmail.com> wrote: > > James or anyone, the wizard doesn't load the main template for the wizard, just the first step template form. Can you guess why? > The templates you included in your OP didn't have {% extends %} or {% block

Re: Polymorphic class and geomodels?

2016-02-08 Thread Sergiy Khohlov
Class Based Views has ability to include function in view from template. Short example: I have finished small (GTS) project related to GPS system. Each car has a array of points (car positions) and route (named as LineString in GeoDjango). part of models.py class Points(models.Model):

Re: Provide me Links to learn django framework on Linux

2016-02-08 Thread Ajay Sharma
Many Thanks To Rafael and Christian . :) :) I am studying the resources now. On Wednesday, February 3, 2016 at 7:46:30 PM UTC+5:30, Ajay Sharma wrote: > > Hi everyone on the Group. > > I want resources and web links, where i can learn Django Framework On > Linux platform as I > > am using

Re: Implement page view count without using database for Hit

2016-02-08 Thread sonu kumar
Thanks James, We have consider database and updated sites using django-visits. Building such a full proof system will take longer time. Regars, Sonu On Monday, February 8, 2016 at 2:29:46 PM UTC+5:30, James Schneider wrote: > > > On Feb 7, 2016 7:03 PM, "sonu kumar" > > wrote: > > > > Hi all, >

After upgrading from 1.8.8 to 1.9.2 migration applies succesfully but ends with an error

2016-02-08 Thread Richard la Croix
I just upgraded from 1.8.8 to 1.9.2 and using Python version 3.4.3. The included Django migrations (admin.0002_logentry_remove_auto_add and auth.0007_alter_validators_add_error_messages) applied succesfully. The following migration of a model update failed with error: TypeError: can't multipl

Re: After upgrading from 1.8.8 to 1.9.2 migration applies succesfully but ends with an error

2016-02-08 Thread Tim Graham
Last time I checked, mysql.connector hasn't issued a release that's compatible with Django 1.9. On Monday, February 8, 2016 at 7:37:36 AM UTC-5, Richard la Croix wrote: > > I just upgraded from 1.8.8 to 1.9.2 and using Python version 3.4.3. > > The included Django migrations (admin.0002_logentry_

Re: Django formtools wizard produces blank page (No error returned)

2016-02-08 Thread Martín Torre Castro
If I understand well, you mean that my form templates have to extend the main wizard template. Is that correct? In previous versions this was achieved by writing template_name = 'main_wizard_template.html' into the subclass of WizardView. Am I wrong? So, with {% extends 'registration/test_wizard.

Re: django social auth

2016-02-08 Thread Christian Ledermann
django social auth is deprecated use https://github.com/omab/python-social-auth On 6 February 2016 at 17:43, ahmed waqas Nasir wrote: > i am new in django i am trying to add thirdparty verification using social > auth > > after configuration when i run migrations i got following error > > InD

Announcing Django-Zappa - Serverless Django on AWS Lambda + API Gateway

2016-02-08 Thread Rich Jones
Hey guys! I'm pleased to announce the release of Django-Zappa - a way to run serverless Django on AWS Lambda + API Gateway. Now, with a single command, you can deploy your Django apps in an infinitely scalable, zero-configuration and incredibly cheap way! Read the announcement post here: http

AttributeError When Overwritting AUTH_USER_MODEL in Test Cases

2016-02-08 Thread Aubrey Stark-Toller
Hello, When I override the AUTH_USER_MODEL setting to "auth.User", when AUTH_USER_MODEL in settings is not set to "auth.User", in either a TestCase or individual test, and then try to access the objects attribute on the user model, I get an AttributeError. The exact error I get is: AttributeEr

Re: How to show python data on html

2016-02-08 Thread Derek
Depending on what your console app does or needs to do, you can also look at Flask as a way of serving up HTML pages to your browser; see http://flask.pocoo.org/docs/0.10/quickstart/ - you then do not have to use a database with models if those are not needed. Django is great but not always a

Right place to decrypt/decode data from DB before passing it to UI without affect data in DB itself.

2016-02-08 Thread learn django
Hi, I store some data like email text, headers and from email address in encoded format in the database. I want to have a page where I can display all this information in readonly format. What is the ideal place & way to decode this information and pass it to django UI. I was thinking of rea

Running automated expiration date events

2016-02-08 Thread Rod Delaporte
I have a field of a model that changes states but I need to automatically modify that value after an expiration datetime has come. Is there a way to do this? Here is an example: class Post(models.Model): created_at = models.DateTimeField(auto_now_add=True) languages = ( ('1', 'activ

Re: Add model item with AJAX pop up

2016-02-08 Thread guettli
There many auto-complete fields. Adding an item in a popup is needed very often. The django-admin does it, too. For me it is strange that there is no reusable widget for this. Am Montag, 8. Februar 2016 09:17:48 UTC+1 schrieb pa xapy: > > hi > easiest way is to write separate view which will han

Re: Running automated expiration date events

2016-02-08 Thread Luis Zárate
Maybe with celery and Django celery you can do what you want. There is a functionality called crontab that is manage by models with Django celery. So you can create cron task that will call when you need with a reference to you model. As an interesting problem, think in the moment of update you m

Re: How to show python data on html

2016-02-08 Thread Luis Zárate
Database models approuch only the most popular form of manipulate data, but django is MVT so you could have different representation of the "M" (eg. External API) and full use of "VT". An example. def myfunc(request): mydata = my_dict_get_by_api_call() return render(request, 'template.ht

Right place to decrypt/decode data from DB before passing it to UI without affect data in DB itself.

2016-02-08 Thread Luis Zárate
You are using django rest, sure. Why Message doesn't have an function as a property that return the encrypted . El lunes, 8 de febrero de 2016, learn django escribió: > Hi, > I store some data like email text, headers and from email address in encoded format in the database. > I want to have a

What python package is accurate to detect languages and count words?

2016-02-08 Thread Allison
I am trying to detect languages, so far I have used langdetect, langid. I heard goslate is blocked by Google, is there any package as good as goslate? It was simple and direct? Or would you recommend a python package for detecting languages and counting words? Thanks in advance, Allison --

Re: Right place to decrypt/decode data from DB before passing it to UI without affect data in DB itself.

2016-02-08 Thread Xavier Ordoquy
Hi, > Le 8 févr. 2016 à 19:00, learn django > a écrit : > > Hi, > > I store some data like email text, headers and from email address in encoded > format in the database. > I want to have a page where I can display all this information in readonly > format.