Re: Starting Django

2022-07-14 Thread Aadil Rashid
Just start learning from official django documentation On Thu, 14 Jul, 2022, 11:12 pm Manprit Singh, wrote: > Hi all , > > Just need to know , from where to start learning this Django frame work . > I have considerable knowledge of Python programming language and little > bit of using sqlite3

mysql 8 file creation issue

2022-03-17 Thread Aadil Rashid
When I run this query on mysql 5.7: SELECT CURDATE() INTO OUTFILE '/var/lib/mysql-files/test.csv'; It creates test.csv with the following permissions: -rw-rw-rw- 1 mysql mysql 11 Mar 18 04:27 test.csv But when I create the same file in mysql 8.0 it creates file with the following

CELERY CLASS BASED VIEWS

2022-03-08 Thread Aadil Rashid
i am using celery version 5.2.3, How can i register this class based task, and how can we name add name to this class based task, I would appreciate your valuable suggestions Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Login page getting downloaded as pdf instead of the other page url.

2022-02-06 Thread Aadil Rashid
Hello Django Family, I hope you all are well and in good Health. I am trying to generating pdf from webpages, using popen subprocess , but when i call its view it generates only login page as pdf, Here is my view from projName.settings import BASE_DIR from subprocess import Popen, PIPE,

Login page download as pdf instead of the other url page.

2022-02-03 Thread Aadil Rashid
Hello Django Family, I hope you all are well and in good Health. I am trying to generating pdf from webpages, using popen subprocess , but when i call its view it generates only login page as pdf, Here is my view from projName.settings import BASE_DIR from subprocess import Popen, PIPE,

Re: Downloading html as pdf using popen, headless chrome option

2022-02-01 Thread Aadil Rashid
f/request-response/#fileresponse-objects > > On Tue, Feb 1, 2022 at 11:26 PM Aadil Rashid wrote: > >> I am trying to generating pdf from webpages, using popen , but when i >> call this >> view it generates UnicodeDecodeError: 'utf-8' codec can't decode byte >> 0xd3

Downloading html as pdf using popen, headless chrome option

2022-02-01 Thread Aadil Rashid
I am trying to generating pdf from webpages, using popen , but when i call this view it generates UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd3 in position 10: invalid continuation byte This is my view from projName.settings import BASE_DIR from subprocess import Popen, PIPE, STDOUT

Re: Download html pages as pdf using headless Chrome

2022-01-29 Thread Aadil Rashid
Hello, Kasper Laudrup I really appreciate your idea, but i need to get this done only by using headless chrome. On Sat, Jan 29, 2022 at 10:40 PM Kasper Laudrup wrote: > On 29/01/2022 16.58, Aadil Rashid wrote: > > Hello Django Family, I came across the problem of downloading H

Re: Download html pages as pdf using headless Chrome

2022-01-29 Thread Aadil Rashid
ad the html on the page. > > On Sat, 29 Jan 2022, 21:29 Vishesh Mangla, > wrote: > >> Use requests for that . >> >> On Sat, 29 Jan 2022, 21:28 Aadil Rashid, wrote: >> >>> Hello Django Family, I came across the problem of downloading HTML pages >>> as pd

Download html pages as pdf using headless Chrome

2022-01-29 Thread Aadil Rashid
Hello Django Family, I came across the problem of downloading HTML pages as pdf using headless chrome, Can anybody here who could please let me know how can I do it or any good resource to follow, it would be appreciable. I am using Django python, Thank you very much. -- You received this

Re: order_by on the basis of time difference (updated_at - created_at)

2022-01-23 Thread Aadil Rashid
updated_at={example.updated_at} - dt_difference={example.dt_difference}') >>> >>> >>> >>> Em sex., 21 de jan. de 2022 às 10:54, Gabriel Araya Garcia < >>> gabrielaraya2...@gmail.com> escreveu: >>> >>>> Try this: >>>>

Re: order_by on the basis of time difference (updated_at - created_at)

2022-01-21 Thread Aadil Rashid
stores the difference between updated and created. > You can update that field whenever an object is updated. And then can run > order_by on that field directly > > > On Fri, 21 Jan 2022 at 10:24, Aadil Rashid > wrote: > >> class ExampleModel(models.Model): >> is_ac

order_by on the basis of time difference (updated_at - created_at)

2022-01-20 Thread Aadil Rashid
class ExampleModel(models.Model): is_active = models.BooleanField(default=True) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) I want to query on UserModel such that the Query set which I get should be orderable in terms of time difference

Order_by on the basis of time difference:

2022-01-20 Thread Aadil Rashid
class UserModel(models.Model): is_active = models.BooleanField(default=True) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) I want to query on UserModel such that the Query set which I get should be orderable in terms of time difference of

Re: Handling url in class based views.

2021-11-15 Thread Aadil Rashid
elf > > On Tue, 16 Nov, 2021, 9:40 am pankaj palmate, < > pankajpalmate61...@gmail.com> wrote: > >> def get(self, pk, *args,**kwargs ) : >> ...body.. >> >> On Tue, 16 Nov, 2021, 2:57 am Aadil Rashid, >> wrote: >> >>&

Handling url in class based views.

2021-11-15 Thread Aadil Rashid
Hello my dear Friends, I have a question regarding Class Based Views. If we have a url e.g, path('item//', views.funView) We can handle it in Function Based Views, By simply def funView(request, slug) : #logic return render(request, "tempName") We can even pass this slug as a

Django Permission

2021-10-05 Thread Aadil Rashid
I am creating custom permission in my Django myapp's module with the follwing code; from myapp.models import BlogPost from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType content_type = ContentType.objects.get_for_model(BlogPost)

Re: SChedule email

2021-07-01 Thread Aadil Rashid
Use *Django-celery* On Thu, 1 Jul, 2021, 6:23 PM divya murugulla, wrote: > HI, > > I wanted to schedule a email every jan and aug 6 monthly basis without > celery using settings.py. Can anyone help? > > once in every 6months mail should be triggered > > -- > You received this message because

Re: Error while creating an ecommerce website :PLEASE HELP!

2021-06-23 Thread Aadil Rashid
print this object... i am not getting anything... is > this function is not working? > > > On Wed, Jun 23, 2021 at 11:38 PM Aadil Rashid > wrote: > >> Pass I'd to the view you are you are using, >> And then get products thrid that I'd by simple ORM quriy >> >&

Re: Error while creating an ecommerce website :PLEASE HELP!

2021-06-23 Thread Aadil Rashid
Pass I'd to the view you are you are using, And then get products thrid that I'd by simple ORM quriy Product = model name.objects.get(id=id) On Wed, 23 Jun, 2021, 11:35 PM Parul., wrote: > Hi, > I am working on an ecommerce website. I am facing an error. Can anyone > please help me solve this

Re: looking for an expert django developer

2021-05-22 Thread Aadil Rashid
Hello reyan, I saw your advertisement, and I am ready to work with you. You can mail me on aadil1...@gmail.com For further enquiries. Thanks & Regards Aadil Rashid Najar On Sat, 22 May, 2021, 4:41 PM Eng. Medson Naftal, wrote: > Hello, > > My name is medson, Am doing django,

Re: After user click on like button page should not refresh(redirect) and update count of likes

2021-05-05 Thread Aadil Rashid
You need write Ajax for this functionality to implement On Wed, 5 May, 2021, 6:40 PM Derek, wrote: > You'll need to use javascript for this - have a look at > https://data-flair.training/blogs/ajax-in-django/ for an example. > > On Wednesday, 5 May 2021 at 05:30:59 UTC+2