Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Web Architect
Hi Nikolas, I am new to uwsgi. Top is showing CPU consumption by uwsgi. Following is my uwsgi configuration: master=True socket=:7090 max-requests=5000 processes = 4 threads = 2 enable-threads = true #harakiri = 30 (not sure if using this would be a good idea) stats = 127.0.0.1:9191 HW i

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Web Architect
Hi Will, In fact thats what I am doing currently. Also, trying to run the load as per the production (similar RPS etc based on reports from ngxtop). But unfortunately not able to generate the CPU usage spike on development (similar to production). Thanks. On Wednesday, February 24, 2016 at 7:

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Web Architect
Hi Javier, I am new to uwsgi. The CPU usage is what top is reporting. Is there a way to optimise uwsgi? Thanks. On Wednesday, February 24, 2016 at 7:06:34 PM UTC+5:30, Javier Guerra wrote: > > On 24 February 2016 at 13:18, Avraham Serour > wrote: > >> sometimes going beyond 100% > > > > ho

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Web Architect
Hi Avraham, Please find my comments inline. On Wednesday, February 24, 2016 at 6:49:29 PM UTC+5:30, Avraham Serour wrote: > > > sometimes going beyond 100% > > how?? > > That's what I am trying to figure out :) > You can use django-debug-toolbar on your development machine, check the > logs

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Web Architect
Hi Asif, The OS is CentOS 6 Linux - HW is a dual core processor. Running Django with uwsgi. uwsgi is configured with 4 processes and 2 threads (no logic behind the numbers but trying to find the optimal combination). I just ran top and was checking the CPU usage. Mostly two instances of uwsgi i

Re: tutorial?

2016-02-24 Thread Tanuka Dutta
http://www.django-rest-framework.org/ - Tanuka On Wednesday, 24 February 2016 17:48:17 UTC+5:30, Mitesh Prajapati wrote: > > I'm new to Django/Python world. > > I want references(book/tutorials) to learn "how to build REST APIs with > Django" using ORM? > > > Thanks in advance! > -- You recei

Re: Home Page

2016-02-24 Thread Andreas Kuhne
Malik, I find that in many of your questions you are thinking a bit too hard. If you want to have a view for the default page (home page) on a website, just create an app that will handle those pages. In one project that I am currently working on, we created an app called website. In that app we

Re: null datetime field and json fixtures

2016-02-24 Thread James Schneider
On Wed, Feb 24, 2016 at 11:26 AM, Malik Rumi wrote: > I am pursuing the debug option now to see what I can learn. > > > Have you looked at enabling tracebacks (--traceback) and increasing the verbosity of the loaddata command (-v {0,1,2,3}, --verbosity {0,1,2,3})? $ python manage.py help loadda

Re: context dictionary

2016-02-24 Thread Vijay Khemlani
Django 'is' a framework, therefore you have the flexibility to create your context as you see fit. You could call an external API, query your database, obtain results from ElasticSearch, parse another webpage, or anything that suits the needs of your particular project. It completely depends on th

Re: Home Page

2016-02-24 Thread Rafael E. Ferrero
Malik, this is an example of a homepage in a site already in production. Look this site www.python.org.ar, this homepage have the urls.py in this github repository in line 32. You can find the view here

Re: context dictionary

2016-02-24 Thread Malik Rumi
1. is { 5:five, 6:six} and {4:four) two dictionaries, or three? 2. Suppose I had a really long, or large, context, where the key is one of the 50 states and the value is the date of their admission to the Union (of the United States, of course). If that doesn't work, make it nations and the date t

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Nikolas Stevenson-Molnar
Just to be clear: is is the uwsgi process(es) consuming the CPU? I ask because you mention DB queries, which wouldn't impact the CPU of uwsgi (you'd see that reflected in the database process). On Tuesday, February 23, 2016 at 8:59:28 PM UTC-8, Web Architect wrote: > > Hi, > > We have an ecommer

Alternative Amazon S3?

2016-02-24 Thread setivolkylany
What Alternative Amazon S3 for serve media(uploaded) on website (Heroku hosting)? I need only storage for media files because Heroku deleting my files -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop recei

Re: Home Page

2016-02-24 Thread Malik Rumi
> I'm not sure what you're looking for here. Designing a home page is not a django topic. Using django to deliver a homepage is the same as delivering any other page Please don't take offense, Bob, I appreciate you taking the time to respond. I could not disagree with you more. Every web site has

Re: null datetime field and json fixtures

2016-02-24 Thread Malik Rumi
I am pursuing the debug option now to see what I can learn. On Fri, Feb 19, 2016 at 5:29 PM, Michal Petrucha < michal.petru...@konk.org> wrote: > On Fri, Feb 19, 2016 at 10:20:42AM -0600, Malik Rumi wrote: > > In [1]: import uuid > > > > In [2]: uuid.UUID('61877565-5fe5-4175-9f2b-d24704df0b74

Re: null datetime field and json fixtures

2016-02-24 Thread Malik Rumi
Sorry to have dropped out for a few days there. James, when I said I only have this one I should clarify. I had 90 records I wanted to put into one model, and 1 record to put into another. The 1 record is linked to by a fk from the other 90. For whatever reason, I was able to put the single record

django-tinymce not rendering in IE11

2016-02-24 Thread frocco
Hello, Works fine in Chrome or Firefox. Does not render using IE11. did pip install django-tinymce Can someone help me with this? 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

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Will Harris
Hey Web Architect, I guess you never got that DB dump running in development? ;-) Why don't you run some profiling middleware to see if you can some traces of the production system? Or how about New Relic or some such? That's pretty good at helping to identify problems spots in your stack. Fin

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Javier Guerra Giraldez
On 24 February 2016 at 13:18, Avraham Serour wrote: >> sometimes going beyond 100% > > how?? if it's what top reports, 100% refers to a whole core. a multiforking server (like uWSGI) can easily go well beyond that. and that's not a bad thing -- Javier -- You received this message because y

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Avraham Serour
> sometimes going beyond 100% how?? You can use django-debug-toolbar on your development machine, check the logs for the pages that take the longest to process and the one that are the most requested and start with those, of course your CPU won't be high but you should check and compare if there

Re: tutorial?

2016-02-24 Thread Rafael E. Ferrero
look for django-rest-framework Rafael E. Ferrero 2016-02-24 4:28 GMT-03:00 Mitesh Prajapati : > I'm new to Django/Python world. > > I want references(book/tutorials) to learn "how to build REST APIs with > Django" using ORM? > > > Thanks in advance! > > -- > You received this message because yo

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Asif Saifuddin
What is your server configuration and system usage statistics? On Wednesday, February 24, 2016 at 10:59:28 AM UTC+6, Web Architect wrote: > > Hi, > > We have an ecommerce platform based on Django. We are using uwsgi to run > the app. The issue the CPU usage is hitting the roof (sometimes going >

tutorial?

2016-02-24 Thread Mitesh Prajapati
I'm new to Django/Python world. I want references(book/tutorials) to learn "how to build REST APIs with Django" using ORM? 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

Getting django.db.utils.IntegrityError When migrating data from SQLite to postgreSQL

2016-02-24 Thread vaibhav jain
Please can someone help me to fix this issue -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from thi

Re: django css: general query on CDNs and crispy forms

2016-02-24 Thread Adailton (Dhelbegor)
you have a problem here: INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'myproject.myapp', ###Missed the point ( , ) 'crispy_forms', ###Registered ) -- You r