Post Error

2015-05-20 Thread SUBHABRATA BANERJEE
Dear Group, I was trying to write a RestDjango Application with the help of a web based book available from https://www.safaribooksonline.com/library/view/lightweight-django/9781491946275/ch04.html Project's folder structure is as follows, tutoriall/ tutoriall/ migrations/ _init_.

Possible bug in django 1.8 when following tutorial part 5

2015-05-20 Thread Mohd Lee
Hi guys, I notice this warning in the console when following tutorial 4 & 5 in django 8 with Python 3.4: ...django/venv/lib/python3.4/site-packages/django/templatetags/future.py:25: RemovedInDjango19Warning: Loading the `url` tag from the `future` library is deprecated and will be removed in Dja

Re: Django and Jquery UI

2015-05-20 Thread Joris
Hi Robert Could you please specify more clearly how you "added jqueryui to my settings.py" ? It should be handled like any other static file and doesn't really have a place in settings.py Do your other static files (images, css, etc) load? Best Seems tough to get the Jquery UI code to do an

Keeping sessions

2015-05-20 Thread Ajay M
Hi, I've created my own user model for my project and it is like this from django.db import models from webapp.models.groupimport Group from webapp.models.userrole import UserRole class GroupAdmin(models.Model): user_name = models.CharField(max_length = 200, blank=T

Re: Improve Performance in Admin ManyToMany

2015-05-20 Thread Timothy W. Cook
*SOLVED:* The correct method name is *formfield_for_manytomany * instead of *formfield_for_many_to_many* *def formfield_for_manytomany(self, db_field, *args, **kwargs):* *formfield = super(ClusterAdmin, self).formfield_for_manytomany(db_field, *args, **kwargs)* *if db_field.name

admin site, model default permissions

2015-05-20 Thread Jose Ignacio Berreteaga
Hi I'm working with django 1.8. My project has several applications, each one uses a database using routers.I put admin site tables in a database by another router. app1> router1 ---> db1 app2> router2 ---> db2 'admin', 'auth', 'contenttypes', 'sessions', 'messages', 'sites' > rout

ELSE don't work

2015-05-20 Thread Emerson Luiz
Hi, I have the following logic: {% if rt.controle == 1 and rt.Exten|length > 7 %} WORK's {% elif rt.controle == 1 %} WORK's {% elif rt.controle == 0 and rt.Exten|length > 7 %} WORK's {% elif rt.controle == 0 %} WORK's {% else %} DON'T WORK's {% endif %} My problem here is the ELSE stateme

Re: ELSE don't work

2015-05-20 Thread Shai Efrati
What does rt.controle hold? Do you pass any values that are not 0 or 1? On Wed, May 20, 2015 at 4:37 PM, Emerson Luiz wrote: > Hi, > > I have the following logic: > > {% if rt.controle == 1 and rt.Exten|length > 7 %} > WORK's > {% elif rt.controle == 1 %} > WORK's > {% elif rt.controle == 0 and

Re: ELSE don't work

2015-05-20 Thread Emerson Luiz
Shai Efrati, Thanks for answer... rt.controle pass always 0 or 1 I not pass any value.. only 0 or 1 Thanks Em quarta-feira, 20 de maio de 2015 10:45:25 UTC-3, Shai Efrati escreveu: > > What does rt.controle hold? > Do you pass any values that are not 0 or 1? > > On Wed, May 20, 2015 at 4:37 PM,

Re: ELSE don't work

2015-05-20 Thread Shai Efrati
So, when do you expect *else*? It seems that you don't pass such values. On Wed, May 20, 2015 at 4:52 PM, Emerson Luiz wrote: > Shai Efrati, > > Thanks for answer... > > rt.controle pass always 0 or 1 > I not pass any value.. only 0 or 1 > > Thanks > > Em quarta-feira, 20 de maio de 2015 10:45:2

Re: ELSE don't work

2015-05-20 Thread Emerson Luiz
When i don't have 0 or 1 i need show some thing... Let me explain the situation... 0 = Show when calls is RING 1 = Show when the calls is ANSWER When i don't have calls, i need show some thing . I have an python script making insert in real time all calls statement in mysql Thanks Em quarta

Re: ELSE don't work

2015-05-20 Thread Emerson Luiz
When i don't have 0 or 1 i need show some thing... Let me explain the situation... 0 = Show when calls is RING 1 = Show when the calls is ANSWER When i don't have calls, i need show some thing . I have an python script making insert in real time all calls statement in mysql You can see the co

Re: ELSE don't work

2015-05-20 Thread Tom Evans
On Wed, May 20, 2015 at 3:00 PM, Emerson Luiz wrote: > When i don't have 0 or 1 i need show some thing... > > Let me explain the situation... > > 0 = Show when calls is RING > 1 = Show when the calls is ANSWER > > When i don't have calls, i need show some thing . I have an python script > making i

Re: ELSE don't work

2015-05-20 Thread Shai Efrati
In the gist you show only the template. Can you send a gist with the code that creates rt.controle? > On May 20, 2015, at 5:02 PM, Emerson Luiz wrote: > > When i don't have 0 or 1 i need show some thing... > > Let me explain the situation... > > 0 = Show when calls is RING > 1 = Show when t

Re: ELSE don't work

2015-05-20 Thread Emerson Luiz
Shai Efrati, rt.controle is create by in view: exten = rt_calls.objects.all() Em quarta-feira, 20 de maio de 2015 11:33:22 UTC-3, Shai Efrati escreveu: > > In the gist you show only the template. Can you send a gist with the code > that creates > rt.controle? > > > On May 20, 2015, at 5:02 PM

Re: ELSE don't work

2015-05-20 Thread Shai Efrati
What do you have in models.py for rt_calls? Did you try passing values that are not 0 or 1? > On May 20, 2015, at 5:47 PM, Emerson Luiz wrote: > > Shai Efrati, > > rt.controle is create by in view: > > exten = rt_calls.objects.all() > > Em quarta-feira, 20 de maio de 2015 11:33:22 UTC-3, S

Django 1.8 and MySQL, how to connect??

2015-05-20 Thread eduardo . canaljunior
Hi, I never used Django with MySQL data base before. Someone can tellme how I can (if it's possible) connect my Django web site with a data base in MySQL. I tryed to install "mysqlclient-1.3.6-cp27-none-win32.whl" using pip (pip install mysqlclient-1.3.6-cp27-none-win32.whl), but I recived an e

Re: Embeding HSQLDB in a standalone App

2015-05-20 Thread Bill Freeman
Can you access the js files via their static urls? Does your html load the js (e.g. in script tags)? Can you make it work with html accessed via file:/// type urls (keeping django out of the mix)? On Tue, May 19, 2015 at 10:06 PM, Robert librado wrote: > Anybody understand how to connect Django

Re: django1.7, python3.4 and MySQL

2015-05-20 Thread eduardo . canaljunior
Hi, sorry but I tryed to install mysqlclient-1.3.6-cp34-none-win_amd64.whl using pip (pip install mysqlclient-1.3.6-cp34-none-win_amd64.whl) and I can't, the pip launch de exceptio UnsupportedWheel, I have installed Python3.4.2 in Windows8.1 and I don't know if the error happens by a version pr

Re: How to concatenate two variables in a template for evaluation..

2015-05-20 Thread rishi sijariya
Hi Hayyan Rafig, did you find your solution of adding two variable , if yes pls share with us, or any one can help pls On Wednesday, 10 August 2011 03:07:25 UTC+5:30, Hayyan Rafiq wrote: > > Okay then which way do u recommend that i should follow in case > i need to displays objects with d

AttributeError with deep Prefetch

2015-05-20 Thread Gagaro
Hello, I have an issue when trying to using prefetch_related in a queryset inside a queryset already doing a prefetch_related. I have the following code: items = OrderItem.objects.prefetch_related(Prefetch('results')) orders = Order.objects.prefetch_related(Prefetch('items', queryset=items))

Re: ELSE don't work

2015-05-20 Thread Emerson Luiz
Shai Efrati, this: class rt_calls(models.Model): Channel = models.CharField(blank=True, null=True, max_length=100) ChannelState = models.IntegerField() ChannelStateDesc = models.CharField(blank=True, null=True, max_length=10) CallerIDNum = models.IntegerField(blank=True, null=Tr

Re: django1.7, python3.4 and MySQL

2015-05-20 Thread Alasdair Nicol
Hi eduardo, Have you tried the following? pip install mysqlclient Usually, you should use the package name, you don't need to specify the specific wheel you want to install. Cheers, Alasdair On 20/05/15 16:03, eduardo.canaljun...@gmail.com wrote: Hi, sorry but I tryed to install mysqlclien

LiveServerTestCase + SSL

2015-05-20 Thread Peter Brooks
Hi all, Part of my code base includes a view which must be served via SSL. When writing my integration tests, I find that LiveServerTestCase is strictly http and doesn't support https. Could this be a planned feature to add or should I turn my attention to running a HTTPS testing server elsewher

Re: ELSE don't work

2015-05-20 Thread Emerson Luiz
Hi, This solve my problem: https://docs.djangoproject.com/en/1.8/ref/templates/builtins/#for-empty Thanks all... Em quarta-feira, 20 de maio de 2015 13:19:23 UTC-3, Emerson Luiz escreveu: > > Shai Efrati, > > this: > > > class rt_calls(models.Model): > Channel = models.CharField(blank=True

Re: Django 1.8 and MySQL, how to connect??

2015-05-20 Thread Daniel Roseman
On Wednesday, 20 May 2015 16:05:17 UTC+1, eduardo.c...@gmail.com wrote: > > Hi, I never used Django with MySQL data base before. Someone can tellme > how I can (if it's possible) connect my Django web site with a data base in > MySQL. I tryed to install "mysqlclient-1.3.6-cp27-none-win32.whl" usi

[ANNOUNCE] Django security release issued (1.8.2)

2015-05-20 Thread Tim Graham
Today the Django team issued Django 1.8.2 as part of our security process. This releases address a security issue, and we encourage all users to upgrade as soon as possible. More details can be found on our blog: https://www.djangoproject.com/weblog/2015/may/20/security-release/ As a reminder,

httml form to django

2015-05-20 Thread dk
i have a regular form in the template. the user and the password since the web designer did it like that. can I still use it in django view? any particular way that's need to be use? or we need to change it to use django forms? =) -- You received this message because you are subscribed to

Re: httml form to django

2015-05-20 Thread 술욱
Hi, just make sure you match your input names with what Django expects. For example: If the HTML is your Form will need a "username" field. HTH, Norberto 2015-05-20 18:24 GMT-03:00 dk : > i have a regular form in the template. the user and the password since the > web designer did it like th

change the style of the forms been render in the httml?

2015-05-20 Thread dk
I did a form class and renders fine in the html. but look ugly, I do have another field directly done directly in the HTML with a style like this and look pretty how can I put it to the form? can I override the "style"? or can I change the class? so I can change the look? thanks guys. .text_li

Re: Possible bug in django 1.8 when following tutorial part 5

2015-05-20 Thread Mohd Lee
I just found out that it's actually caused by django-suit. They've had the fix checked in. On Wednesday, May 20, 2015 at 5:46:34 PM UTC+8, Mohd Lee wrote: > > Hi guys, I notice this warning in the console when following tutorial 4 & > 5 in django 8 with Python 3.4: > ...django/venv/lib/python3.4

Re: httml form to django

2015-05-20 Thread Luis Zárate
And you need to put inside the form the csrf token . {% csrf_token %} ... See: https://docs.djangoproject.com/en/1.8/ref/csrf/ 2015-05-20 16:40 GMT-06:00 술욱 : > Hi, > > just make sure you match your input names with what Django expects. For > example: > > If the HTML is your Form will need a

Re: Kivy and Djangp

2015-05-20 Thread Luis Zárate
Take a look at this http://kivy.org/docs/api-kivy.network.urlrequest.html for Kivy and http://www.django-rest-framework.org/ for django. You need to do a web service with django I suggest a restfull service and with kivy urlrequest create a client. 2015-05-13 18:07 GMT-06:00 john : > Kivy is

Django 1.8.1, DB router and get_absolute_url()

2015-05-20 Thread Davide Setti
Hi all, I'm using Django 1.8.1 with some models on a legacy DB. They all are in the same app, so the router is simple: class MyRouter(object): MYAPP = 'pkmain' def db_for_read(self, model, **hints): if model._meta.app_label == self.MYAPP: return 'other_db' ret

Microsoft SQL Server and Azure SQL Database support

2015-05-20 Thread Meet Bhagdev
When I last checked the Django ORM did not have official support for SQL Server and Azure SQL DB. Is there a way to use SQL Server and more importantly Azure SQL DB by modifying the DATABASES configuration in settings.py -- You received this message because you are subscribed to the Google G

Avoiding Keyboard Input for Removing Stale Content Types Automatically (migrations and automatic deployment)

2015-05-20 Thread Proto
I submitted this ticket recently: https://code.djangoproject.com/ticket/24820 The content of it is as follows: While removing models in one of my migrations, I was prompted by Django to > input yes/no. For development, this is no problem. For automatic > deployments it is. > > I want to know