How can I add attrs in ModelChoiceField?

2017-07-31 Thread 李余通
Hello,Everyone, I know charField can use forms.TextInput(attrs={'class' : 'form-control', }), or forms.Textarea(attrs={'class' : "form-control", 'rows' : 3 , }) to set widgets but ModelChoiceField? I have no idea,Django telled me "'module' object has no

Re: Dos Modelos en un formulario django

2017-07-31 Thread angel . gabriel . ma
Hola que tal. Si es posible. Checa este video : https://codigofacilito.com/videos/18-curso-django-crud-con-dos-formularios-parte-2 Creo que es lo que buscas. Saludos. On Thursday, July 27, 2017 at 5:38:43 PM UTC-5, Nelson Fernando Garcia Gomez wrote: > > hola Buenas soy algo nuevo en

Re: Getting response code 302 instead of 200 while testing a url

2017-07-31 Thread Mannu Gupta
Hi James, Thanks for the reply! As in the setup function for my tests i have already created a Post object then how just visiting a url i.e '/update/' and 'delete/' of that object can be a considered 'POST' request. Also Is there any way to capture the inbetween changing process of status code

Embed template of app inside page

2017-07-31 Thread MPY
Hi everyone I create an app call account to manage users on my website, I create using the Django authentication system, this app works fine, I can log in, register, change the password and edit the user. I have a link to register and log in, but now I want to show to register form in a normal

Re: Django form needs pagination and saved data - how????

2017-07-31 Thread Jim Illback
Super advice - thanks very much, James! Appreciate your help. Jim On Jul 30, 2017, at 5:55 PM, James Schneider > wrote: On Jul 30, 2017 4:50 PM, "Jim Illback" > wrote: Thanks for your

Re: failed of installing MySLQ

2017-07-31 Thread James Bennett
Personally I'd go with SQLite first. Every additional thing you require someone to learn up-front is another obstacle in their path; they can learn how ot manage MySQL or PostgreSQL later on, but first they need to be able to learn about Django. -- You received this message because you are

Re: Error message on 'django.urls.exceptions.NoReverseMatch'

2017-07-31 Thread ron_w_add via Django users
Hello James Thanks for your help. That solved the problem. Ron > > -- 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.

Re: failed of installing MySLQ

2017-07-31 Thread Mark Phillips
I don't completely agree with Antonis. If you want MySQL in production, you will have to learn how to install it an use it at sometime. With that said, you will probably get more help with installing MySQL in a MySQL forum. Check these out - https://forums.mysql.com/. The Newbie forum or the

Re: Group Permissions programmatically

2017-07-31 Thread Frank Semaganga
Hello Thank you for the suggestion! Let me adapt the approach and see. Regards Sent from my iPhone > On Jul 31, 2017, at 20:28, Александр Христюхин (roboslone) > wrote: > > Hi, > > Why don't you use the same approach that is generally used with users? I mean > you

Re: Group Permissions programmatically

2017-07-31 Thread Александр Христюхин (roboslone)
Hi, Why don't you use the same approach that is generally used with users? I mean you connect a signal to your User/Group model, that changes permission for created objects, like so: @receiver(post_save, sender=settings.AUTH_USER_MODEL) def create_user_permissions(instance=None, created=None,

Re: failed of installing MySLQ

2017-07-31 Thread Antonis Christofides
Hello, since you aren't experience, start easier and use SQLite. Mostly everyone (even the experienced people) usually use SQLite in development. Regards, Antonis Antonis Christofides http://djangodeployment.com On 2017-07-30 15:46, ahagbes89 wrote: > I have not much experiences in Python. I

Group Permissions programmatically

2017-07-31 Thread Frank Semaganga
Hi! I am having a challenge . My aim is to be able to assign some group permissions when the group is created. In admin.py I have a custom GroupAdmin class on which I have the function save customized but the challenge is everything else get saved and reflected on admin page including user