Re: Using django login functionality in a non django app

2016-04-25 Thread Gergely Polonkai
Now I somewhat understand what falcon is, I suggest that you simply implement auth on you web app (it seems to me there is none or little right now. Of course, you don't have to protect all iour views, or you may want to display a different dataset, but that's another topic. When that is done, you

Re: Django apparently can't handle that error.

2016-04-25 Thread Stephen J. Butler
Damn. It did work once, but now I can't reproduce it. But turning on SQL logging it's clear that what's happening isn't what I said it was. I get a sequence essentially like this at acct.delete(): -- Django selecting all the things it needs to cascade/update b/c of m2m SELECT * FROM "myapp_car"

Webix an django.

2016-04-25 Thread Elias Coutinho
Good night folks, http://webix.com/demos/ WEBIX is very nice to see and ride the templates. The question is simple: Django works by taking the data? Does anyone have an example? Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Passing parameter to template in django while using url rendering

2016-04-25 Thread jorrit787
You should have a look at Django's Messages framework. It does what you are trying to achieve in a more automatic and reusable way: https://docs.djangoproject.com/en/1.9/ref/contrib/messages/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: A Problem about UnicodeEncodeError

2016-04-25 Thread Mike Dewhirst
On 25/04/2016 10:29 PM, nku@gmail.com wrote: Thank you for your help. But my project is not in the desktop folder. I'll show you the traceback information: Well I don't think I can help. I can say that my development setup has given me no trouble at all. What works for me is ... C:\Users

Re: my mysite/templates/admin/base_site.html is ignored (tutorial unclear?)

2016-04-25 Thread Luis Zárate
Sory for not answer before, but I think I could help. First you need to know how django find the templates, so take a look template loaders https://docs.djangoproject.com/en/1.9/ref/templates/api/#django.template.loaders.filesystem.Loader There are two default loaders (filesystem and app ) ['dj

Re: Using django login functionality in a non django app

2016-04-25 Thread Larry Martell
The Qt app talks to the server with web requests routed to python code by falcon. It currently has no authentication/authorization of any kind. It's not a web app, you can't just navigate to any page, you can only get to parts of the app the code lets you get to. The way I envision it (if possible

Re: Django 1.9 Apps aren't loaded yet

2016-04-25 Thread marcin . j . nowak
Hi James, good to hear you. It is very good that app initialization is done within a special stage. I remember many problems related to imports and I'm happy that they will not occur anymore. I understand what is done and what for. Just wondering about possibility to do some kind of late init

Re: Using django login functionality in a non django app

2016-04-25 Thread Gergely Polonkai
Hello, this all depends on how this Qt app communicates with the other end (server side). Does it offer *any* kind of authentication/authorization? If so, look for ways to integrate it with Django. If not, you are screwed anyway (from security point of view), because even if your app pops up a log

Re: How do I design a user model for a Dating site

2016-04-25 Thread Avraham Serour
I personally would make a separate profile model either create a profile using signals or use something like get or create profile each time you want to get a profile for a user On Mon, Apr 25, 2016 at 2:11 PM, njan wrote: > Hello all, > > My first post here. > > I'm trying to make a Dating sit

Using django login functionality in a non django app

2016-04-25 Thread Larry Martell
We have an existing django app with login, change password, and forgot password functionality. Then we have this other app built with the falcon framework. The client side of that is C++/Qt. That app has no login functionality - you bring it up and you're in. We would like to somehow use the login

Re: __init__() got an unexpected keyword argument 'timeout' #4069

2016-04-25 Thread Stephen J. Butler
Look in your settings.py file for the TEMPLATES line. Do you have a 'timeout' under OPTIONS? Remove that. On Mon, Apr 25, 2016 at 8:34 AM, Khaled Al-Ansari wrote: > Hello, I'm having a problem with djangorest > > when i runserver everything looks fine but when I open the browser I get > this > >

Re: Django apparently can't handle that error.

2016-04-25 Thread Neto
This works for you? Not for me! This error continues to ignore the exception. Even using exception continues to show django.db.utils.IntegrityError Em domingo, 24 de abril de 2016 00:52:46 UTC-3, Stephen Butler escreveu: > > Ahh, Postgres is the problem. When your exception is thrown then Postgre

Re: Django 1.9 Apps aren't loaded yet

2016-04-25 Thread James Bennett
On Mon, Apr 25, 2016 at 8:13 AM, wrote: > The initialization process of models seems to be good step in cleaning > many problems, but I don't understant why I can't import models. > The usage of the model should raise exception when it is not > loaded/initialized, but not importing a model class!

Re: FieldError: Invalid order_by arguments: ['- pub_date']

2016-04-25 Thread gu99roax
Ok, I looked at the tutorial page more closely. When you look at the code, it looks like there is a space after the minus sign, especially when you mark text. But if I copy and paste the text into some arbitrary text editor, there is no space after the minus. When I follow the tutorial, I prefe

Re: Django 1.9 Apps aren't loaded yet

2016-04-25 Thread marcin . j . nowak
The initialization process of models seems to be good step in cleaning many problems, but I don't understant why I can't import models. The usage of the model should raise exception when it is not loaded/initialized, but not importing a model class! This requirement breaks packages encapsulation

Passing parameter to template in django while using url rendering

2016-04-25 Thread Nousheef Cholaykkil Muhammed
Hi am new to django , please help me to solve such a simple problem, This is our views.py from django.shortcuts import render, render_to_response from django.core.context_processors import request, csrf import re from django.contrib.auth.models import User # Create your views here. def crea

__init__() got an unexpected keyword argument 'timeout' #4069

2016-04-25 Thread Khaled Al-Ansari
Hello, I'm having a problem with djangorest when i runserver everything looks fine but when I open the browser I get this Internal Server Error: / Traceback (most recent call last): File "/home/khaled/Desktop/Sites/POSRocket/internal-api/env/lib/python3.4/site-packages/django/template/utils.

__init__() got an unexpected keyword argument 'timeout'

2016-04-25 Thread Khaled Al-Ansari
Hello, I'm having a problem with djangorest when i runserver everything looks fine but when I open the browser I get this Internal Server Error: / Traceback (most recent call last): File "/home/khaled/Desktop/Sites/POSRocket/internal-api/env/lib/python3.4/site-packages/django/template/utils.

Re: A Problem about UnicodeEncodeError

2016-04-25 Thread nku . mtl
Thank you for your help. But my project is not in the desktop folder. I'll show you the traceback information: 在 2016年4月24日星期日 UTC+8下午12:56:26,Mike Dewhirst写道: > > On 24/

Drawbacks of Django 'render_to_string' shortcut method

2016-04-25 Thread Rajesh Bk
Hi All, Ca you please explain the limitations of *Django 'render_to_string' shortcut* method if any? Because, we can update the 'html' content easily with this nice method while we encounters in ajax requests.Normally, an ajax only get the response as json format values only, but by using Djang

Re: FieldError: Invalid order_by arguments: ['- pub_date']

2016-04-25 Thread Michal Petrucha
On Mon, Apr 25, 2016 at 04:17:08AM -0700, gu99r...@student.chalmers.se wrote: > Yes, that worked. Someone better fix that mistake in the tutorial. I looked at the tutorial, but I didn't find any code example that would contain an order_by call containing a space after the minus sign. If there is s

Re: FieldError: Invalid order_by arguments: ['- pub_date']

2016-04-25 Thread gu99roax
Yes, that worked. Someone better fix that mistake in the tutorial. Also the template for index.html is also wrong, by changing line 4 to {{ question.question_text }} it now works. On Monday, April 25, 2016 at 12:42:49 PM UTC+2, Michal Petrucha wrote: > > On Mon, Apr 25, 2016 at 03:28:27AM -07

How do I design a user model for a Dating site

2016-04-25 Thread njan
Hello all, My first post here. I'm trying to make a Dating site where the Admin or Staff may not have a full fledged profile as that of a normal user of the site. I'd prefer to have email-id as the username for all users including admin I'm a bit confused about how to proceed here. Should I c

Re: FieldError: Invalid order_by arguments: ['- pub_date']

2016-04-25 Thread Michal Petrucha
On Mon, Apr 25, 2016 at 03:28:27AM -0700, gu99r...@student.chalmers.se wrote: > I'm following the tutorials on the Django website and now I'm stuck at > tutorial 3. I'm working on the 'polls' application. > > The view.py file looks like so > > from django.http import HttpResponse > from django.t

Re: Problems following tutorials on django 1.9.2

2016-04-25 Thread gu99roax
Yes, I discovered the problem. When I first installed django, I chose the latest stable version assuming that the latest version would be Django 1.9. Then, once I learned how to check version I realized that the version installed was 1.8.9. So I had to manually unmask the "unstable" version of

FieldError: Invalid order_by arguments: ['- pub_date']

2016-04-25 Thread gu99roax
I'm following the tutorials on the Django website and now I'm stuck at tutorial 3. I'm working on the 'polls' application. The view.py file looks like so from django.http import HttpResponse from django.template import loader from django.shortcuts import render from .models import Question def

Re: Possible bug in Django Admin site in tabular inline or stacked inline with datetime shortcuts

2016-04-25 Thread Константин Попов
If anyone is interested in this question, I have fixed this myself, with approach number 2. I had to copy two js files from django to my project and then fix that files. вторник, 19 апреля 2016 г., 15:02:30 UTC+3 пользователь Константин Попов написал: > > Hi, django users. > > I have found poss