Thanks
Le mer. 2 févr. 2022 à 13:37, kka kar a écrit :
> I recreated the project and changed the view function to the below, and it
> now works fine for me:
>
> def home(request):
> context = {
> 'posts': post
> }
> return render(request, 'home.html', context)
>
> On Wednesday, February 2, 2022
Is it possible to limit the results of array_agg of postgres to a certain
number of results? If not how can I go about implementing my own aggregate
function to achieve this?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from
In debug mode looks like, create a new app using your idea about a possible
mistake in setting without django-storages works perfectly but with this
one crash with the exception below. Trying to fix it but does not look
clear which line in django-storages has the issue.
SuspiciousFileOperation
Hmm that can't be right.
Can you set a breakpoint on the line where the exception is raised:
SuspiciousFileOperation("Detected.
When you set a breakpoint there, inspect the value of dir_name.
The ".parts" method breaks the file path up into a tuple, there shouldn't
be a ".." in the tuple.
O
Hi,
dir_name in the exception is '/home/joalbert/Documents/Remesas
App/RemesasServer/media/payments/images/filename.jpg'
The setting for media is:
Settings.py:
MEDIA_ROOT = "./media/"#os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
I try also with
MEDIA_ROOT = os.path.join(BASE_DIR, 'me
5 matches
Mail list logo