Filter questions with dates

2022-10-25 Thread Lakshyaraj Dash
I'm having a forums project in which I want to add a date filter for
questions like when a user clicks on a specific date the questions related
to the date will be filter like 24 Dec 2021 will show 24122022...

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAF7qQgBCRchEC2-PP9sa5UU%3D1NKDc-u4F1tcmsL4d1cdV11rWQ%40mail.gmail.com.


Re: Django call_command from Admin

2022-10-25 Thread Aziz Mek
Hi Mike,

Many thanks for the heads and up and confirmation that it can be done, much 
appreciated

Kind regards
Aziz

On Wednesday, October 26, 2022 at 12:16:00 AM UTC+1 
mikeol...@open4businessonline.com wrote:

> Aziz,
>
> I had a similar need and I created my own middleware that checked the 
> request path and did the call when I got a match.  
>
> See https://docs.djangoproject.com/en/4.1/ref/middleware/
>
>
>
>
> *Mike Oliver** Founder**, Open 4 Business Online*
> Tel: +1(951)260-0793 <(951)%20260-0793> | Mobile:**NEW* 639479927462
> US Toll free: 1-800-985-4766 <(800)%20985-4766> **NEW*
> http://www.o4bo.com
> Mas marunong akong umunawa ng salitang tagalog kaysa magkapagsalita nito 
> [image: Facebook] 
>  
> [image: 
> Twitter]  [image: LinkedIn] 
>  [image: AngelList] 
>  [image: Blogger] 
>  [image: eBay] 
>  [image: YouTube] 
>  [image: Google 
> Plus Page] 
> Contact me: [image: Google Talk] mikeol...@open4businessonline.com [image: 
> Skype] MikeOliverAZ
>
>
>
> On Fri, Oct 21, 2022 at 12:06 AM Aziz Mek  wrote:
>
>> Hi All,
>>
>> I was wondering  if you have come across the following:
>>
>> I have a field in the model that's empty, when the user fills it up and 
>> clicks Save, it
>> should trigger/call a management Command (This command is already build 
>> that sends emails ), Django docs say i can use call_command but not sure 
>> how to implement it with the save
>>
>> I am just after the trigger really when the save takes place
>>
>> Many thanks in advance
>>
>> Kind regards
>> Aziz
>>
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/a0ca69f0-6065-4b86-a977-cfb6dcab8fd7n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1de3fda8-162e-4b83-b740-b65cea41eaf4n%40googlegroups.com.


Re: Django call_command from Admin

2022-10-25 Thread Mike Oliver
Aziz,

I had a similar need and I created my own middleware that checked the
request path and did the call when I got a match.

See https://docs.djangoproject.com/en/4.1/ref/middleware/




*Mike Oliver** Founder**, Open 4 Business Online*
Tel: +1(951)260-0793 | Mobile:**NEW* 639479927462
US Toll free: 1-800-985-4766 **NEW*
http://www.o4bo.com
Mas marunong akong umunawa ng salitang tagalog kaysa magkapagsalita nito
[image: Facebook]
 [image:
Twitter]  [image: LinkedIn]
 [image: AngelList]
 [image: Blogger]
 [image: eBay]
 [image: YouTube]
 [image: Google
Plus Page] 
Contact me: [image: Google Talk] mikeolive...@open4businessonline.com [image:
Skype] MikeOliverAZ



On Fri, Oct 21, 2022 at 12:06 AM Aziz Mek  wrote:

> Hi All,
>
> I was wondering  if you have come across the following:
>
> I have a field in the model that's empty, when the user fills it up and
> clicks Save, it
> should trigger/call a management Command (This command is already build
> that sends emails ), Django docs say i can use call_command but not sure
> how to implement it with the save
>
> I am just after the trigger really when the save takes place
>
> Many thanks in advance
>
> Kind regards
> Aziz
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a0ca69f0-6065-4b86-a977-cfb6dcab8fd7n%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAA2yvOHvP_fWa4cptWxVdjt7UQELPM60LetC-fSBnXhTxivSWA%40mail.gmail.com.


Re: Combining django apps

2022-10-25 Thread Dev Hs
When register app in config right all path to the app like
“app1.app1a”
On Tue, 18 Oct 2022 at 1:02 PM Jun Tanaka  wrote:

>
> mysite/
>
> manage.py
>
> config/
>
> __init__.py
>
> settings.py
>
> urls.py
>
> wsgi.py
>
> app1/
>
> app1a/
>
> app1b/
>
> app2/
>
> app3/
>
> I would like to know how to combine  apps together just like above.  Each
> app itself  works fine when runserver. I followed some websites talking
> about this but I always get some error like ‘app1a' is not a registered
> namespace. I'm not very familiar with combining apps. I hope someone can
> tell me the simplest way to do that.
>
> Thank you.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f4a91be8-c4a3-4fa1-9a73-bd202f1f6716n%40googlegroups.com
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFLCvssoJnPK5Hy-u2vKwdnesJMyF4Lcoij4LwrMXT23a4BAPA%40mail.gmail.com.


Re: Django call_command from Admin

2022-10-25 Thread Aziz Mek
Thank you Mdehs, 

Much appreciated for the advice,
I try to avoid signals as they are thread huggers but maybe i will 
or try to circumvent them somehow

Kind regards
Aziz

On Friday, October 21, 2022 at 7:32:02 PM UTC+1 mdehs...@gmail.com wrote:

> Please refer the signal concept in django you will get how to implement it
>
> On Thu, 20 Oct, 2022, 9:36 pm Aziz Mek,  wrote:
>
>> Hi All,
>>
>> I was wondering  if you have come across the following:
>>
>> I have a field in the model that's empty, when the user fills it up and 
>> clicks Save, it
>> should trigger/call a management Command (This command is already build 
>> that sends emails ), Django docs say i can use call_command but not sure 
>> how to implement it with the save
>>
>> I am just after the trigger really when the save takes place
>>
>> Many thanks in advance
>>
>> Kind regards
>> Aziz
>>
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/a0ca69f0-6065-4b86-a977-cfb6dcab8fd7n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d972e95f-090f-4c24-acbc-7f75273dd439n%40googlegroups.com.


Re: Django call_command from Admin

2022-10-25 Thread Aziz Mek
Hi Paul,

Many thanks for this, much appreciated,

I will have a look and try to implement it,
will let you know.

Kind regards
Aziz Meknassi

On Monday, October 24, 2022 at 2:03:08 PM UTC+1 pa...@scom.ca wrote:

>
> you need to basically add a hook (save class) to your save model and 
> process stuff along the way.
>
> you will need to modify this example but it's how i update info when 
> saving an scom email user for dovecot.
>
> you can also override the admin class as well with something simaliar
>
> Note :
> super(EmailUsers, self).save(*args, **kwargs) #Save the email changes
>
> is extemely important as stuff will process but any field updates will 
> not save without the above line..
>
> example :
>
>
> def save(self, *args, **kwargs): #This will create an email account if 
> nessesary.
> emailaddress = str(self.username) #Set the email address to see if we 
> need to create the mailbox?
> emailpassword = str(self.password) #Set the password (used for check 
> alias)
>
> #prefill username/domain is blank
> if self.domain == None or str(self.domain) == '' :
> self.domain = self.username.split('@')[1]
>
> if self.source == None or str(self.source) == '' :
> self.source = self.username
>
> if self.destination == None or str(self.destination) == '' :
> self.destination = self.username
>
>
>
>
> domain = str(self.domain)
> send_settings = str(self.send_settings)
> if self.send_settings == None :
> send_settings = ''
> self.send_settings = ''
> dontupdate = self.dontupdate
> self.dontupdate = False
>
> #set dovecot directory & split user / domain
> if self.username.split('@')[1] == 'preload.scom.ca' :
> self.home = '/data/dovecot/users/%s/%s' %( 
> self.domain,self.destination.split('@')[0] )
> else:
> self.home = '/data/dovecot/users/%s/%s' %( self.domain,self.destination )
>
> self.user = self.username.split('@')[0]
>
> #Set alias Flag
> if self.password == 'alias' or (self.source != self.destination) :
> self.alias_flag = True
> #self.sieve_forwards = ''
> #self.vacation_active = False
> else :
> self.alias_flag = False
>
> self.username_search = self.username
> self.username_search = self.username_search.replace ('.','')
> self.username_search = self.username_search.replace ('@','')
>
>
> super(EmailUsers, self).save(*args, **kwargs) #Save the email changes
>
> i email with something like :
>
> #Try to get info for this account
> if dontupdate == False :
>
> imap_test = Dovecot_Command ('INFO',self.username) #do i have this 
> account ?
>
> if 'BAD' in imap_test.answer :
> try : #Try to Create the account, note that the db must be updated 
> properly before it will work
> imap_create = Dovecot_Command ('CM',self.username)
> if 'OK' in imap_create.answer :
> send_subject = 'Email Account Created : %s' %(str(self.username) )
>
> except :
> send_subject = 'Error Account : %s' %(str(self.username) )
> pass
>
> else :
> send_subject = 'Email Account Updated : %s' %(self.username)
>
> #Send update email
>
> send_from = 'mon...@scom.ca'
> send_files = []
> send_to = ['mon...@scom.ca'] 
> send_text = '\n\n'+ send_subject + '\n'
> sendmail(send_from,send_to,send_subject,send_text,send_files) #Send 
> the warning email
>
>
>
>
> Happy Monday !!!
> Thanks - paul
>
> Paul Kudla
>
>
> Scom.ca Internet Services 
> 004-1009 Byron Street South
> Whitby, Ontario - Canada
> L1N 4S3
>
> Toronto 416.642.7266 <(416)%20642-7266>
> Main 1.866.411.7266 <(866)%20411-7266>
> Fax 1.888.892.7266 <(888)%20892-7266>
> Email pa...@scom.ca
>
> On 10/21/2022 2:30 PM, Mohammad Ehsan Ansari wrote:
> > Please refer the signal concept in django you will get how to implement 
> it
> > 
> > On Thu, 20 Oct, 2022, 9:36 pm Aziz Mek,  > > wrote:
> > 
> > Hi All,
> > 
> > I was wondering  if you have come across the following:
> > 
> > I have a field in the model that's empty, when the user fills it up
> > and clicks Save, it
> > should trigger/call a management Command (This command is already
> > build that sends emails ), Django docs say i can use call_command
> > but not sure how to implement it with the save
> > 
> > I am just after the trigger really when the save takes place
> > 
> > Many thanks in advance
> > 
> > Kind regards
> > Aziz
> > 
> > 
> > -- 
> > 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...@googlegroups.com
> > .
> > To view this discussion on the web visit
> > 
> https://groups.google.com/d/msgid/django-users/a0ca69f0-6065-4b86-a977-cfb6dcab8fd7n%40googlegroups.com
>  
> <
> https://groups.google.com/d/msgid/django-users/a0ca69f0-6065-4b86-a977-cfb6dcab8fd7n%40googlegroups.com?utm_medium=email_source=footer
> >.
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Django users" group.
> > To unsubscribe from this group and stop 

Re: How to Deploy Django and Vue App with CPanel

2022-10-25 Thread Aziz Mek
Hi Andre,

I have used this tutorial to successfully deploy a django project,
if your host doesn't have python check namecheap hosting they are quiet
cheap
https://www.youtube.com/watch?v=dJWVL15Jpws=969s

All the best

Kind regards
Aziz

On Tue, 25 Oct 2022 at 10:48, André Hangalo  wrote:

> Hi guys, I need deploy my Django and vue app on server with cpanel, but on
> the software section i don’t have “Python and Node.js”, anyway have a
> tutorial how to do that! ?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5ea39f0a-c17f-4e21-84bd-d14219fd7b5bn%40googlegroups.com
> 
> .
>


-- 
Kind regards
Aziz Meknassi
Tel: 07552128860

www.web-moods.com
Linkedin 
Twitter 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOoJfQJv7f1cphD5z1v2K51AU64Vp_RtyavcvYUsofVfm5i6bg%40mail.gmail.com.


Re: Need to pick up easy task in repo

2022-10-25 Thread muwaga micheal
Hi, you will need to first understand how to use Django, then you will see 
which parts need improvements.
Then you make the improvements and push the changes for review and addition 
to the main Django Repository.
If you are new to Django Python I connect you to some good WhatsApp groups. 

On Friday, October 14, 2022 at 8:46:20 PM UTC+3 anshi...@gmail.com wrote:

>
>
> Hi Team,
>
> I want to start contributing in this repository .Please let me know how to 
> start .
> Email id: anshi...@gmail.com
> Please let me know easy tasks which i can pick up in beginning.
>
> Regards,
> Anshika
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d7059edd-fc6b-4920-9031-e3714fc8cf1cn%40googlegroups.com.


Re: How to Deploy Django and Vue App with CPanel

2022-10-25 Thread Gilwell Muhati
Do you have root access? You can install Python and Nodejs if you are able
to access the terminal
Otherwise, orchestrate your own VPS - I prefer Linode and point your
nameservers to you linode or droplet[for digital ocean]




*Regards,Gilwell Muhati | +254 710 739 116 | *
*~~“The mind is its own place and in itself can make a heaven of hell, a
hell of heaven…”~~John Milton *


On Tue, Oct 25, 2022 at 12:48 PM André Hangalo 
wrote:

> Hi guys, I need deploy my Django and vue app on server with cpanel, but on
> the software section i don’t have “Python and Node.js”, anyway have a
> tutorial how to do that! ?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5ea39f0a-c17f-4e21-84bd-d14219fd7b5bn%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALO4FhHZFxnhQycWfKG1ZVma1tLRzDJrKX2-_THGu5%3DmtCBVXA%40mail.gmail.com.


How to Deploy Django and Vue App with CPanel

2022-10-25 Thread André Hangalo
Hi guys, I need deploy my Django and vue app on server with cpanel, but on 
the software section i don’t have “Python and Node.js”, anyway have a 
tutorial how to do that! ?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5ea39f0a-c17f-4e21-84bd-d14219fd7b5bn%40googlegroups.com.