Monday, July 1, 2019

Accessing data from a 30 GB file in json format

Hey,

I have a file with a size of around 30GB. The file is in json format. I have to access the data and write that to a csv file. When I tried to do that with my laptop which has a a RAM of 4GB, I am getting some error. I tried to load the json file like this json_parsed = json.loads(json_data)

Can someone help me with this? How should I do this? If I should go with some server, please let me know what specifications should I use? 

--
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+unsubscribe@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/CAPBZ7vD6Ai5DOAudytO7QeW1ejUqdqyB5YH3F7aTg4YoXtF-uw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

404 not found

Hi Folks,
i'm using Django 1.11 and is et up everything properly but at the wrong url django redirecting to 500 page instead of 404 page.Please help me,How i can solve this problem? Here is my code:


views.py
def error_404(request):
    return render(request,'shop/product/404.html',status = 404)

def error_500(request):
    return render(request,'shop/product/500.html',status = 500)


urls.py
from django.conf.urls import url,include,handler404,handler500
handler404 = 'shop.views.error_404'
handler500 = 'shop.views.error_500'


settings.py

debug = False


Guys please help!!!


Thank You


Regards,
Soumen


--
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+unsubscribe@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/CAPUw6WZN0Bj5cETJuoYPHMBE7u9_7Ux8Y-1AtVmF2gcsWwBabA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Django security releases issued: 2.2.3, 2.1.10 and 1.11.22

Today the Django team issued 2.2.3, 2.1.10, and 1.11.22 as part of our security process. These releases address security issues, and we encourage all users to upgrade as soon as possible:

https://www.djangoproject.com/weblog/2019/jul/01/security-releases/

--
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+unsubscribe@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/499d2521-977a-4372-a4c1-1b17fa0fa62d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Django security releases issued: 2.2.3, 2.1.10 and 1.11.22

Today the Django team issued 2.2.3, 2.1.10, and 1.11.22 as part of our security process. These releases address security issues, and we encourage all users to upgrade as soon as possible:

Re: anonymous user in django app

Hi,

You may add a checkbox into your form with comment, "Post anonymously".
And then in view check this value and if so - leave Post's user field blank.

Regards,

V.

On Thursday, June 27, 2019 at 4:22:01 PM UTC+3, Gaurav Sahu wrote:
Hy, I have a Django blog app. I want to add a feature in which a registered user can add a post anonymously. But I couldn't figure out how to do it. Anybody help me how can I implement this feature? It will be a great help.
Thanks in advance.

--
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+unsubscribe@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/1ef930fa-b9f8-4d7a-ae78-1e85638d86ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Modal Form reusable.

Buenos Dias,

May be this will help.

Modal has an event, fired when it is about to show https://getbootstrap.com/docs/4.0/components/modal/#events
Event - 'show.bs.modal'

So you may bind handler to it and render modal with fields you wish:

$('#dynamic_modal').on('show.bs.modal', function (e) {
    
$('#dynamic_modal').find(".modal-body").html(YOUR_NEW_CONTENT);
});

Regards,

V.

On Friday, June 28, 2019 at 8:05:34 PM UTC+3, Julio Parra-Sanchez wrote:
Buenos Dias Amigos,

Alguno de ustedes ha utilizado los modal de bootstrap y reutilizarlo como template, pasandole como variable el modal que van a renderizar?

Gracias y espero me haya explicado bien.
------------------------------------------------------
Hello Guys,
Have any of you used bootstrap's manners and reused it as a template, passing as a variable the modal to render it?
thanks

--
{ 
    name     : "Julio Parra Sanchez", 
    title    : "Apprentice Developer", 
    company  : "Techtonic", 
    location : "Denver, CO" 
}

--
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+unsubscribe@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/484eec74-e439-48ad-88b1-d2fdadd57822%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sunday, June 30, 2019

Re: Running tests creates many unnecessary files

Hi,

these temp files should be removed after they closed, but it looks it is not closed after tests executed.

Regards,

V.

On Friday, June 28, 2019 at 4:44:34 PM UTC+3, Uri Even-Chen wrote:
Hi,

I found out that in the directory media of Speedy Net (https://github.com/speedy-net/speedy-net) on my computer, there are more than 200,000 unnecessary files and more than 20,000 folders. I checked the time the files were created and it seems that they were created because I ran Django tests locally. Why are so many files and folders created and remain undeleted after the tests end? I would expect all the temporary files to be deleted when the tests end. We have many tests (I think more than 1,000 tests - https://travis-ci.org/speedy-net/speedy-net/builds/551457609) and I ran them many times but I didn't expect so many unnecessary files to be created on my computer. Is there something I can do to prevent it?

I just ran all the tests locally now, after I deleted all the previous files and folder in media, and I found out that 903 files and 1,041 folders were created. I'm not sure which of our tests created these files and folders. Most of these files are either .jpg or .dat files. Is it possible to delete all these files automatically after the tests end?

Thanks,

--
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+unsubscribe@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/9b60069b-2515-40ce-a1bf-9aa994cd5e63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.