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: Django tenants schema with database cluster

2024-02-03 Thread Nagaraja
Can you tell me.. what's the issue you are facing with database routing?

On Tue, 30 Jan, 2024, 6:31 am Husbas,  wrote:

> We are running a Saas with django-tenants and AWS aurora.
> However, for AWS aurora and django, we need to implement a DB Router to
> read from read replica and write to master database. This doesn't seem to
> be possible with current Router of django-tenants schema.
>
> Is there a way to handle this?
>
> --
> 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/27effb38-eb2b-486e-9b5e-fbb75ae14157n%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/CAN1LePgm%3DY%2BJ-vdwar0kHNOBpU02bsznFUJR0-G812tdenpNnw%40mail.gmail.com.


Re: Django Channels and multi-tenant will this be a world of hurt?

2024-01-27 Thread Nagaraja
Y cnt u use pusher instead of channels

On Sat, 27 Jan, 2024, 4:40 pm 'Sebastián García' via Django users, <
django-users@googlegroups.com> wrote:

> Hi, I'm reviving this old thread... do you know of any other solution to
> the one proposed by @Ahmed Ishtiaque
>
> Thanks
> El domingo, 24 de febrero de 2019 a la(s) 9:13:30 p.m. UTC-3, Ahmed
> Ishtiaque escribió:
>
>> @N Muchai,
>>
>> I don't know if you've found a workaround to this, but here's mine if
>> people are interested in the future.
>>
>> I just made a custom ASGI application that adds the tenant schema name
>> (provided your URLs are in the form *.domain.com, where * represents the
>> schema name) and whether the project is multitenant or not. I haven't
>> thought much about whether the boolean for multitenancy identifier helps,
>> so feel free to remove it in your implementation. I just stacked this
>> application in my project's `routing.py` file. Here's the code I have at
>> the moment:
>>
>> My Middleware:
>> class MTSchemaMiddleware:
>> def __init__(self, inner):
>> self.inner = inner
>>
>> def __call__(self, scope):
>> if "headers" not in scope:
>> raise ValueError(
>> "MTSchemaMiddleware was passed a scope that did not have
>> a headers key "
>> + "(make sure it is only passed HTTP or WebSocket
>> connections)"
>> )
>>
>> for key, value in scope.get('headers', []):
>> if key == b'host':
>> schema_name = value.decode('ascii').split('.')[0]
>> break
>> else:
>> raise ValueError(
>> "The headers key in the scope is invalid. "
>> + "(make sure it is passed valid HTTP or WebSocket
>> connections)"
>> )
>> return self.inner(
>> dict(scope, schema_name=schema_name, multitenant=True)
>> )
>>
>> My `routing.py`:
>>
>> import MTSchemaMiddleware # from wherever your Middleware class resides
>> application = ProtocolTypeRouter({
>> 'websocket': (
>> MTSchemaMiddleware(
>> URLRouter(
>> chat.routing.websocket_urlpatterns
>> )
>> )
>> )
>> })
>>
>> After you do this, you will be able to access the `schema_name` and
>> `multitenant` variables inside your consumer's `scope` like this:
>> `schema_name = scope['schema_name']` or `multitenant =
>> scope[`multitenant`]`.
>>
>> Hope this helps someone!
>>
>> Best,
>> Ahmed
>>
>>
>>
>> On Thursday, January 10, 2019 at 7:22:40 AM UTC-5, N Muchai wrote:
>>>
>>> @Filbert,
>>>
>>> Am in the same exact spot using Django Channels with django-tenants. Did
>>> you find a way to identify the tenant?
>>>
>>> Thanks.
>>>
>>> On Tuesday, November 28, 2017 at 4:22:10 AM UTC+3, Filbert wrote:

 Sorry, yeah dig before I post :-|  Can create a class-based consumer
 and use the message->headers->host. I'll get chest deep before ask another
 question.

 On Monday, November 27, 2017 at 6:04:48 PM UTC-5, Andrew Godwin wrote:
>
> That would be correct (though please be aware Origin can be faked like
> host headers, so don't use it as the sole point of security).
>
> Is it not available via the headers list in the connect message?
>
> Andrew
>
> On Mon, Nov 27, 2017 at 2:58 PM, Filbert  wrote:
>
>> Thanks again. One last question, in order to "multi-tenant-ify"
>> Channels I think the challenge will be trickle the websocket "orgin" into
>> the consumer from Daphne somehow as it seems there is no way to know in a
>> consumer which tenant (unique domain) the message originated from. 
>> Without
>> the domain you can't establish the Postgres schema, without the schema 
>> you
>> have no tenant :-)
>>
>> Please confirm this would be the approach or whether I am
>> wrong-headed here.
>> Thanks.
>>
>> On Sunday, November 26, 2017 at 9:58:58 AM UTC-5, Andrew Godwin wrote:
>>>
>>> I've never used attach-daemon so I can't help you there I'm afraid.
>>> As long as it does sensible process-management things it's probably 
>>> alright?
>>>
>>> Andrew
>>>
>>> On Sat, Nov 25, 2017 at 5:17 PM, Filbert  wrote:
>>>
 Andrew,
 Thanks for the response. Seeing that I am keeping uWSGI for the
 non-websocket paths, any heartache with me starting daphne and the
 consumers using uWSGI's attach-daemon? I do this with celery and it is 
 a
 convenient way to have everything for the App managed as a unit via a
 single /etc/init (upstart) conf file.
 Thanks.

 On Friday, November 24, 2017 at 7:10:29 PM UTC-5, Andrew Godwin
 wrote:
>
> Your assumptions all seem correct. Also consider that the security
> model of WebSockets is... interesting, so securing a multi-tenant 
> setup is
> going to require a bit more work than you would merely 

Re: Looking for a Learning Buddy

2023-10-14 Thread Nagaraja
You mean tenant system ?

On Fri, 13 Oct, 2023, 3:26 am Sophia,  wrote:

>
> Hello is there anyone who has done on real estate or broker system in
> Django. please I need your help.
> On Saturday, June 17, 2023 at 1:10:39 AM UTC+3 Peter Benjamin Ani wrote:
>
>> Have you tried working on a project?
>>
>> On Fri, 16 Jun 2023 at 23:00, John Ayodele  wrote:
>>
>>> Hi! It's John.
>>>
>>> I am currently looking for a learning buddy, for Machine Learning.
>>> I have little experience in Django and I code in Python.
>>>
>>> The learning buddy would have one-on-one meetings with me so we can
>>> share ideas and learn together.
>>> It is really going to be a fun experience.
>>> The reason I am looking for a learning buddy is because I find it more
>>> fun learning with people rather than just being self-taught alone.
>>> I will be going to university later this year or next year.
>>> 
>>> If this sounds like you, please do not hesitate to contact me.
>>> 
>>>
>>> Thanks.
>>> John Ayodele
>>>
>>> --
>>> 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/CAP7pJ3gsn_bkOfP-8k-SNZ%2BmmJ8riuc1cdUVXzoQXN31BS4W4g%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/c000bcf3-a9ae-4c43-916a-584034abff03n%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/CAN1LePiq%2BUdvGUxX4ZQu3P6NWgbKKSjMFa7dQKvOPBS77_g%2B0g%40mail.gmail.com.


Re: Forbidden (403) - CSRF verification failed. Request aborted.

2022-11-23 Thread Nagaraja Tuticorin
Make your database as a public make format of database chmod
www-data=www-data ./filename

On Wed, 23 Nov, 2022, 7:33 am Chukwudi Onwusa, 
wrote:

> Check your template, immediately after the  opening tag add
> {% csrf_token %}
> If you have it already, kindly check to ensure it's correctly spelt and
> placed and then restart your server.
> Best Regards.
>
> On Wed, Nov 23, 2022, 00:58 Carlos Roberto  wrote:
>
>> Hi everyone!
>>
>> I use ngrok to make my projects available in django. I'm having trouble
>> accessing the admin page. After I enter the username and password I get the
>> error 403.
>>
>> Has anyone had the same problem and could help me?
>>
>> Regards
>>
>>
>> --
>> 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/de5c4738-f540-4596-b1bf-0b0b16aabbf2n%40googlegroups.com
>> 
>> .
>>
>
>
> On Nov 23, 2022 00:58, "Carlos Roberto"  wrote:
>
> Hi everyone!
>
> I use ngrok to make my projects available in django. I'm having trouble
> accessing the admin page. After I enter the username and password I get the
> error 403.
>
> Has anyone had the same problem and could help me?
>
> Regards
>
>
>
> --
> 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/de5c4738-f540-4596-b1bf-0b0b16aabbf2n%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/CAGoV8nm8QO1LKP4x7%2Bm%3DuM%3DMzdTryt-DYQOw%2BsdJREnm18c1gQ%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/CAN1LePiRdJ7dDkNBse7qnsgefOfH%3DbUmVAQFF4khDdwno9kAeA%40mail.gmail.com.


Re: Forbidden (403) - CSRF verification failed. Request aborted.

2022-11-23 Thread Nagaraja Tuticorin
Make your database as a public make format of database chmod
www-data=www-data ./filename

On Wed, 23 Nov, 2022, 5:28 am Carlos Roberto,  wrote:

> Hi everyone!
>
> I use ngrok to make my projects available in django. I'm having trouble
> accessing the admin page. After I enter the username and password I get the
> error 403.
>
> Has anyone had the same problem and could help me?
>
> Regards
>
>
> --
> 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/de5c4738-f540-4596-b1bf-0b0b16aabbf2n%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/CAN1LePiLOoBRdj1EimOEeZTDDx30BJCOEdzQsY6ryx1VGyTREw%40mail.gmail.com.


Django validation

2019-04-04 Thread veera nagaraja sankar Inti
Hi All,

I working on Django validation,

i have done some practice,

I observed somethig plase let know if any misunderstadings,

1) When every datatype in models  have default validators or worked, it is 
worked on the form contains *is_valid()* or else  ?..

2)we can add the custom validations using *validators=[nameofthevalidation 
function] which *is only inadditionto the existing validators means 
validate defaultvalidators first and then next custom validations, If we 
use *required=true * use in remove only custom validation only ?..

3) i need to mute all default validation and add only my custom validation 
---Explain in datail  plesase


Thank you all

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3e2e519b-4d0f-429c-9ed1-ffe0b7de9055%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


select table rows in Django

2019-03-19 Thread veera nagaraja sankar Inti
check box filed is not selected in the Django template

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e03ee093-fd1e-4d3b-a162-cbf924b65b76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is there any inline editing the data and delete data in table in Django?

2019-03-19 Thread veera nagaraja sankar Inti

how ?

On Monday, March 4, 2019 at 12:40:03 PM UTC+5:30, Derek wrote:
>
> Grid / tabular editing outside of the admin is tricky; I have not been 
> able to manage it and have not found a good app for it.
>
> Here are some suggested reading:
>
> * https://www.ibm.com/developerworks/library/wa-django/index.html
> * https://bossanova.uk/jexcel 
> * 
> https://medium.com/ag-grid/building-a-crud-application-with-ag-grid-part-4-3189034df922
>
> You'd also need an app like Django REST Framework to handle GET/POST of 
> JSON data to populate your grid.
>
> On Wednesday, 27 February 2019 20:39:04 UTC+2, veera nagaraja sankar Inti 
> wrote:
>>
>> need help friends ?..
>>
>> thq..
>>
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/daa68276-96fa-4cfb-98ed-52db00df4727%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.