Re: A beginner question

2020-09-14 Thread Annick Sakoua
Hi , Here is the documentation link, follow every steps of the tutorial and it gonna be fine. https://docs.djangoproject.com/en/3.1/ All the best :) Le dimanche 13 septembre 2020 à 13:17:37 UTC+1, neginha...@gmail.com a écrit : > Hi, I'm a beginner, just now I installed Django, how can I use

Account activity How to logout a particular device to logout.

2020-09-14 Thread Salima Begum
Hi all, By using python and django. 1. User Login with one account in different devices. 2. If he login into another device we sent user to email. Saying that New device login. 3. After we show user in his/her account activity page With that account how many devices are login. 4

Re: Account activity How to logout a particular device to logout.

2020-09-14 Thread Farai M
You might need to capture mac address on login then associate it with the login session On Mon, Sep 14, 2020, 1:48 PM Salima Begum wrote: > Hi all, > By using python and django. > > >1. User Login with one account in different devices. >2. If he login into another device we sent user to

Re: AttributeError: object has no attribute 'user' while trying to access instance.user.id

2020-09-14 Thread Mislav Jurić
What I can do is first register the employee via a register form, then once he logs in ask him/her for the profile picture. *Can I do that this way? * If I do it this way, I don't have to change my model in any way. Dana nedjelja, 13. rujna 2020. u 18:11:18 UTC+2 korisnik coolguy napisao je: >

I've got two apps in my project and each one should have different authentication model. How do achieve this?

2020-09-14 Thread Mislav Jurić
Hey guys, as the title says, I've got two apps in my project and each one should have different authentication model. My first app just extends the User class, which I have done following the instructions here . Howeve

HTML5 drag and drop: How does it really work?

2020-09-14 Thread Elliot
I am familiar with the various events in building a dnd. I am trying to find out what is supposed to happen to the HTML source when a drag and drop works. Can anyone explain this to me.? After an apparently successful drag and drop I see no changes to the underlying HTML. I have been using Djan

Re: I've got two apps in my project and each one should have different authentication model. How do achieve this?

2020-09-14 Thread dum dum
You can actually just extend it like the First app. 1. Create new Model for Second App authentication. 2. Just connect with User model the fields that are needed, the rest you can add it on the new Model It could be the one of the easy ways. Thanks On Mon, Sep 14, 2020 at 11:00 PM Mislav Jurić w

Re: Account activity How to logout a particular device to logout.

2020-09-14 Thread Kasper Laudrup
Hi Farai, On 14/09/2020 14.17, Farai M wrote: You might need to capture mac address on login then associate it with the login session You can't do that. Or, you could probably look up the IP address in the HTTP header in the local ARP cache on the server where your Django application is ru

Re: Account activity How to logout a particular device to logout.

2020-09-14 Thread Kasper Laudrup
Hi Salima, On 15/09/2020 02.18, Salima Begum wrote: Hi all, By using python and django. 1. User Login with one account in different devices. 2. If he login into another device we sent user to email. Saying that New device login. 3. After we show user in his/her account activity page With

Re: Help me with the view please

2020-09-14 Thread coolguy
Its simple... in your fee models' save method check that self.remaining_fees is zero then make self.completed field to true.. def save(self, *args, **kwargs): self.remaining_fees = self.school_fees - self.paid_fees if self.remaining_fees == 0: self.completed = True

Re: AttributeError: object has no attribute 'user' while trying to access instance.user.id

2020-09-14 Thread coolguy
If i had to stick to your code then i would save the file with instance.username. username is available and folder would be readable as well. However, as i mentioned in my last reply and seems you agreed, save/register the employee and then have employee upload the picture. On Monday, Septembe

Re: Help me with the view please

2020-09-14 Thread coolguy
Its simple... in your fee models' save method check that self.remaining_fees is zero then make self.completed field to true... I added else clause in case if admin make changes to paid fees and after changes student still has some dues. def save(self, *args, **kwargs): self.remainin

Change DateField Like this

2020-09-14 Thread kkwaq...@gmail.com
How to change date format in django (mmdd to ddmm) -- 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 thi

Re: I am getting this error while I click on comment button which i mention in line 51 in html file.

2020-09-14 Thread coolguy
This is not the same error... What is this 'Post' in your >>> post=Post.objects.filter(Post, pk=ID) based on the django error you are using model here which is not how filter works... this should be a field name like xxx.filter(field_name__id=ID) I would suggest you to refer to documentation on

RE: Help me with the view please

2020-09-14 Thread fadhil alex
Thanks it has worked, but it doesn’t work with my total_paid_fees, I want to be automatically checked when school_fees substracts summation of all paid_fees, just like this solution you provided me with the last timefirst_record = student.fee_set.first() school_fees = first_record.school_fees  paid

Re: Help me with the view please

2020-09-14 Thread coolguy
not sure what are you looking for... but based on your model setup... school fees is setup once so we picked it up from first object/record from table, while paid fees are collected quarterly or whatever means there will be more than one transaction in fee table. We have already calculated the

Re: Change DateField Like this

2020-09-14 Thread coolguy
please explain in detail where do you want this change views? On Monday, September 14, 2020 at 3:56:37 PM UTC-4 kkwaq...@gmail.com wrote: > How to change date format in django (mmdd to ddmm) > -- You received this message because you are subscribed to the Google Groups "Django use

Re: HTML5 drag and drop: How does it really work?

2020-09-14 Thread coolguy
The changes are done through script which you are doing at this time... the changes would only be visual for user and would not impact the source code. following may be irrelevant for you but i would added this here... Lets take an example of an online-course where instructor of the course can m

Re: HTML5 drag and drop: How does it really work?

2020-09-14 Thread coolguy
The changes are done through script which you are doing at this time... the changes would only be visual for user and would not impact the source code. following may be irrelevant for you but i would add this here... Lets take an example of an online-course where instructor of the course can mak

Re: Account activity How to logout a particular device to logout.

2020-09-14 Thread Farai M
*Browser fingerprinting*” is a method of tracking web *browsers* by the configuration and settings information they make visible to websites, rather than traditional tracking methods such as IP addresses and unique cookies. *Browser fingerprinting* is both difficult to detect and and extremely diff

Re: Environment Variables for Django Secret Key etc On Windows 10 and Heroku

2020-09-14 Thread coolguy
Did you input the variable value under single quote or without it? e.g. '' On Saturday, September 12, 2020 at 12:35:29 PM UTC-4 hanz...@gmail.com wrote: > Yes, I've seen so many tutorials. I did the same thing, and didn't work. > I believe there is something wrong with my Djang

Re: I am getting this error while I click on comment button which i mention in line 51 in html file.

2020-09-14 Thread Yash Lanjewar
Post is my model which I created already. Sent from my Huawei phone Original message From: coolguy Date: Tue, 15 Sep 2020, 01:46To: Django users Subject: Re: I am getting this error while I click on comment button which i mention in line 51 in html file.This is not the same error...

Re: Help:What is the problem in this code?

2020-09-14 Thread 'Amitesh Sahay' via Django users
have you configured the django env in virtual env, and are you trying to execute the commands outside the virtual env? Regards, Amitesh On Sunday, 13 September, 2020, 09:39:59 pm IST, Kasper Laudrup wrote: Hi Hassan, There's nothing wrong with this code. It's just that it's only vali

RE: Help me with the view please

2020-09-14 Thread fadhil alex
def save(self, *args, **kwargs):self.paid_fees = student.fee_set.aggregate(total_paid_fees=sum('paid_fees'))self.school_fees = first_record.school_feesself.remaining_fees = self.school_fees - self.paid_feesif self.remaining_fees == 0:self.completed = 

Re: Environment Variables for Django Secret Key etc On Windows 10 and Heroku

2020-09-14 Thread dum dum
without any quotes. [image: image.png] On Tue, Sep 15, 2020 at 5:10 AM coolguy wrote: > Did you input the variable value under single quote or without it? > > e.g. '' > > On Saturday, September 12, 2020 at 12:35:29 PM UTC-4 hanz...@gmail.com > wrote: > >> Yes, I've seen so man