Re: Render Django Form with Ajax Response

2015-01-09 Thread JJ Zolper
For anyone who is curious how to make this work in the future (I always appreciate people sharing) I got lucky this time. There were absolutely no signals to what the issues is so I started guessing. It ended up being that because of the nature of the comment form being rendered with ajax it

Re: I can send mail with shell but can't sent mail via view

2015-01-09 Thread Hossein Rashnoo
Really really thank you for your help. I using the IP rather than the name for EMAIL_HOST and its worked and its probably DNS problem. Thanks again. Best regards . On Thursday, January 8, 2015 at 2:20:29 PM UTC+3:30, James Schneider wrote: > > After a bit of reflection, I actually think the

Render Django Form with Ajax Response

2015-01-09 Thread JJ Zolper
So like expected i made the post form work by only rendering it once and then using hidden fields to make the form work for my 3 feeds so posted would be created properly but i am still not sure if conceptually i understand why when the comment form is rendered with ajax for a that it doesnt

Re: CSRF verification failed when I use smart phone

2015-01-09 Thread James Schneider
Is the iframe sourced from the same domain as the main page that was requested in the address bar? Is the action for the form pointing at a different domain than the one that generated it? -James Mobile device could also be caching an incorrect csrf token. -- You received this message because

Re: CSRF verification failed when I use smart phone

2015-01-09 Thread Sugita Shinsuke
Hi Zach Borboa Thank you for replying. Do you mean that both of PC and Mobile device are caching an incorrect csrf token? I use iframe. Child frame html page uses form, and can it use csrf? 2015年1月9日金曜日 15時14分55秒 UTC+9 Zach Borboa: > > Mobile device could also be caching an incorrect csrf

Re: CSRF verification failed when I use smart phone

2015-01-09 Thread Sugita Shinsuke
Hello Abraham V. Thank you for replying. It is nice idea. But, PC version also sometimes happened. less than Mobile 2015年1月8日木曜日 20時09分11秒 UTC+9 Abraham Varricatt: > > Can it be possible that you are rendering a different template (without > CSRF) for the mobile version? > > -Abraham V. > > >

Render Django Form with Ajax Response

2015-01-09 Thread JJ Zolper
I'm almost positive there is some way to achieve this though. For example, in a facebook group for example when you scroll it loads a new set of posts and those posts are loaded with ajax and those posts have a comment form that was again obviously rendered with ajax. My situation is the same

Re: Question on Template placement in file system

2015-01-09 Thread JJ Zolper
Generally speaking my impression is most people next to their settings.py file have a "templates" folder. This folder of templates is for templates used across the site. If you are talking app specific then a "templates" folder inside that app is reasonable enough. So for generic templates

Render Django Form with Ajax Response

2015-01-09 Thread JJ Zolper
So what I'm trying to build is pretty complicated and I would like to see if this is even achievable. What I'm building has multiple feeds but on the same view. So on the initial GET request it loads the default feed and then say the user wants to load another one of the feeds of posts with

Re: Django modify model instance from HTML

2015-01-09 Thread James Schneider
Yep, the URL can be anything. Check out https://docs.djangoproject.com/en/1.7/topics/class-based-views/generic-editing/#ajax-example for an example using CBV's. For the API call, you won't end up rendering any html, just returning an HTTPResponse object and perhaps some data, likely in JSON

Two QuerySets on a FormSet

2015-01-09 Thread Some Developer
I have a model Song which has a FormSet associated with it using a ModelForm. The Song model has two ForeignKeys (Artist and Album) but I want to limit the options shown in the FormSet to only Artists and Albums made by the currently logged in user. I know to make the QuerySets themselves

Re: Rearding django

2015-01-09 Thread Mark Phillips
Start with the tutorial. Mark On Fri, Jan 9, 2015 at 4:57 AM, Siddharth Singh wrote: > Hi > > I am new in django. I want to develop a website using django framework. > so, can anyone suggest me how will i approach which will fruitful for. > And which tools should i

Re: [HELP] Custom 2 step authentication where the user's password is a public key

2015-01-09 Thread Alon Muroch
Hey Eric, thanks for your reply. The scheme will work as a restfull service (i use tastypie) and is designed specifically to work for a bitcoin cloud backup service. The reason we want to implement such a scheme is so if the password is compromised, an attacker cant download the encrypted data

Re: Model to create forms

2015-01-09 Thread Lorenzo Bernardi
On 01/09/2015 10:39 AM, Timothy W. Cook wrote: I think you are looking for a way to provide an abstraction like this http://django-forms-builder.readthedocs.org/en/latest/ yes it looks like I'll have to do something like that. Or see if the data collected from the form can be put in a model.

What forms library do you pick for a new Project?

2015-01-09 Thread Frank Bieniek
Hi All, I do need a recommendation for the current top notch forms library to use for a new bigger project? The project does not have that much of planned ajaxified forms... django-crispy-forms 1.4 - 2013 django-floppyforms 1.3 - dec 2014 django-bootstrap3 5.0.3 - dec 2014 Which one would you

Migrating from OneToOneField to ForeignKey in Django models

2015-01-09 Thread Maciej Szopiński
Hi everyone, I've encountered an issue when working with django and I can't seem to find a way out of this.. I am using django 1.7.2 and a MySQL database. I have a model that was using a One-to-One relationship with two other models. At first I thought, the One-to-One relationship will be

Re: Filter_horizontal, applying filter on the right box - chosen items

2015-01-09 Thread Collin Anderson
Hi, I mis-read. Sorry. You're looking for a text field above the right box so you can more easily search for items in that box. I have not seen that done before. If nothing else you could try setting it up as an Inline and raw_id_fields. Collin On Thursday, January 8, 2015 at 2:04:29 PM

Re: [HELP] Custom 2 step authentication where the user's password is a public key

2015-01-09 Thread Erik Cederstrand
> Den 09/01/2015 kl. 12.28 skrev Alon Muroch : > > Hey everyone, i've been thinking of implementing the following custom > authentication scheme: > • User generates a public and private key pair > • when creating a new user, the user name is as usual but the

raise AppRegistryNotReady("Models aren't loaded yet.") .......AppRegistryNotReady: Models aren't loaded yet.

2015-01-09 Thread Ibrahim K
Hi friends, I am new to django enivorment ... while using pyhton shell window for developing poll app,I got too many errors in console window...pls give the solution and thanks for advance... -console -- Traceback (most

[HELP] Custom 2 step authentication where the user's password is a public key

2015-01-09 Thread Alon Muroch
Hey everyone, i've been thinking of implementing the following custom authentication scheme: 1. User generates a public and private key pair 2. when creating a new user, the user name is as usual but the password is the public key (in clear hex) 3. For login: 1. the user asks

Rearding django

2015-01-09 Thread Siddharth Singh
Hi I am new in django. I want to develop a website using django framework. so, can anyone suggest me how will i approach which will fruitful for. And which tools should i used ? Thanks, Siddharth -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Django modify model instance from HTML

2015-01-09 Thread Tobias Dacoir
Thanks for the answer. I will implement an AJAX call to another url / view than. This I should be able to figure out using a Button and Google. The URL can be anything like /settings/autoplay/. The view just has to update the property (user object should be in the request already). However,

Re: Return to the requested page after successfull @login_required by the next variable

2015-01-09 Thread Vijay Khemlani
Add the "next" variable as part of the form in a hidden field ... other fields... and then you can get it in the view that handles the login Also, you seem to have a form object, why don't you use "form.as_p" or something like that to render the form? On Fri, Jan 9, 2015 at 2:02 AM,

Re: Django modify model instance from HTML

2015-01-09 Thread James Schneider
You'll need to look into JavaScript or one of the JS libraries such as JQuery to implement the functionality you want. The JS will fire off a request back to Django to make the update at the moment the box is checked. You can use the same view with some complicated logic, but I would recommend the

Re: Deploying Django on Docker

2015-01-09 Thread Anssi Kääriäinen
On Thursday, January 8, 2015 at 1:20:39 PM UTC+2, Mike Dewhirst wrote: > > Have you seen Mezzanine fab deployment? Ken Bolton has blogged about it > ... > > http://bscientific.org/blog/mezzanine-fabric-git-vagrant-joy/ > Seems interesting. I have to play with it. The biggest issues for me

Re: Deploying Django on Docker

2015-01-09 Thread Anssi Kääriäinen
On Thursday, January 8, 2015 at 2:28:25 PM UTC+2, Jeroen Bakker wrote: > > Hi Anssi, > > Not really an answer to your question, but just to give you insight to a > solution. > > We at l1nda are using docker and django with small applications and large > applications. > > We developed an nginx

Re: Model to create forms

2015-01-09 Thread Timothy W. Cook
I think you are looking for a way to provide an abstraction like this http://django-forms-builder.readthedocs.org/en/latest/ On Thu, Jan 8, 2015 at 6:52 PM, Lorenzo Bernardi < lorenzo.berna...@lpn.cnrs.fr> wrote: > > Hello, > >> this is what _relational_ databases are built for. if you have

Django modify model instance from HTML

2015-01-09 Thread Tobias Dacoir
I want to know if it is possible to directly modify and save a model instance in the HTML Template and not via a view and extra URL. My user has a Boolean Property, I want to display it as a toggle button on the website and the user should be able to toggle it on or off without leaving