how shall I built online address book using Django

2015-05-21 Thread Preeti
I have to create an address book using django it should contain two modules-user and admin the user is allowed to write his/her first name/last name, add the picture, lists the social media links, should add a 4-digit PIN . the other user can use that 4-digit PIN to add a particular contact in h

Address book using django

2015-05-21 Thread Preeti
I have to create an address book using django it should contain two modules-user and admin the user is allowed to write his/her first name/last name, add the picture, lists the social media links, should add a 4-digit PIN . the other user can use that 4-digit PIN to add a particular contact in h

Combining Social auth and normal auth in Django

2015-05-21 Thread akshat
I am developing a full-fledged user management in django. I want to combine normal django authentication and social authentications. Django normal authentication contains one User table which stores all the fields of user such as (username,email,password etc). I want to know the sequential steps

Migrating from sqllite3 to postgres

2015-05-21 Thread jaspinder singh
I have developed an app using sqllite. But my Heroku doesn't support sqllite and the data keeps leaking every 24 hours. Can someone list the steps how to change from sqllite3 to postgres -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsub

Re: utf-16le encode generic view object_list

2015-05-21 Thread Stephen J. Butler
I think that looks fine. I would change the mimetype to "text/plain; charset=UTF-16LE" just to play nice, but it probably will never matter with your Content-Disposition. Also, HttpResponse's mimetype parameter has been deprecated since 1.5; use content_type instead. On Thu, May 21, 2015 at 3:04 P

Re: How to get a application-formpost in django view? Get QueryDict variables.

2015-05-21 Thread Gergely Polonkai
I don't think so, maybe the post request is poorly formatted. Can you somehow catch the raw http request for analyzing? On 22 May 2015 00:14, "Vijay Khemlani" wrote: > Maybe the brackets confuse the querydict, try calling its items method (to > convert it into a list of tuples) or its dict method

Re: 'ImageFieldFile' object has no attribute 'startswith'

2015-05-21 Thread YusufSalahAdDin
I have the same problem doing feeds, can anyone help me? Yes, i'm using sorl-thumbnail. El lunes, 11 de agosto de 2008, 14:59:47 (UTC-5), Daehee escribió: > > Thank you for the prompt responses. I am using sorl-thumbnail on > Google Code, and with your tips I found the solution to the problem >

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

2015-05-21 Thread Luis Zárate
Mmm maybe creating a tag https://docs.djangoproject.com/en/1.8/howto/custom-template-tags/#writing-custom-template-tags In template {% mytag obj prop %} In tag function def mytag(obj, prop): return getattr(obj, prop) El miércoles, 20 de mayo de 2015, rishi sijariya escribió: > Hi Hayya

httml form to django

2015-05-21 Thread Luis Zárate
You don't need to alter any model, only need to create a form class (better) or using request.POST.get("username"). If you want to do in right way See https://docs.djangoproject.com/en/1.8/topics/forms/ El jueves, 21 de mayo de 2015, dk escribió: > I am not going to update any models for the da

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

2015-05-21 Thread Luis Zárate
It is easy, you only need to put id attribute to form statement like this {{form.as_p}} In CSS use cascade starting by #myform. Other thing I was used form.as_p for printing as , but you could used form.as_ul or form.as_table too. By default as_table is set when you do {{form}} El jueves, 2

Re: select_related() / prefetch_related() and sharding

2015-05-21 Thread Simon Charette
Small correction, prefetch_related doesn't issue any JOIN unless a is query with a select_related is specified with a Prefetch object. Simon Le jeudi 21 mai 2015 17:53:30 UTC-4, Ash Christopher a écrit : > > Hi David, > > *select_related* does a JOIN under the hood, and you can't do > cross-dat

Re: Lots of django questions

2015-05-21 Thread Lachlan Musicman
0. Yep, just delete your secret key and get a new one - wont affect anything negatively. 2. I put things like menus into the base.html template. It means a little bit of hand coding once, but only once. How to do it depends on your design. I personally am terrible at design, so using bootstrap make

Lots of django questions

2015-05-21 Thread Derek Riemer
Hi guys, A few questions here. First of all, 0. Woopsi, I accidentally pushed my secret key to a public github multiple times (I must be an idiot Lol). Can I simply just change this key to a random string like those on https://www.grc.com/passwords.htm? Luckilly I never really did anything wit

Re: select_related() / prefetch_related() and sharding

2015-05-21 Thread Ash Christopher
Hi David, *select_related* does a JOIN under the hood, and you can't do cross-database joins in the databases supported by Django. For prefetch_related, there is no way out of the box to perform a cross-database join in Python (which is what prefetch_related is doing) but perhaps there is some way

Re: How to get a application-formpost in django view? Get QueryDict variables.

2015-05-21 Thread Vijay Khemlani
Maybe the brackets confuse the querydict, try calling its items method (to convert it into a list of tuples) or its dict method (to turn it into a normal python dict) On Thu, May 21, 2015 at 3:34 PM, Fellipe Henrique wrote: > Any ideas? > > I finish all my possibilities in these problem.. :( and

Re: utf-16le encode generic view object_list

2015-05-21 Thread Tim Chase
On 2015-05-21 13:04, JHeasly wrote: > I've got a function-based generic view that I want to return a > utf-16le encoded response (for use as an InDesign tagged text file; > the utf-16le is what InDesign wants). I've got it working here > , but

utf-16le encode generic view object_list

2015-05-21 Thread JHeasly
Hello all, I've got a function-based generic view that I want to return a utf-16le encoded response (for use as an InDesign tagged text file; the utf-16le is what InDesign wants). I've got it working here , but am wondering if there's an mo

select_related() / prefetch_related() and sharding

2015-05-21 Thread David
Dear List, I came about conflicting information (to my mind) concerning the use of select_related() and prefetch_related(). My question is whether you can combine select_related() and prefetch_related() with sharding techniques. If so, how are you doing it? Background: I was watching various vide

Re: How to get a application-formpost in django view? Get QueryDict variables.

2015-05-21 Thread Fellipe Henrique
Any ideas? I finish all my possibilities in these problem.. :( and no solution... T.·.F.·.A.·. S+F *Fellipe Henrique P. Soares* e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge' *Blog: http://fhbash.wordpress.com/ * *GitHub: https://gi

django-1-8-form-with-fieldmap-for-receiving-mailgun-icoming-mails

2015-05-21 Thread Klaas Feenstra
Hello Django users, I want to receive mails from mailgun in a Django web application. I have problem with parsing the data to the form. As you can see, in the froms.py there is a field_map, to convert the fields Mailgun sends to the model fields. This is not working. All fields that are not con

Re: "&" string to template adds "&" in the html

2015-05-21 Thread Andreas Kuhne
2015-05-21 18:35 GMT+02:00 dk : > I am creating a string inside the view that will be use in the template on > the javascript. > my string in python contains & and I print the view and works fine, but > when is send to the template I don get &. > > is there something magical about & ? or any

"&" string to template adds "&" in the html

2015-05-21 Thread dk
I am creating a string inside the view that will be use in the template on the javascript. my string in python contains & and I print the view and works fine, but when is send to the template I don get &. is there something magical about & ? or any hint on how to make it work? thanks guy

Re: httml form to django

2015-05-21 Thread dk
I am not going to update any models for the database or anything I just need some info from the user that will be process by the view. I could put that info in the url as a variable such /?=variable. and then get it with info = request.GET.get("info", "") but its little ugly since you display i

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

2015-05-21 Thread dk
Thanks Galia, since I only have 2 fields, I think the second options will be the faster, do you have an example? no how to override the id? or the class? in the template I am doing {{ form }} I even try to do something like {{ form }} but that doesn't change it =( thanks. On Thursday,

trouble with creditcard expiry field

2015-05-21 Thread john
Hi, I'm using a module called creditcard.py (to be honest I can't recall where I got it) and it works just great for phones, firefox desktop, chrome desktop with my Django forms. But (of course there is a but) it is not working with the Safari desktop (laptop) 10.9 (mostly likely all version

Re: How to get a application-formpost in django view? Get QueryDict variables.

2015-05-21 Thread Fellipe Henrique
Thanks, I try that! but show me None as value... I think, that's because the QueryDict is showed in this way: I think the django takes 'data[id]': ['83A0C50B5A0A43AD8F60C1066B16A163'], 'data[status]': ['paid'], 'event': ['invoice.status_changed'] as the "key"... :( T.·.F.·.A.·. S+F *Fel

Re: How to get a application-formpost in django view? Get QueryDict variables.

2015-05-21 Thread Gergely Polonkai
Assuming your QueryDict is called my_post_data, use my_post_data.get('data[id]'). On 21 May 2015 15:28, "Fellipe Henrique" wrote: > Hello, > > I need to get one application-form-post content from one server. This > server isn't mine. > > They send to me this application-form-post, and in Django V

Re: Microsoft SQL Server and Azure SQL Database support

2015-05-21 Thread Michael Manfre
django-pyodbc-azure might be a better choice and it seems to be more actively maintained. On Thursday, May 21, 2015 at 8:30:33 AM UTC-4, felix wrote: > > El 20/05/15 14:39, Meet Bhagdev escribió: > > When I last checked the Django ORM did not have official support for SQL > Server and Azure S

Re: Microsoft SQL Server and Azure SQL Database support

2015-05-21 Thread felix
El 20/05/15 14:39, Meet Bhagdev escribió: 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 Try django-pyodbc. On Linux

How to get a application-formpost in django view? Get QueryDict variables.

2015-05-21 Thread Fellipe Henrique
Hello, I need to get one application-form-post content from one server. This server isn't mine. They send to me this application-form-post, and in Django View I receive this: I need to get: data['id'], data['status'] and event variables.. How I do this in django? Because I can't work with Qu

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

2015-05-21 Thread Galia Ladiray
What you want to do is to add a class attribute to your django widget using attrs so that they will be rendered with this class, then to add the style you want to this class in your CSS section, This doc shows how to do it: https://docs.djangoproject.com/en/1.8/ref/forms/widgets/ You can of cour