Re:

2019-02-21 Thread pradam
Hi, Have you ever referred Django Documentation? Link to refer: https://docs.djangoproject.com/en/2.1/intro/tutorial02/ On Thu, 21 Feb, 2019, 1:41 PM bhushan patil I am running this command python manage.py makemigrations polls but it is > showing that django.db.models has no attribute model.pl

Re: Posting data from templates to views.py without using forms.

2019-01-01 Thread pradam
Hi Surjeet, Then you should rely on ajax call or angularjs using ng-click. On Tue, Jan 1, 2019 at 8:16 PM Surajeet Das wrote: > Well , I want to post data from templates to views.py by clicking a button > without using forms. Basically the button should not be of type submit > because I don't w

Re: Posting data from templates to views.py without using forms.

2019-01-01 Thread pradam
Hi Surjeet, Then you should rely on ajax call or angularjs using ng-click. On Tue, Jan 1, 2019 at 8:16 PM Surajeet Das wrote: > Well , I want to post data from templates to views.py by clicking a button > without using forms. Basically the button should not be of type submit > because I don't w

Sqlalchemy json column - how to perform filter based on list of ids on a key

2018-10-08 Thread pradam
I have a list of ids like: tracker_ids = [69, 70] I need to get all the APInformation objects based on the tracker_id. data looks like this: { 'tracker_id' : 69, 'cpu_core_avg': 89.890', 'is_threshold': true,'datetime':1539053379040 } { 'tracker_id' : 70, 'cpu_core_avg': 65.0', 'is_threshold':

Re: how Upload image in django and how to read file dimensions

2018-05-10 Thread pradam
data = request.FILES.get('file') from django.core.files.images import get_image_dimensions from PIL import Image im = Image.open(data) ---> No Quotes just pass the data here. On Thu, May 10, 2018 at 7:31 PM, arvind yadav < developer.arvind2...@gmail.com> wrote: > my views.py in admin.py fil

Re: import error

2018-02-05 Thread pradam
Bro, do it like this: from *your_app_name* import views On Mon, Feb 5, 2018 at 6:54 PM, sarvit sarvit wrote: > Hello > I importing error > Please help me > from django.shortcuts import render > from django.conf.urls import url > from django.contrib import admin > from django.urls import path > f

Re: How to convert Queryset to String?

2018-01-02 Thread pradam
get_object = get_object_or_404(Title, title=title) if get_object: print(get_object.title) or title = Title.objects.filter(title=title) if title: print(title[0].title) On Tue, Jan 2, 2018 at 3:00 PM, Joshua O. Morales < joshuao.morale...@gmail.com> wrote: > title = Title.objects.filte

Re: Possible bug: OutputWrapper: TypeError: write() argument must be str, not bytes

2017-12-29 Thread pradam
hi, i think your trying to write bytes instead of str. please have look at below example it might help you: name = b'i_m byte bro' print(name.decode('utf-8')) // just decode the byte to str o/p: i_m byte bro On Fri, Dec 29, 2017 at 2:29 PM, emi wrote: > Hello all! > I'm new to the list and mo

Re: why is a text not displayed?

2017-12-21 Thread pradam programmer
Change to this: path('^$', views.index, name='index'), On Thu, Dec 21, 2017 at 5:21 PM, wrote: > I made this along a tutorial. > However > > "Hello, world. You're at the blog index." > > is not displayed. > > """blog/views.py""" > from django.http import HttpResponse > > > def index(request):

Re: No Reverse Match Exception

2017-12-17 Thread pradam programmer
>From this: Update Change to this: Update On 17-Dec-2017 2:00 PM, "yingi keme" wrote: > The problem is that, it works perfectly when i put the number on the > template like this > > Update > > But when i do > > Update > > It gives the No Reverse Error. I dont seem to understand why > > Yingi Kem

Re: typeerror : context must be a dict rather than Context.

2017-12-12 Thread pradam programmer
c = template.Context({'now': now}) html = t.render(c) # Just pass {'now': now} instead of c On Tue, Dec 12, 2017 at 5:08 PM, Al Scham wrote: > Hi, > > I'm am new to django and am workng through the OverIQ tutoiral at : > https://overiq.com/django/1.10/loading-templates-in-django > > I have follo

Re: Converting any Graphical Chart(pie-chart, gantt chart) into image dynamically.

2017-11-27 Thread pradam programmer
Thanks alot Derek..I will try this package. On 27-Nov-2017 7:45 PM, "Derek" wrote: > Try reportlab: > > https://docs.djangoproject.com/en/1.11/howto/outputting-pdf/ > #write-your-view > https://www.blog.pythonlibrary.org/2016/02/18/reportlab-how- > to-add-charts-graphs/ > https://www.reportlab.c

Converting any Graphical Chart(pie-chart, gantt chart) into image dynamically.

2017-11-27 Thread pradam programmer
Hi Guys, I want to convert an graphical chart,for an Ex: pie-chart,gantt chart into an image in a real time and display it in a PDF Document dynamically. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop re

Re: How to get JOSN Field key value using values()

2017-06-08 Thread pradam programmer
Hi Mallik, Write a Custom Method to do it. On Thu, Jun 8, 2017 at 3:21 PM, Mallik Sai wrote: > I have a JSON Field in my model and I want to get a particular Key value > which is present in the JSON Field using values(). > > lets assume my JOSN Field data is like { 'key1':value1 , 'key2':value2

Deactivate the Child Objects when parent is deactivate.

2017-05-28 Thread pradam programmer
from django.db.models import QuerySet import attr from attr.validators import instance_of @attr.s class ChildDeactivate(object): loca = attr.ib(validator=instance_of(QuerySet)) def deactivate_child(self,l): get_parent = Boundary.objects.filter(parent__id=l.id) if get_paren

Re: it says there is no module django when im trying to configure urls. please help

2017-04-20 Thread pradam programmer
Hi Anusha, Make sure django is package is installed. On Fri, Apr 21, 2017 at 3:15 AM, sri anusha wrote: > C:\Users\srian\AppData\Local\Programs\Python\Python36\python.exe > C:/Users/srian/internship/polls/urls.py > Traceback (most recent call last): > File "C:/Users/srian/internship/polls/urls

Re: Django allauth, manage redirect

2017-02-07 Thread pradam programmer
Hi, add this line in settings.py: LOGIN_REDIRECT_URL = "/my-tasks/" On Tue, Feb 7, 2017 at 2:09 PM, Branko Zivanovic < international11...@gmail.com> wrote: > I'm using django-allauth for authentication. I've enabled Facebook and > Google for social logins. How do I make redirect after first login

Re: New to the community

2017-02-07 Thread pradam programmer
hi, you can try this video tutorials its easily understandable https://www.youtube.com/playlist?list=PLEsfXFp6DpzQFqfCur9CJ4QnKQTVXUsRy On Tue, Feb 7, 2017 at 12:31 PM, Antonis Christofides < anto...@djangodeployment.com> wrote: > Hello, > > except for Django's official tutorial, which is quite

Re: Aggregation and following relationships backwards multiple levels

2017-02-01 Thread pradam programmer
Hi Patrick, you can do like this: def total(self): return ContractItem.objects.filter(contract__subbudget__budge__in= self.budget_set.all()).aggregate(Sum('total'))['total__sum'] try like this..! On Wed, Feb 1, 2017 at 7:14 PM, Patrick Joy wrote: > Hi all, > > Would appreciate some advi

Re: Aggregation and following relationships backwards multiple levels

2017-02-01 Thread pradam programmer
from django.db.models import Q def total(self): subbudgets = SubBudget.objects.filter() contracts = Contract.objects.filter(subbudget__in=subbudgets) return ContractItem.objects.filter(contract__subbudget__budget__in=self.budget_set. all()).aggregate(Sum('total'))['total__su

I want some guidance on Comments Table Structure

2017-01-11 Thread pradam programmer
Hi, I'm creating the Generic model for Comments i have following scenerios: 1. Comments conversion should happen between one to one. 2. Comments should show based on particular programs id. thank you. -- You received this message because you are subscribed to the Google Groups "Django users"

Re: What is the best combination of components to be used with Django on Windows 10?

2017-01-03 Thread pradam programmer
hi, Please Refer this Link https://www.toptal.com/django/installing-django-on-iis-a-step-by-step-tutorial On Mon, Dec 26, 2016 at 3:28 PM, James Bennett wrote: > On Mon, Dec 26, 2016 at 1:31 AM, Avraham Serour wrote: > >> http://lmgtfy.com/?q=django+deploy+iis >> >> > This is a rude and dismis

Re: understanding auth models

2017-01-02 Thread pradam programmer
Hi, Read the django doc about auth user they have specified thoroughly On 2 Jan 2017 7:48 pm, "Rasika" wrote: Hi, whenever I created the account for user using built in admin it get stored into auth_user tablein the database.Where I can find the code for this where the connections between the

Happy New Year 2017

2016-12-31 Thread pradam programmer
Happy New Year Guys, i hope this year fill with alot of love, happiness and Joy to everyone. -- 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+unsubsc

Re: Django stops working with RuntimeError: populate() isn't reentrant

2016-12-23 Thread pradam programmer
ate() isn't reentrant On Fri, Dec 23, 2016 at 1:46 PM, Babatunde Akinyanmi wrote: > How about the stack trace? > > On 22 Dec 2016 16:43, "pradam programmer" > wrote: > >> I restarted hundred times still can't able to rectify it >> >> O

Re: starting django

2016-12-22 Thread pradam programmer
just correct pools to polls in url On Thu, Dec 22, 2016 at 9:59 PM, Giovanni Oliverio wrote: > > Hello, I'm following the guide at the following link: > https://docs.djangoproject.com/en/1.10/intro/tutorial01/ but when I go to > call the page: http://localhost:8000/polls/ the result is the foll

Re: Django stops working with RuntimeError: populate() isn't reentrant

2016-12-22 Thread pradam programmer
I restarted hundred times still can't able to rectify it On 22 Dec 2016 9:07 pm, "ADEWALE ADISA" wrote: Restart the server On Dec 22, 2016 4:27 PM, "pradam programmer" wrote: > Hi Guys, > I am unable to rectify this error I am doing the following things: &

Django stops working with RuntimeError: populate() isn't reentrant

2016-12-22 Thread pradam programmer
Hi Guys, I am unable to rectify this error I am doing the following things: 1. I am running the project in django 1.7 later upgraded to 1.7.11 to check whether I fix the issue but no use. :( 2. In settings.py I commented the allowed_host = [*] still no use :( I don't know why this error is coming..

Re: Issue with manage.py runserver

2016-12-04 Thread pradam programming
Hi, 1.Check any other file in directory by same name. 2.check __init__.py file is their in Root Project folder.. On 4 Dec 2016 8:04 pm, wrote: > I started a new project in Django today (actually my first django > project). Strangely when I run python manage.py runserver it does > absolutely noth

Re: Migrations and multiple databases

2016-11-24 Thread pradam programming
Yes do the same. On Thu, Nov 24, 2016 at 11:16 PM, odd hogstad wrote: > db1 holds the auth stuff already. Do I need to also have it in db2 for the > migrations to work? > > torsdag 24. november 2016 12.22.14 UTC+1 skrev pradam.programming følgende: >> >> hi Hogstad, >> Before doing app migrate p

Re: Migrations and multiple databases

2016-11-24 Thread pradam programming
hi Hogstad, Before doing app migrate please python manage.py migrate auth ==>I hope this will solve the issue On Thu, Nov 24, 2016 at 3:54 PM, odd hogstad wrote: > I have two databases in my project, db1, which changes quite frequently, > and db2, which seldom changes. The app was original writt

Re: help for creating relationship between User model an another model !!

2016-11-23 Thread pradam programming
Hi, Please refer this link. http://stackoverflow.com/questions/34473323/typeerror-int-argument-must-be-a-string-a-bytes-like-object-or-a-number-not On 23 Nov 2016 9:55 pm, "adonis simo" wrote: > Thanks for looking > This is the whole stack trace : > Operations to perform: > Apply all migration

Re: Upload Images from Remote Server

2016-11-22 Thread pradam programming
e an error, like no such file, django should > print a stacktrace in the log. It's a list of all the function that > django called before getting the error. That help a lot when dealing > with error. > > 2016-11-22 12:15 GMT+01:00 pradam programming < > pradam.progra

Re: Upload Images from Remote Server

2016-11-22 Thread pradam programming
gt; 2016-11-21 14:09 GMT+01:00 pradam programming < > pradam.programm...@gmail.com>: > > hi Guys, > > 1.I have Created an API which store images into database just giving > image > > path but issue is when i remotely upload image using API i will get the > &

Upload Images from Remote Server

2016-11-21 Thread pradam programming
hi Guys, 1.I have Created an API which store images into database just giving image path but issue is when i remotely upload image using API i will get the following error show no such file or Directory eg: [ {'name':'foo','date':'2016-11-21','organization_name':'buzz','description':'Abhilash','im

Re: Rest Framework and Swagger

2016-11-07 Thread pradam programming
Hi Tom, I have Implemented Swagger for CBV but i dont know how to do it for FBV..? Please Help me out..!! On Mon, Nov 7, 2016 at 4:14 PM, Tom Christie wrote: > https://github.com/marcgibbons/django-rest-swagger > > > On Saturday, 5 November 2016 16:17:10 UTC, pradam.programming wrote: >> >> Hi G

Rest Framework and Swagger

2016-11-05 Thread pradam programming
Hi Guys, Please I need an advice on the best approach to take on the following issues. How can i Implement Swagger for CBV and FBV in rest framework ...? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop r

SQLAchemy

2016-11-02 Thread pradam programming
hi, I am new to SqlAchemy.My questions are as follows: 1.When i write tables in sql achemy format i can't able to do makemigrations and migrate..? 2.In SqlAchemy Explicitly i need to specify database whenever i do CRUD operations ? 3.Whats the main advantage over SQLAchemy vs Django OMR.? -- You

Re: Form Saving Related Issues

2016-11-01 Thread pradam programming
and send a > reply with yes or no. > > 2016-11-01 3:30 GMT+01:00 pradam programming >: > > Thank you sir for the reply.. > > But I am using HTML forms then what should I do...? I want error message > > should display instantly when user enter existing mail id..!

Re: Form Saving Related Issues

2016-10-31 Thread pradam programming
gt; success message that will get added to whatever page you're redirecting to > (as long as you make sure your template is rendering messages) -> > https://docs.djangoproject.com/en/1.10/ref/contrib/ > messages/#adding-a-message > > On Mon, Oct 31, 2016 at 1:55 AM, pradam prog

Form Saving Related Issues

2016-10-31 Thread pradam programming
id if email id exists in database show message like email id exists beside the email text field(also for the mobile no) else proceed with form. 2.After i saving the form i need to show alert of success. regards, Pradam Abhilash -- You received this message because you are subscribed to the

Re: Migrating custom mysql application to django orm

2016-10-30 Thread pradam programming
hi Yasar, create_dic_of_searchterm = {'searchabletext_id':1,'term':'this'} SearchTerm.objects.create(**create_dic_of_searchterm) you can do like above On Sat, Oct 29, 2016 at 9:33 PM, Yaşar Arabacı wrote: > Hi, > > I am trying to migrate my mysql application into django orm. I need help > co

Re: WOrking with checkbox Multiple Select FIeld - Django Admin

2016-10-30 Thread pradam programming
try to to get all the checked objects using getlist from request store it in a textfield.this is better when you have 20 check boxes then code become too complex and messy On Sun, Oct 30, 2016 at 10:55 AM, M Hashmi wrote: > Form ModelForm if you need to check a single field then you set it as >