how to forbidden refresh page in django during loading after press submit button in form and only allow close window

2016-06-09 Thread meInvent bbird
how to forbidden refresh page in django during loading after press submit button in form and only allow close window -- 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

which regex are for filtering malicious input in django?

2016-06-09 Thread meInvent bbird
which regex are for filtering malicious input in django? -- 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 django-users+unsubscr...@googlegroups.com. To post to

how to forbidden mouse click and keyboard typing when loading page after press submit button in django web?

2016-06-09 Thread meInvent bbird
how to forbidden mouse click and keyboard typing when loading page after press submit button in django web? -- 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

Re: Expiration date option

2016-06-09 Thread James Schneider
On Wed, Jun 8, 2016 at 9:25 AM, 'David Turner' via Django users < django-users@googlegroups.com> wrote: > Hi James > > Just one more quick question: > I have two django models both containing the same information, temps and > companies. > The models both contain the following fields: > > odd days

weak object has gone away

2016-06-09 Thread Martín Massera
Hi ! Every 6-12 months it happens that all my views start failing with this error: TypeError: weak object has gone away There are some caches here and there and it seems to me that there must be a problem with them, but I dont know since this doesnt happen when I develop, it only

Re: Django and jQuery, I don't get it

2016-06-09 Thread Mike Dewhirst
I can't help at all with jquery but IIRC there is a question in the Admin "Are you sure?" when you try deleting something from a list view. Might be a start Mike On 10/06/2016 1:06 AM, Olivier Dalang wrote: Hi ! I'm using several modules that rely on jQuery, and have some own needs as well

Re: Custom Database Connector Based on psycopg2 for External Postgres DB

2016-06-09 Thread Michal Petrucha
On Wed, Jun 08, 2016 at 06:14:44PM -0700, Brandon wrote: > Hi! I am attempting to create my own database connector for Django for an > external PostgreSQL DB that I have running. For this application, I issue > the SQL queries and get responses over a REST API, so in theory, I'd like > to adopt

Re: Stuck on tutorial your first Django app part 2

2016-06-09 Thread Bill Freeman
What is the definition of your __str__() method? On Thu, Jun 9, 2016 at 4:11 PM, Neil Hunt wrote: > Hello, > > I'm enjoying the tutorial and now I'm stuck on the second page (writing > your first Django app part 2), shortly after this paragraph. > > 'It’s important to add

Stuck on tutorial your first Django app part 2

2016-06-09 Thread Neil Hunt
Hello, I'm enjoying the tutorial and now I'm stuck on the second page (writing your first Django app part 2), shortly after this paragraph. 'It’s important to add __str__() methods to your models,

Queries regarding Custom Managers with model inheritance.

2016-06-09 Thread Dheerendra Rathor
I was going through https://docs.djangoproject.com/en/1.9/topics/db/managers/#custom-managers-and-model-inheritance regarding custom managers and I decided to do some tests. Here are my models: from django.db import models class CustomManager(models.Manager): use_for_related_fields =

Django - Crop Images with jquery and after that save them on cdn

2016-06-09 Thread sevenrrainbow
I'm try to use jquery and python to "crop" a image in Django. I want to work in admin but also in front-end. The user selects a box/rectangle, for the portion of the image that he want to crop. django-image-cropping package

Re: Django Admin download doesn't work but doa

2016-06-09 Thread Ezequiel Bertti
Hi! Can you send the complete exception message whit traceback to us? On Thu, Jun 9, 2016 at 1:07 PM, McKinley wrote: > I have a view that allows me to download, but I can't download from Django > admin. This is my view that allows me to download. How do I put similar

Re: Adding Tinymce to Admin

2016-06-09 Thread Ankush Thakur
Nope. And you know why, coz I'm an idiot! :P Will try this and post here if I run into problems. Thanks a ton! ~~Ankush On Thursday, June 9, 2016 at 5:15:52 PM UTC+5:30, jorr...@gmail.com wrote: > > Have you looked at https://github.com/aljosa/django-tinymce ? > -- You received this message

Re: Adding Tinymce to Admin

2016-06-09 Thread Ankush Thakur
Ah, yes! I entirely forgot about admin.py, my head swirling with too many concepts to remember. Let me work on that see how it goes. Thanks! :-) ~~Ankush On Thursday, June 9, 2016 at 2:20:04 PM UTC+5:30, ludovic coues wrote: > > I'm pretty sure you can specify a widget to use in admin for each

Quick-render an object in generic CBV

2016-06-09 Thread Ankush Thakur
I'm exploring generic class-based views these days, and was wondering about something. When I use DetailView, the object gets passed to the template, where I have to print all of the properties one by one in the desired HTML element. I was wondering if it's possible to quick-render an object the

Re: template tag don't work ==

2016-06-09 Thread Ing. Jaime Sanchez
ok this is view. def junior_pending_impacts(request, pk=None): queryset_list = IgcNew.objects.all() count_new = IgcNew.objects.filter(IGC_Status__contains='New').count() # log.warning('%s' % count_new) noregistro = overall_impact.objects.all() # log.warning('%s' %

Re: Where is this warning coming from?

2016-06-09 Thread Tim Graham
timezone.now().date() returns datetime.date() which doesn't have a timezone. You can use the date lookup in Django 1.9+: https://docs.djangoproject.com/en/stable/ref/models/querysets/#date On Thursday, June 9, 2016 at 7:43:33 AM UTC-4, jorr...@gmail.com wrote: > > I have a view that calculates

Re: template tag don't work ==

2016-06-09 Thread Tim Graham
A sample project to reproduce the problem is probably needed. On Thursday, June 9, 2016 at 12:33:24 PM UTC-4, Ing. Jaime Sanchez wrote: > > Help please!! > > I need do like this > in django 1.9 template tag > > {% if model1.obj == model2.obj %} > print ok > {% else %} > print not OK > {% endif

template tag don't work ==

2016-06-09 Thread Ing. Jaime Sanchez
Help please!! I need do like this in django 1.9 template tag {% if model1.obj == model2.obj %} print ok {% else %} print not OK {% endif %} but don't work. someone help me?? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Django Admin download doesn't work but doa

2016-06-09 Thread McKinley
I have a view that allows me to download, but I can't download from Django admin. This is my view that allows me to download. How do I put similar logic in the admin? def script_download(request, script_id): scripts = Scripts.objects.get(id=script_id) fsock =

Django and jQuery, I don't get it

2016-06-09 Thread Olivier Dalang
Hi ! I'm using several modules that rely on jQuery, and have some own needs as well : - admin > - grappelli > - autocomplete light > - session security > ... I also see that there are tons of different variables that reference jQuery, defined by theses modules, some of which are the same, and

Re: Design an encrypted time-limited API on Client/Server side

2016-06-09 Thread James Schneider
On Jun 9, 2016 4:59 AM, "Philip Lee" wrote: > > I am planning design an encrypted time-limited API on both Client and Server sides, the server side is written in Django, the client side is a GUI program which call the API by > > import requests > c =

Re: Where is this warning coming from?

2016-06-09 Thread James Schneider
> py:1393: RuntimeWarning: DateTimeField User.date_joined received a naive datetim > e (2016-06-09 00:00:00) while time zone support is active. > RuntimeWarning) > > [09/Jun/2016 13:38:09] "GET /admincp/ HTTP/1.1" 200 14002 > > I'm using timezone(), so why am I getting these warnings? > What is

Re: Django query returns nothing for legacy databse

2016-06-09 Thread Remco Gerlich
Do you have a database router set up to tell Django which models are stored in which database? Greetings, Remco Gerlich On Thu, Jun 9, 2016 at 2:13 PM, Galil wrote: > Hello, > > I am using two databses for my Django app and one of them is an existing > MySQL database: > >

Re: Django query returns nothing for legacy databse

2016-06-09 Thread Gagaro
Hi, You should select the database you want to use: Calls.objects.using('calls').all() See https://docs.djangoproject.com/en/1.9/topics/db/multi-db/#manually-selecting-a-database On Thursday, 9 June 2016 14:13:22 UTC+2, Galil wrote: > > Hello, > > I am using two databses for my Django app and

Django query returns nothing for legacy databse

2016-06-09 Thread Galil
Hello, I am using two databses for my Django app and one of them is an existing MySQL database: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'users.sqlite3'), }, 'calls': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'portal2',

Custom Database Connector Based on psycopg2 for External Postgres DB

2016-06-09 Thread Brandon
Hi! I am attempting to create my own database connector for Django for an external PostgreSQL DB that I have running. For this application, I issue the SQL queries and get responses over a REST API, so in theory, I'd like to adopt what already exists in the Postgres connector

Design an encrypted time-limited API on Client/Server side

2016-06-09 Thread Philip Lee
I am planning design an encrypted time-limited API on both Client and Server sides, the server side is written in Django, the client side is a GUI program which call the API by import requests c = requests.post("http://127.0.0.1:8000/VideoParser/;, data={'videoUrl': videoUrl }) The way it

Re: Adding Tinymce to Admin

2016-06-09 Thread jorrit787
Have you looked at https://github.com/aljosa/django-tinymce ? -- 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 django-users+unsubscr...@googlegroups.com. To post

Where is this warning coming from?

2016-06-09 Thread jorrit787
I have a view that calculates some quick statistics: def index(request): context = { 'topics_unanswered': Topic.on_site.filter(topic_type=1, date_published__isnull=False, reply__isnull=True).count(), 'members_unapproved':

Re: Adding Tinymce to Admin

2016-06-09 Thread ludovic coues
I'm pretty sure you can specify a widget to use in admin for each model and field. Part 7 of the tutorial will show you how to alter the admin without changing the file in the virtualenv. The documentation on ModelAdmin have an example of what you are trying to do :) +33614874342 On 8 Jun 2016