Re: with templated-docs: how to insert images from an ImageField

2021-01-19 Thread Diptesh Choudhuri
https://templated-docs.readthedocs.io/en/latest/templatetags.html#image
This looks useful.

On Wednesday, January 20, 2021 at 4:13:04 AM UTC+5:30 fenrir...@gmail.com 
wrote:

> I'm generating reports using (a patched for django 3x fork of) 
> templated-docs . This module 
> lets you create OTD templates in LibreOffice and render them to PDF inside 
> a django view.
>
> This works great for complex documents with text, but I have no clue how 
> to insert images as well. The images come from an ImageField in the table 
> from which I get the info 
> that goes into the document.
> does anyone have experience how to create reports with images? I'm open 
> towards something else than templated-docs
>
>

-- 
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/6d9520ac-82ce-4702-88e3-cf559a1b6999n%40googlegroups.com.


channels_redis SSL help

2021-01-19 Thread j
Hi all, hope you are all doing well.  Would someone be available to help me 
figure out how to connect with SSL using channels_redis? 

I made a web app using django channels + channels_redis and I'm having an 
issue with configuring SSL. (I want SSL because I have deployed the app to 
Google App Engine and I don't want users' messages unsecured.) I have a 
Redis instance on RedisLabs with SSL enabled and all the client certs 
needed, but I can't find where to plug them into my app settings. I 
searched the channels documentation and all the issues on the 
channels_redis GitHub page, but the only mention I found was here: 
https://github.com/django/channels_redis#symmetric_encryption_keys, "we 
advise you to also route your Redis connections over TLS for higher 
security."

I noticed that channels_redis/core.py imports aioredis, and the only 
function from aioredis, create_redis, is used in the function pop() here:
https://github.com/django/channels_redis/blob/243eb7e4ecfc2e922508e50210884d3c9bae5403/channels_redis/core.py#L71

aioredis however is able to use "ssl" as an argument when establishing the 
connection, which channels_redis is not using:
https://github.com/aio-libs/aioredis/blob/922ccfc839ae0a1927ef44e7522a726277bce8a5/aioredis/commands/__init__.py#L171

So, I'm thinking that in order to connect with SSL the channels_redis 
module would need a new feature where I could configure SSL in 
settings.py/CHANNEL_LAYERS, and then channels_redis would pass my SSL 
settings to the function create_redis.

I'm super new to the world of Django and Channels and Redis and also 
contributing to open source projects, so hopefully I haven't over or under 
explained anything. Including this information because it was mentioned in 
the channels_redis GitHub "Submit new issue" form:

   - OS: Windows 10
   - Runtime: Python 3.7
   - Browser: Google Chrome
   - requirements.txt file is attached
   - Expectations vs reality: Expected to find SSL config options in 
   home.settings.CHANNEL_LAYERS variable, but there appears to be none
   - How I'm running my project: Testing locally using runserver so far, 
   but also throwing same error using daphne
   - Error traceback attached ("ERR unencrypted connection is prohibited")
   

Am I missing something, or do you suggest I submit this as a new request 
somewhere?

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/f6865cca-8c60-4cd6-91c5-a49e70e2962bn%40googlegroups.com.
2021-01-19 17:58:37,041 - ERROR - server - Exception inside application: ERR 
unencrypted connection is prohibited
  File 
"D:\projects\my_project\web_app\env\lib\site-packages\channels\sessions.py", 
line 175, in __call__
return await self.inner(receive, self.send)
  File 
"D:\projects\my_project\web_app\env\lib\site-packages\channels\middleware.py", 
line 41, in coroutine_call
await inner_instance(receive, send)
  File 
"D:\projects\my_project\web_app\env\lib\site-packages\channels\consumer.py", 
line 54, in __call__
await await_many_dispatch([receive, self.channel_receive], self.dispatch)
  File 
"D:\projects\my_project\web_app\env\lib\site-packages\channels\utils.py", line 
50, in await_many_dispatch
await dispatch(result)
  File 
"D:\projects\my_project\web_app\env\lib\site-packages\channels\consumer.py", 
line 67, in dispatch
await handler(message)
  File "D:\projects\my_project\web_app\src\stories\consumers.py", line 40, in 
websocket_connect
self.channel_name # default attribute
  File 
"D:\projects\my_project\web_app\env\lib\site-packages\channels_redis\core.py", 
line 583, in group_add
async with self.connection(self.consistent_hash(group)) as connection:
  File 
"D:\projects\my_project\web_app\env\lib\site-packages\channels_redis\core.py", 
line 820, in __aenter__
self.conn = await self.pool.pop()
  File 
"D:\projects\my_project\web_app\env\lib\site-packages\channels_redis\core.py", 
line 70, in pop
conns.append(await aioredis.create_redis(**self.host, loop=loop))
  File 
"D:\projects\my_project\web_app\env\lib\site-packages\aioredis\commands\__init__.py",
 line 175, in create_redis
loop=loop)
  File 
"D:\projects\my_project\web_app\env\lib\site-packages\aioredis\connection.py", 
line 133, in create_connection
await conn.auth(password)
  File "D:\projects\my_project\web_app\env\lib\site-packages\aioredis\util.py", 
line 52, in wait_ok
res = await fut
  ERR unencrypted connection is prohibitedaioredis==1.3.1
asgiref==2.3.2
async-timeout==3.0.1
attrs==20.3.0
autobahn==20.12.3
Automat==20.2.0
cffi==1.14.4
channels==2.1.2
channels-redis==2.3.2
constantly==15.1.0
cryptography==3.3.1
daphne==2.2.5
Django==2.0.7
et-xmlfile==1.0.1
hiredis==1.1.0
hyperlink==20.0.1
idna==2.10

with templated-docs: how to insert images from an ImageField

2021-01-19 Thread Fenrir Sivar
I'm generating reports using (a patched for django 3x fork of) 
templated-docs . This module lets 
you create OTD templates in LibreOffice and render them to PDF inside a 
django view.

This works great for complex documents with text, but I have no clue how to 
insert images as well. The images come from an ImageField in the table from 
which I get the info 
that goes into the document.
does anyone have experience how to create reports with images? I'm open 
towards something else than templated-docs

-- 
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/93bd82d3-3867-4c3a-a687-7fa01371991en%40googlegroups.com.


Re:

2021-01-19 Thread Ameto Eklu
To use your own form with Django, you have to use widgets in combination
with your model attributes.

I hope that answers your question.

On Tue, Jan 19, 2021, 7:39 AM Christ Ikonga 
wrote:

> hi guys i have a question about django form.. how do i use a form i
> created myself to allow users to register on my site?
>
> --
> 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/CADT9t_rr9uEHAxFjJKOhwNdfUXYBCHCK-wa8JeuLrNJk7ZeZhg%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/CAHo8Tt%2BPp7zXX_0dxCc3a4VwEjwx9P9CKebj2ahTRBO6AvM3Ug%40mail.gmail.com.


To start contribution from initial level

2021-01-19 Thread Dhruval Gandhi
Hello,

Myself Dhruval Gandhi, I want to contribute in django .
But I'm totally new for it.

I want to setup this on my local machine, want to contribute myself via PR,
But I don't how this all to do it.

If someone would help me to get start with it then It'll be great.

Thank you,
Regards
Dhruval Gandhi

-- 
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/CAOKtU_gvX7b%2B%3D9dUDCZKaScpi6JG1PFWhmihvAFpmpADrHaOJw%40mail.gmail.com.


Re: about django documentation

2021-01-19 Thread dupakoor kannan
Hi,

Try this first https://youtu.be/UmljXZIypDc and read the documentation
again.

Hope it helps



On Tue, Jan 19, 2021 at 8:40 AM a a  wrote:

> how can i understand from documentation?
> i was ended the introduction then i have continue to models but how can i
> implementation?
>
> --
> 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/04961371-e2b4-45f3-a5b9-1354109a4799n%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/CADiZb_f9P8iO5d6bWk7OsHUbPEspLoBCFfJB9nHBmMOnFB7csA%40mail.gmail.com.


Re:

2021-01-19 Thread Rob Wilkinson
Check out my new Django site, wrk in progress..

https://MrRobby.ca

I can send you my code if it helps

Rob



On Tue, Jan 19, 2021 at 8:39 AM Christ Ikonga 
wrote:

> hi guys i have a question about django form.. how do i use a form i
> created myself to allow users to register on my site?
>
> --
> 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/CADT9t_rr9uEHAxFjJKOhwNdfUXYBCHCK-wa8JeuLrNJk7ZeZhg%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/CAAdSEebcDZcQYjiFY6CAVZODNDu%3D7eve12vuJYqR87hTf6hoSA%40mail.gmail.com.


Re:

2021-01-19 Thread Kasper Laudrup

On 19/01/2021 01.39, Christ Ikonga wrote:
hi guys i have a question about django form.. how do i use a form i 
created myself to allow users to register on my site?




https://simpleisbetterthancomplex.com/tutorial/2017/02/18/how-to-create-user-sign-up-view.html

--
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/61d269c2-3929-2b44-1b58-a686713eeb4c%40stacktrace.dk.


about django documentation

2021-01-19 Thread a a
i have end the django introduction but i do not know where continue
i was start with models but there are error in terminal

NameError: name 'Person' is not defined

this is link: https://docs.djangoproject.com/en/3.1/topics/db/models/

-- 
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/fc1736d7-3fb0-456a-b5f4-27ace775fb70n%40googlegroups.com.


about django documentation

2021-01-19 Thread a a
how can i understand from documentation? 
i was ended the introduction then i have continue to models but how can i  
implementation?

-- 
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/04961371-e2b4-45f3-a5b9-1354109a4799n%40googlegroups.com.


[no subject]

2021-01-19 Thread Christ Ikonga
hi guys i have a question about django form.. how do i use a form i created
myself to allow users to register on my site?

-- 
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/CADT9t_rr9uEHAxFjJKOhwNdfUXYBCHCK-wa8JeuLrNJk7ZeZhg%40mail.gmail.com.


Django 3.2 alpha 1 released.

2021-01-19 Thread Carlton Gibson
Details are available on the Django project weblog: 

https://www.djangoproject.com/weblog/2021/jan/19/django-32-alpha-1-released/ 


-- 
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/C1560E82-4D44-4A10-9D18-3B07D852B2E4%40gmail.com.