Django 1.11 admin Bug!! list_filter get duplicated in other models admin

2018-05-29 Thread ebuild
This is happening only after updated to from 1.8 to 1.11, using Eclipse. I have multiple model admin with different list_filter, what is happening is that when I go to* modelA admin* page which has* list_filter* and then navigate to *modelB admin* I got the list_filter of *modelA *displayed inst

Re: money field question

2018-05-29 Thread Mike Dewhirst
On 29/05/2018 10:10 PM, Melvyn Sopacua wrote: On dinsdag 29 mei 2018 11:03:56 CEST Mike Dewhirst wrote: > Also, despite using decimal.Decimal under the covers it wants its money > as strings. > > Python 3.6.3 > > >>> from money import money > >>> print(money.Money(23.45, 'AUD')) > > AUD

Re: Problem in part 6, CSS doesn't work

2018-05-29 Thread Vijay Khemlani
That's only for production environments, for development you don't need to run that command Where did you finally put the css file and what path did you put in the tag? On Tue, May 29, 2018 at 1:46 PM Mikko Meronen wrote: > Hi, > > Thank you, but I should have those correct. > > I did some goo

RE: How to get the primary key of the underlying model in a ModelForm?

2018-05-29 Thread Matthew Pava
You can access self.instance, which should have all the fields populated for that model instance. So you can access it via self.instance.pk. Keep in mind, though, that if you are creating the Document, you will not have a pk until after the save is committed, so it won’t be accessible in the cl

How to get the primary key of the underlying model in a ModelForm?

2018-05-29 Thread Mark Phillips
I have a model, Document, and an associated DocumentForm(forms. ModelForm), and a DocumentAdmin(admin.ModelAdmin). In the clean method of the DocumentForm, I need to get the document_id (ie primary key) of the underlying Document, but it is not included in the field set for that form. I need the pr

Re: Good afternoon, I need help to generate a PDF of my models in DJANGO

2018-05-29 Thread ALDO JAVIER VIGUERAS
Thanks for help me give me idea where is problem i'm will try it different from but when i finished will put it -- 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

Re: Good afternoon, I need help to generate a PDF of my models in DJANGO

2018-05-29 Thread Julio Biason
"pruebapdf() missing 1 required positional argument: 'DesdeJango'" Your view have an additional parameter, which is not used by views; views always receive the "request" and then the list of parameters in your URL definition (which does not have any parameters). So you need to remove it from the f

Good afternoon, I need help to generate a PDF of my models in DJANGO

2018-05-29 Thread ALDO JAVIER VIGUERAS
Hallo, I want to do a view to retur me a PDF with my models tah I have in models.py , I habe python 3 Django 2.11 and the models are in POSTGRESQL . The next is my code that a I have, but gived TypeError: pruebapdf() missing 1 required positional argument: 'DesdeJango' 'DesdeJango'= is model nam

Re: multidb, don't create one of them during unit tests

2018-05-29 Thread Rich Rauenzahn
On Tuesday, May 29, 2018 at 12:09:46 PM UTC-7, Rich Rauenzahn wrote: > > > Is this possible? How? > > Ah, found this thread which suggests just using sqlite locally... I'll give it a try: https://groups.google.com/forum/#!topic/django-users/jxkTmibjmX4 -- You received this message because you

multidb, don't create one of them during unit tests

2018-05-29 Thread Rich Rauenzahn
I'm using Django's (1.11) typical default db for my regular Django development, but I need to integrate with someone else's bugzilla db server running on mysql somewhere else (no web api available, mysql is the recommendation from them). So I've added a 2nd DB to my DB config pointing to th

Re: Problem in part 6, CSS doesn't work

2018-05-29 Thread Mikko Meronen
Hi, Thank you, but I should have those correct. I did some googling and ran following: python manage.py collectstatic And I got this: Django-project\lib\site-packages\django\contrib\staticfiles\storage.py", line 43, in path raise ImproperlyConfigured("You're using the staticfiles app " djan

Re: about the integration of Django with ionic

2018-05-29 Thread jean A
We can not integrate python code in ionic (Javascript) You can make a nice REST interface in django (django rest framework) and call it from Ionic in Javascript -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group an

Re: ValueError at /polls/1/vote/

2018-05-29 Thread Melvyn Sopacua
On dinsdag 29 mei 2018 14:07:59 CEST Caleb Bryson wrote: > def vote(request, question_id): > ... # same as above, no changes needed. You fell into the cut-and-paste-without-reading trap. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django use

Re: money field question

2018-05-29 Thread Melvyn Sopacua
On dinsdag 29 mei 2018 11:03:56 CEST Mike Dewhirst wrote: > Also, despite using decimal.Decimal under the covers it wants its money > as strings. > > Python 3.6.3 > > >>> from money import money > >>> print(money.Money(23.45, 'AUD')) > > AUD 23.449289457264239899814128875732421875

Re: ValueError at /polls/1/vote/

2018-05-29 Thread Caleb Bryson
How would I apply a return for my view here? from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404, render from django.urls import reverse from django.views import generic from .models import Choice, Question class IndexView(generic.ListView): template_name

Re: ValueError at /polls/1/vote/

2018-05-29 Thread Julio Biason
View require that you return an HttpResponse object. Your function does not (it probably even lacks a "return"). You need to return the response back in the view. On Tue, May 29, 2018 at 8:48 AM, Caleb Bryson wrote: > Hey i am getting this error now can anyone help me fix this? and what code >

Updating django database

2018-05-29 Thread Albin Antony
Hello guys, Sorry about the above no subject mail I am getting a json string(json_string) from frontend. How can we update the django database in views.py. Below is my models.py. models.py class Patient(models.Model): patient_id = models.CharField(primary_key=True, max_length=200) patient

Re: Problem in part 6, CSS doesn't work

2018-05-29 Thread s.f.wrobel via Django users
> > Make sure that you add the following line to your settings.py: INSTALLED_APPS = [ 'YOUR_APP_NAME', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ] In your case YOUR_APP_NAME s

about the integration of Django with ionic

2018-05-29 Thread sujan paul
I am a beginner in using Django and i'm integrating it to my ionic application . I have the python code and Ionic application but i need to know how can i integrate each other -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: money field question

2018-05-29 Thread Mike Dewhirst
On 29/05/2018 6:06 AM, Simon McConnell wrote: Work with what you've got (that being procrastination): http://www.structuredprocrastination.com You should see the pile of stuff I'm avoiding. It's worth a PhD in procrastination poswald/python-money does the same and looks interesting. Might

Flask-supermarket forms creation

2018-05-29 Thread subhani shaik
Hi.. group members. i am creating supermarket forms using flask and python with the help of jquery and ajax.but the problem is how can i design multiple forms.please give me suggestions.or else please give me the multiple forms. my form is like this Redumptionid userid receiptno like t