Re: Dev Server Response

2019-02-14 Thread Karen Tracey
On Thu, Feb 14, 2019 at 8:12 PM wrote: > Maybe a dumb question, but I can't find it anywhere in the documentation. > I'm running an API with the development server and get a response from it > in the console like: > > [14/Feb/2019 15:45:11] "GET /api/v1/msgs HTTP/1.1" 200 405 > > 200 OK is the st

Re: Django update field in many to many relationship

2019-02-14 Thread sum abiut
Thanks, The Leave_current_balance is from Leave_Balance model which why i haven't included it. I am not sure how to fix that. Sum On Fri, Feb 15, 2019 at 12:42 PM Simon Charette wrote: > Your DirectorForm model form doesn't include 'Leave_current_balance' in > it's Meta.fields > hence no form fie

Re: AuthenticationForm 'data' keyword argument?

2019-02-14 Thread james . peter . schinner
So I should be using: form = AuthenticatioForm(request) It seems odd that the signature for various form aren't the same, at least in respect to *args. **kwags I can understand being different. Regardless I wanted to highlight a gotcha that wasn't immediately obvious. Also, I received no erro

Dev Server Response

2019-02-14 Thread jason . cumiskey
Maybe a dumb question, but I can't find it anywhere in the documentation. I'm running an API with the development server and get a response from it in the console like: [14/Feb/2019 15:45:11] "GET /api/v1/msgs HTTP/1.1" 200 405 200 OK is the status code, what is the 405? I'll wager it's the RTT

Re: Is there a package for user-tagging and user-properties?

2019-02-14 Thread Simon A
This might not be a package but django allows to extend the User object via a one to one relationship. Once extended, you can add as many fields as you like. It will be better though if this will happen at the start of the project. Using this method at the middle of the project might cause a lot

Re: Django update field in many to many relationship

2019-02-14 Thread Simon Charette
Your DirectorForm model form doesn't include 'Leave_current_balance' in it's Meta.fields hence no form field is generated for it. Cheers, Simon Le jeudi 14 février 2019 17:50:21 UTC-5, suabiut a écrit : > > Hi, > > I have two models many to many relationships, I am trying to update the > field

Re: Django update field in many to many relationship

2019-02-14 Thread sum abiut
TraceBack: Request Method: POST Request URL: http://127.0.0.1:8000/unitDirectorForm/25/ Django Version: 1.11.18 Python Version: 2.7.15 Installed Applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages',

Django update field in many to many relationship

2019-02-14 Thread sum abiut
Hi, I have two models many to many relationships, I am trying to update the field using a form. when a leave is submitted the director is notified by email. the director can login to the system to approve the leave using the form. once the leave is approved, I want to adjust the Leave_current_bala

Re: Image Upload in admin panel

2019-02-14 Thread Akash Purandare
Hey Surajeet At first, you will need to create a model with the Field `ImageField`(do not forget to install pillow using `pip install pillow`) in the models.py of your app. Then, you will need to register that model to admin.py of the app and then start the webserver. So, you will be able to se

Multiple databases in django with admin

2019-02-14 Thread Ramesh Mahajan
I am working on a project for multiple tenants. So i want to multiple databases. But i will be using django built-in auth app. I want to know what changes I should do in admin panel so that whenever admin is creating user it goes and sits in the respective databases. Thank in advance. -- You r

Image Upload in admin panel

2019-02-14 Thread Surajeet Das
How do I upload images from admin panel and retrieve from a html page ? -- 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: Messages rejected?

2019-02-14 Thread Tim Graham
I don't know what happened. I doubt that the message was rejected by a moderator. On Wednesday, February 13, 2019 at 5:49:39 PM UTC-5, Anton Melser wrote: > > Thanks for the reply. I thought there might be a moderation queue (I never > made it as far as the dedicate list docs). I would be quite

Re: AuthenticationForm 'data' keyword argument?

2019-02-14 Thread Tim Graham
>From the docs for AuthenticationForm: "Takes request as its first positional argument, which is stored on the form instance for use by sub-classes." https://docs.djangoproject.com/en/dev/topics/auth/default/#django.contrib.auth.forms.AuthenticationForm On Thursday, February 14, 2019 at 7:47:23

AuthenticationForm 'data' keyword argument?

2019-02-14 Thread james . peter . schinner
Hi, I have just been following the Django documention on forms: https://docs.djangoproject.com/en/2.1/topics/forms/ And I was having an issue with validating the posted data in the view code. I came across this Stack Overflow post : https://stackoverflow.com/questions/45824046/djangos-authent