Re: python/django/vs code

2024-06-05 Thread Nagaraja
try below method


{% block content %}
{% endblock content %}



On Wed, Jun 5, 2024 at 1:09 PM 'Mee “MeeGrp” Grp' via Django users <
django-users@googlegroups.com> wrote:

> I have two html files 1. view_sales.html  2. total_sales.html
>
> I want to display output of total_sales.html within  view_sales.html*
> just below *
> *view_sales.html output*
>
> Your help would be highly appreciated 
>
>
> --
> 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/30b6b324-22b2-44f1-b2dd-b0b034ac2f61n%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/CAN1LePhad6wCKuqZZAOcY_NRr-Vbq4SORkU08p4NNFrDYzTrqg%40mail.gmail.com.


Re: python/django/vs code

2024-06-05 Thread Web dev
Hi, I guess your trouble.
Let me try.

On Wed, Jun 5, 2024 at 4:38 PM 'Mee “MeeGrp” Grp' via Django users <
django-users@googlegroups.com> wrote:

> I have two html files 1. view_sales.html  2. total_sales.html
>
> I want to display output of total_sales.html within  view_sales.html*
> just below *
> *view_sales.html output*
>
> Your help would be highly appreciated 
>
>
> --
> 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/30b6b324-22b2-44f1-b2dd-b0b034ac2f61n%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/CAJyUeCT7V4353VnQQZyKuz5JdAL42NM87siNxoCEgVEUfLo1qw%40mail.gmail.com.


python/django/vs code

2024-06-05 Thread 'Mee “MeeGrp” Grp' via Django users
I have two html files 1. view_sales.html  2. total_sales.html

I want to display output of total_sales.html within  view_sales.html* just 
below *
*view_sales.html output*

Your help would be highly appreciated 


-- 
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/30b6b324-22b2-44f1-b2dd-b0b034ac2f61n%40googlegroups.com.


Re: if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket): TypeError: expected string or bytes-like object

2024-06-05 Thread Sanjay Sikdar
 django-storages has been updated that's why you are getting this error. 

OLD SYNTAX
from storages.backends.s3boto3 import S3Boto3Storage
import os

class MediaStorage(S3Boto3Storage):
bucket_name = os.environ.get('AWS_STORAGE_BUCKET_NAME')
location = 'media'

class StaticStorage(S3Boto3Storage):
bucket_name = os.environ.get('AWS_STORAGE_BUCKET_NAME')
location = 'static'
UPDATED SYNTAX 

STORAGES = {
"default": {
"BACKEND": "storages.backends.s3.S3Storage",
"OPTIONS": {
"bucket_name": AWS_STORAGE_BUCKET_NAME,
"location": 'media'
},
},
"staticfiles": {
"BACKEND": "storages.backends.s3.S3Storage",
"OPTIONS": {
"bucket_name": AWS_STORAGE_BUCKET_NAME,
"location": 'static'
},
},
}

On Monday, December 14, 2020 at 2:10:32 PM UTC+5:30 KUMBHAGIRI SIVAKRISHNA 
wrote:

> ile 
> "/home/sivakrishna/Downloads/peeljobs-env/lib/python3.8/site-packages/botocore/handlers.py",
>  
> line 200, in validate_bucket_name
> if not VALID_BUCKET.search(bucket) and not VALID_S3_ARN.search(bucket):
> TypeError: expected string or bytes-like object
>
>
> Please help me to solve this problem 
>

-- 
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/561c9981-ae62-4a88-90ac-4704968e1ad2n%40googlegroups.com.


Merging results of two .html files show up in one web page

2024-06-05 Thread 'Mee “MeeGrp” Grp' via Django users
I am working on an Inventory System ( just a trial - for learning purposes)

platform - Python
framework - Django

VS Code/Sqlite3 

Question:

I have two html files 1. view_sales.html 2.total_sales.html

view_sales.html




Sales
Product Total_price



Sales


Product
Date 
Amount 
Quantity Sold   
Total Price

{% for sale in sales %}

{{ sale.product.product_name }}
{{ sale.date }}  
{{ sale.amount }}
{{ sale.quantity_sold}}
{{ sale.total_price }}





{% endfor %}

Total Sales: {{ total_sales }}










-- 
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/56a9ff0a-62f2-4ec0-b8cd-5601174a862en%40googlegroups.com.