Re: Using External HTML files in Django

2022-05-03 Thread Santhosh sridhar
Thanks Mike. It worked ! On Tuesday, May 3, 2022 at 9:32:26 AM UTC+5:30 Mike Dewhirst wrote: > On 3/05/2022 8:44 am, Hazho Human wrote: > > Why not serving that specific URL with Nginx or Apache? > > On Tue, 3 May 2022 at 03:15, Santhosh sridhar > wrote: > >> Hi,

Using External HTML files in Django

2022-05-02 Thread Santhosh sridhar
Hi, I have few html files which are not part of my django project templates directory. I want to render these html files as a response into some url. Could someone help if you have any idea? I tried using {% include %} and it gave TemplateDoesNotExist error. -Santhosh -- You received this

Count the number of emails sent everyday

2020-03-13 Thread Santhosh sridhar
Hi, I am working on django and I trigger emails to multiple email IDs in different scenarios, Is there a way to get the count of emails sent everyday instead of storing it in tables. Regards, Santhosh -- You received this message because you are subscribed to the Google Groups "Django users"

Error while adding entries through django admin

2020-03-02 Thread Santhosh sridhar
Hi, I have registered a model in my django admin page. When I click the Add link, it throws me this error, Invalid block tag: 'change_list_object_tools', expected 'endblock' *django.template.base.TemplateSyntaxError: . I could not get any solution. Appreciating someone's help.* *Regards,* *S

Django values_list queryset returns queryset object instead of list

2020-02-26 Thread Santhosh sridhar
Hi, I have a table named View, I'm filtering values like this : views = View.objects.all().values_list('name',flat=True).order_by('id') I get the output as instead of list of the names. So I face error when try to parse it in jquery : jQuery.parseJSON(JSON.stringify("{{views|safe}}".replace(/'/

Invalid Literal for int() with base10 error

2020-02-11 Thread Santhosh sridhar
I have a model called Project, class Project(models.Model): name = models.CharField(max_length=50, unique=True) technology = models.ForeignKey(Technology, related_name='projects',on_delete=models.CASCADE) chipName = models.CharField(max_length=50) is_swarm = models.NullBooleanFi

Upgrading django from 1.8 to 2.2.0

2020-01-31 Thread Santhosh sridhar
Hi, Im upgrading my django project from 1.8 to 2.2.0. I have done the below changes. 1. Added on_delete to all the Foreign Key fields 2. Changed the url reverse import as from django.urls import reverse 3. Included path/re_path instead of url in all the app's url files. 4. Changed the MIDDLEWARE

django-request to log user statistics

2020-01-30 Thread Santhosh sridhar
Hi All, I am trying to use django_request module to login the user statistics. I have two versions of django-request 1.5.2 and 1.5.5 installed and I could see both the egg files inside site-packages directory. But when I tried to use 'request' in my INSTALLED_APPS settings I am getting an error.

Create Dashboard for CSV data

2020-01-20 Thread Santhosh sridhar
I have a csv file : each line having some inputs and some status. I need to read this csv file and present the data as a dashboard with some charts. I came across to use chart js plugin. Is there any better approach? -- You received this message because you are subscribed to the Google Groups

specefic field(s) for each query.

2020-01-11 Thread Santhosh sridhar
You can query like this in Django, say A is the table name and B is the columns. A.objects.all().values('B') or A.objects.all().values_list('B',flat=True) Regards, San -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this g

specefic field(s) for each query.

2020-01-11 Thread Santhosh sridhar
You can query like this in Django, say the table name is A and column name is name. A.objects.all() will give all the objects and A.objects.filter(name='Django') will give all the objects whose name is Django. -- You received this message because you are subscribed to the Google Groups "Django

Integrate Django with React

2020-01-03 Thread Santhosh sridhar
Is there a way to integrate React JS framework with Django? How to do that? What is the advantage of using such frontend frameworks over normal ajax? Any help or explanation would be helpful. Thanks! -- You received this message because you are subscribed to the Google Groups "Django users" grou

Prefill Checkboxes and send values to backend

2020-01-02 Thread Santhosh sridhar
Hi, I have a multiselect drowdown. I want to display the selected values from a drop-down in a separate div as rows with multiple checkboxes to select. I have tried this code in JSFiddle, jsfiddle.net/k7nL3s2z . Please let me know if there is any better approach. I need to pass this data(Selec

Display Multiselect bootstrap drop-down value in div with checkbox options

2019-12-27 Thread Santhosh sridhar
Hi, I have a multiselect bootstrap drowdown. I want to display the selected values from a drop-down in a separate div as rows with multiple checkboxes to select. How I can proceed for this? Like I have selected 3 items(I1,I2,I3) from dropdown then i should display all the three items as rows wi

How to use django-request module to log all the user activities in a table?

2019-12-26 Thread Santhosh sridhar
I'm using Django 1.8 version. Need to know how to use django-request or any other module to capture the all the user activities of a website. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emai

Integrate React with Django

2019-12-24 Thread Santhosh sridhar
Is it possible to integrate React Js framework with Django? What is the advantage of using react over Ajax with Django? Any example would help me. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receivin

Embed an image in email Django

2019-12-17 Thread Santhosh sridhar
Hi, I am using Django's EmailMessage module to trigger an email with embedded image from the static directory path. Somehow the image is not rendering properly in the triggered email. Please find the below code and appreciating your help. Thanks, Santhosh *Code:* recipient_list = ['a...@gm

Embed an image in email Django

2019-12-17 Thread Santhosh sridhar
Hi, I am using Django's Email message module to trigger an email with an embed image from my static folder. Could someone help? Below is the code that I have used. Code : recipient_list = ['a...@gmail.com'] from_email = 'a...@gmail.com' message = '' path = "{% static 'images/Wel