Re: APP DEPLOYMENT

2023-08-09 Thread ivan harold
Maybe this will help.
https://docs.djangoproject.com/

On Sunday, August 6, 2023 at 5:09:29 AM UTC+8 Dennis Kinanga wrote:

> Someone to give me instructions on how to go about it please 
>
> On Aug 6, 2023 00:07, "John McClain"  wrote:
>
> Heroku is easy to implement and offers free tier
>
> On Thu 20 Jul 2023 at 10:57, Abdou KARAMBIZI  wrote:
>
>>
>> Hello friends,
>>
>>
>> I want to know where I can upload my django projects for the reason of 
>> showing them as my technical experience.
>>
>> -- 
>> 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/CABnE44xYg2JqtHVUHMkBkpS81jmQyqfehid3q-%2BnEJe532mrhA%40mail.gmail.com
>>  
>> 
>> .
>>
> -- 
> John McClain
>
> Cell: 085-1977-823
> Skype: jmcclain0129
> Email: jmccla...@gmail.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...@googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAN-hv_qV59Y_pKbGZzccO3AjKsH0hM1vZtE4fj2U0nK6yc_XWQ%40mail.gmail.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/4783de91-6ed9-42dc-997d-9e009cf9b9ecn%40googlegroups.com.


Re: honest reviews

2023-08-09 Thread ivan harold
Put a little more details on the site and instead of putting a screenshot 
on the my project page you can photoshopped an image to make it look more 
dynamic and enhanced.

On Monday, July 31, 2023 at 9:51:49 PM UTC+8 oluwafemi damilola wrote:

> It'll advice that you add some extra informations to the page, also the 
> image takes at least 5 seconds to load and the icon is tiny on mobiles 
>
> On Mon, 31 Jul 2023, 14:48 marvelous,  wrote:
>
>> Oh ok then I will put that into consideration thank you very much
>>
>>  
>>
>> Sent from Mail  for 
>> Windows
>>
>>  
>>
>> *From: *Ogunlade Stephen Olayide
>> *Sent: *Monday, July 31, 2023 2:11 PM
>> *To: *django...@googlegroups.com
>> *Subject: *Re:
>>
>>  
>>
>> I will prefer you make the About page the home/landing page
>>
>>  
>>
>> On Mon, Jul 31, 2023 at 2:00 PM marvelous  wrote:
>>
>>  
>>
>> Hello guys I just finished building out my portfolio and I would 
>> appreciate if you give me your honest reviews heres the link 
>>
>>  
>>
>> https://marvel-9gdg.onrender.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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/D11D5F79-FE3E-43CC-B82F-FA665B0E4414%40hxcore.ol
>>  
>> 
>> .
>>
>> -- 
>> 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/CANyXpooYQoA2tuytkCFUj1KEpeZOfF5Gcc37cVWHY2eTgHV45w%40mail.gmail.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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/3FA1C223-C03A-483B-9604-9A682730D0C4%40hxcore.ol
>>  
>> 
>> .
>>
>

-- 
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/05d29578-475d-495d-85a9-dec5568cee72n%40googlegroups.com.


Re: Post multiple data

2023-08-09 Thread ivan harold
maybe this will help 

" from django.conf import settings 
 class Design(models.Model): 
 human_readable_id = models.CharField(max_length=10, default=id_generator, 
db_index=True) 
 manager = models.CharField(max_length=40) 
 worker = models.ForeignKey( 
 settings.AUTH_USER_MODEL, 
 on_delete=models.CASCADE, 
*to_field='username'* ) "

On Wednesday, August 9, 2023 at 6:11:59 AM UTC+8 Hendry Revenus wrote:

> Thank you 
>
> On Tue, 8 Aug 2023, 14:57 Prashanth Patelc,  wrote:
>
>> I'm not able to send multiple data in front -end .
>>
>> On Tue, Aug 8, 2023, 5:21 PM Mz Gz  wrote:
>>
>>> Check the object sent from frontend using developer tools in browser.
>>>
>>> If the object is sent correctly to backend.
>>>
>>> Just access is from POST dict
>>>
>>> On Tue, 8 Aug 2023, 1:19 pm Prashanth Patelc,  
>>> wrote:
>>>
 Hi all, 

 I'm sending multiple rows data through html but I'm unable to save data 
 in django I'm not receiving proper data.how to send multiple shifts names 
 and times through ajax or html in django.

 I'm adding multiple shift name and in-time out-time .

 Please find the attached screenshot 

 -- 
 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/CAMCU6CqWJme8fg-JuZJ%2BQnTBk63_f4%3DZMYTO7GFnRChOMt1teQ%40mail.gmail.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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CAHV4E-fOikH7dWcJYkjyOQobj57%2BJ5Zef0y3PzfsoJN0gVgEhQ%40mail.gmail.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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAMCU6CrNoyoRykrSmABgwWwpWL5o-bhqpcMpL4YPj-v%3D%2BsA0tA%40mail.gmail.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/e7974823-dfa3-4a36-9c15-1ea91ba875dan%40googlegroups.com.


Re: Logout time

2023-08-09 Thread ivan harold
Maybe this will help, check out this code.

def login (): login_time = time.time() def logout (): logout_time = 
time.time() #To get the number of seconds the user spent on the platform, 
#subtract 
login_time from logout_time

On Monday, July 31, 2023 at 6:12:23 PM UTC+8 Prashanth Patelc wrote:

> Thank you all.
>
>  Thank you # madhusudan (I got on idea through you shared the code)
>
> On Fri, Jul 28, 2023, 8:16 PM Madhusudhan Reddy  
> wrote:
>
>> To get Logout time based on login time,
>>
>> login time = some thing
>>
>> logout time = login time + 8 hours
>>
>> use datetime timedelta module in python, 
>>
>> >>> CODE <<<
>> from datetime import datetime, timedelta
>> login_time = datetime.now()
>> logout_time = login_time + timedelta(hours=8)
>> >>> CODE <<<
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Fri, 28 Jul 2023 at 20:05, Prashanth Patelc  
>> wrote:
>>
>>> Hi all,
>>>
>>> How to get logout time based on login time in python?
>>>
>>> I'm storing hour in one column
>>> Eg ; hour
>>> 8
>>> Based on 8 Calculate logout time
>>>
>>> My login time 10:00:00
>>>
>>> I need 6: 00:00 (based 8)
>>>
>>> -- 
>>> 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/CAMCU6Cpe32Pcs5PAmbx8LDcJzqqPwuhJVzrz%2B%3D67-tEMBychOw%40mail.gmail.com
>>>  
>>> 
>>> .
>>>
>>
>>
>> -- 
>> Best regards,
>> Madhusudhan
>> +91 90007 79457 <+91%2090007%2079457>
>> Gmail | LinkedIn 
>>
>>
>> -- 
>> 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/CAFwQctLwNxagOX-QKVUdp58gk4px0M_qftqU3rnHayGaJ9BjAw%40mail.gmail.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/c727f577-f89c-4a28-bef9-072093667f41n%40googlegroups.com.


Re: DAILY,MONTHLY AND ANNUAL REPORTS

2023-08-09 Thread ivan harold
is this thread closed? resolved?


On Saturday, July 22, 2023 at 8:08:48 AM UTC+8 Ryan Nowakowski wrote:

> Check out the Sum() aggregate:
>
> https://docs.djangoproject.com/en/4.2/topics/db/aggregation/
>
>
> On July 21, 2023 12:41:48 PM CDT, Abdou KARAMBIZI  
> wrote:
>
>> Hello Friends,
>>
>> How can I get weekly,Monthly and annual reports? from the following model.
>> I want to get the total amount paid in the week,month and year 
>>
>>
>> class Payments(models.Model):
>> id = models.AutoField(primary_key = True)
>> amount = models.IntegerField()
>> paidon = models.DateField(auto_now=True)
>>
>> def __str__ (self):
>> return self.id
>>
>>
>>

-- 
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/9f84c4fd-0c83-463a-a39f-ff089b233211n%40googlegroups.com.


Re: CreateView for non default database

2023-08-09 Thread ivan harold
Did you try what  David Nugent suggested? Did it worked?

On Thursday, July 27, 2023 at 6:31:33 PM UTC+8 David Nugent wrote:

> Database Router is the trick for this. Django calls this function to 
> determine which database the transaction will use based on the type of 
> operation requested, so you can separate which database is selected for 
> reads, writes and migrations.
>
> Regards,
> David
>
> On Wed, Jul 26, 2023 at 1:11 PM Muhammad Juwaini Abdul Rahman <
> juw...@gmail.com> wrote:
>
>> Hi all,
>>
>> I have two different databases as below:
>>
>> DATABASES = {
>> 'tvet': {
>> 'ENGINE': 'django.db.backends.sqlite3',
>> 'NAME': BASE_DIR / 'db.sqlite3',
>> },
>> 'default': {
>> 'ENGINE': 'django.db.backends.mysql',
>> 'NAME': 'jpk',
>> 'USER': 'jpkuser',
>> 'PASSWORD': 'jpkpassword',
>> 'HOST': 'localhost', # Or an IP Address that your DB is hosted on
>> 'PORT': '3306',
>> }
>> }
>>
>> When I want to create a CreateView, I am unable to save it.
>>
>> This is my CreateView:
>>
>> class BiodataCreateView(CreateView):
>> template_name = 'bio_create.html'
>>
>> # model = Biodata.objects.using('tvet').all()
>> def get_queryset(self):
>> return Biodata.objects.using('tvet').all()
>>
>> fields = 'name', 'hobby'
>>
>> def get_success_url(self):
>> return reverse('biodata-list')
>>
>> Any idea on how to do it?
>>
>> -- 
>>
> 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/4985efd7-437c-432e-86c8-9a902430513fn%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/ef988bc0-20e3-4e9b-90e5-b7d1d8abf5b3n%40googlegroups.com.