Re: I don't understand whats wrong with the way im passing django list to json

2014-07-29 Thread Tom Evans
On Tue, Jul 29, 2014 at 12:10 AM, G Z wrote: > so I'm trying to display some vm performance data on javascript charts. It > needs the information as a list, I have tried passing a json list from > django and a django list like below in the javascript i ahve the one they > tell me to use and the on

Re: How do I test my Django App on my Phone

2014-07-29 Thread vickster
//On the terminal type the below line. sudo python manage.py runserver 0.0.0.0:80 //type your password //on your phone you only need to open the browser and on the search bar input the network's ip address (both devices should be connected to the same network) Voila! El martes, 10 de dici

Compositional Templates Django

2014-07-29 Thread Secret
What is the best way to create modular templates? For example, if I have something like this: #base file:{header}{block content}{footer} #main file:{extends base}{block content definition} #product file:{extends base}{block content definition} This is the django way from what I understand - fi

simultaneously submit three forms on the same page

2014-07-29 Thread Devin Cky
*hi i am a beginner in django and I have a problem .. how can I validate 3 forms on the same page **simultaneously ..please help me* -- 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 i

Using Django as a centralised auth server?

2014-07-29 Thread Stodge
I have several Django websites and I want to create a centralized auth provider. The auth provider site would contain the user accounts and be the only repository for user details and passwords. Users would log into the auth provider site and when they visit each satellite website for the first

Re: simultaneously submit three forms on the same page

2014-07-29 Thread Babatunde Akinyanmi
Hi Devin, On 29 Jul 2014 12:33, "Devin Cky" wrote: > > hi i am a beginner in django and I have a problem .. how can I validate 3 forms on the same page simultaneously ..please help me > This is what formsets were made for. > -- > You received this message because you are subscribed to the Googl

Re: simultaneously submit three forms on the same page

2014-07-29 Thread Tom Evans
On Tue, Jul 29, 2014 at 12:31 PM, Devin Cky wrote: > hi i am a beginner in django and I have a problem .. how can I validate 3 > forms on the same page simultaneously ..please help me > If they are different types of forms, you cannot use a formset. In that case, just test whether all forms are

Re: Compositional Templates Django

2014-07-29 Thread Tom Evans
On Tue, Jul 29, 2014 at 9:41 AM, Secret wrote: > What is the best way to create modular templates? > > For example, if I have something like this: > > #base file: > {header} > {block content} > {footer} > > #main file: > {extends base} > {block content definition} > > #product file: > {extends bas

Re: simultaneously submit three forms on the same page

2014-07-29 Thread John
How can one submit 3 forms simultaneously?? Even ajax, is on by one! Sent from my iPhone > On Jul 29, 2014, at 08:46, Babatunde Akinyanmi wrote: > > Hi Devin, > > On 29 Jul 2014 12:33, "Devin Cky" wrote: > > > > hi i am a beginner in django and I have a problem .. how can I validate 3 > > fo

user object's is_authenticated() method ALWAYS return True even after they log out??

2014-07-29 Thread Chris Seberino
I tried viewing the value of is_authenticated() for a user and it always is true...before and after logging in and after signing out. I'm trying to determine if a user has logged in or not. Is this the right variable to use? Why not changing? Thanks. cs -- You received this message becaus

Re: user object's is_authenticated() method ALWAYS return True even after they log out??

2014-07-29 Thread Andreas Kuhne
Hi Chris, is_authenticated() on a User should always be true. The reason for this is that you check the function on the request.user object. When a user is logged in, it will be true, however, the AnonymousUser returns false, which is the default when a user has not logged in. So you can only che

Re: simultaneously submit three forms on the same page

2014-07-29 Thread Santiago Lamora
2014-07-29 16:50 GMT+02:00 John : > How can one submit 3 forms simultaneously?? Even ajax, is on by one! > > Quotting https://docs.djangoproject.com/en/dev/ref/forms/api/#prefixes-for-forms > You can put several Django forms inside one tag. To give each Form its own namespace, use the prefix keyw

Re: I don't understand whats wrong with the way im passing django list to json

2014-07-29 Thread G Z
> > Tom, I have done alot actually, I have put the data into a json array, a list, a tupple, a dictionary. I have tried the following: my data has been passed in every possible way I can think of. What I need to know how to do is convert a python list I pass with django to a javascript list b

Re: I don't understand whats wrong with the way im passing django list to json

2014-07-29 Thread G Z
fixed it i was passing strings and not integers var randomScalingFactor = function(){ return Math.round(Math.random()*100)}; var lineChartData = { labels : ["1000","2000","3000","4000","5000","6000","7000", "8000", "9000", "1", "11000", "12000", "13000", "14000", "15000",], datasets : [ { l

Re: I don't understand whats wrong with the way im passing django list to json

2014-07-29 Thread G Z
["2014-07-28 14:24:11", "2014-07-28 14:24:11"] On Monday, July 28, 2014 5:10:50 PM UTC-6, G Z wrote: > > so I'm trying to display some vm performance data on javascript charts. It > needs the information as a list, I have tried passing a json list from > django and a django list like below in th

Re: I don't understand whats wrong with the way im passing django list to json

2014-07-29 Thread G Z
the values will show how, but i ran into another problem while trying to input the labels, labels need to be strings so I input them as an array such as the following: ["2014-07-28 14:24:11", "2014-07-28 14:24:11"] I saved it as a simple json in django and pass it to the webbrowser and then con

Re: simultaneously submit three forms on the same page

2014-07-29 Thread Devin Cky
On Tuesday, July 29, 2014 1:48:00 PM UTC, Tom Evans wrote: > > On Tue, Jul 29, 2014 at 12:31 PM, Devin Cky > wrote: > > hi i am a beginner in django and I have a problem .. how can I validate > 3 > > forms on the same page simultaneously ..please help me > > > > If they are different types

Django views for handling blobstore uploads

2014-07-29 Thread Gábor Major
Hi! I'm using Django 1.5 with Python 2.7 running in Google App Engine. I got into this project recently, the former programmers didn't use the webapp framework, but now I have to be able to make file upload possible with large files (GAE doesn't allow more than 1 MB). I tried to make blobstore

plz help me to learn django

2014-07-29 Thread Soumya Verma
i m a beginner in this area, plz help me to learn this. i dnt know how to create django project...:( > 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 em

Re: plz help me to learn django

2014-07-29 Thread François Schiettecatte
Two great resources: https://www.djangoproject.com https://docs.djangoproject.com/en/1.6/intro/tutorial01/ http://www.djangobook.com/en/2.0/index.html François On Jul 29, 2014, at 1:13 PM, Soumya Verma wrote: > > i m a beginner in this area, plz help me to learn thi

asyncio integration /benefits & performance

2014-07-29 Thread sastry mln
Hi All, Recently there was a presentation in our company about node.js and the success stories of using it in walmart and linkedin (it was 2 years old story but news to me). And i started googling about this concept of asychronous I/O and bumped into youtube video about *asyncio *by G

Re: simultaneously submit three forms on the same page

2014-07-29 Thread C. Kirby
They are not getting validated, or validation is failing. Also, it looks like you are using model forms. You can get rid of all the for,.cleaned_data.get lines and just use: if emet_form.is_valid() and des_form.is_valid() and fich_form.is_valid(): emet = emet_form.save() des = des_fo

Re: simultaneously submit three forms on the same page

2014-07-29 Thread C. Kirby
They are not getting validated, or validation is failing? Also, it looks like you are using model forms. You can get rid of all the for,.cleaned_data.get lines and just use: if emet_form.is_valid() and des_form.is_valid() and fich_form.is_valid(): emet = emet_form.save() des = des_

Re: I don't understand whats wrong with the way im passing django list to json

2014-07-29 Thread G Z
solved date_values= json.dumps(list(date_values), cls=DjangoJSONEncoder) var date_values = {{ date_values|safe }}; var lineChartData = { labels : date_values, datasets : [ { label: "CPU Usage in MHZ", fillColor : "rgba(220,220,220,0.2)", strokeColor : "rgba(220,220,220,1)", pointColor : "rgba(220

Re: asyncio integration /benefits & performance

2014-07-29 Thread Avraham Serour
I believe this would be out of scope to django. nginx+uwsgi to serve your django apps is pretty fast, and don't use much memory or processor, what else do you need? much of performance problems can be solved by using cache properly On Tue, Jul 29, 2014 at 8:21 PM, sastry mln wrote: > Hi All, >

Django package to convert Less to CSS

2014-07-29 Thread Chen Xu
Hi, Everyone I am wondering is there a good django package that can convert less file into css file? Thanks -- ⚡ Chen Xu ⚡ -- 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, sen

Re: asyncio integration /benefits & performance

2014-07-29 Thread carlos
If you need real time application i thing you need read about gevent http://www.gevent.org/ other lecture is socketio and exit third app django https://github.com/stephenmcd/django-socketio and here other thing http://www.pixeldonor.com/2014/jan/10/django-gevent-and-socketio/ Cheers On Tue, Jul

Re: Django package to convert Less to CSS

2014-07-29 Thread carlos
https://pypi.python.org/pypi/lesscss Cheers On Tue, Jul 29, 2014 at 3:27 PM, Chen Xu wrote: > Hi, Everyone > I am wondering is there a good django package that can convert less file > into css file? > > > Thanks > > > -- > ⚡ Chen Xu ⚡ > > -- > You received this message because you are subscrib

images umpload prob

2014-07-29 Thread ngangsia akumbo
i have the following MODEL from django.db import models class Timer(models.Model): title = models.CharField(max_length=100) slug = models.SlugField(unique=True) image2 = models.ImageField(upload_to='image2/') last_seen = models.IntegerField() def __unicode__(self): r

update a field of a related table on form save

2014-07-29 Thread Brad Rice
I have three tables. The first one is application which has a flag for if an app has been submitted as well as created date and modified date. The other two tables relate to the application table. I have two forms that get update those tables. What I want to do is update the application modified

Django 1.7 - What are you most excited about?

2014-07-29 Thread Ryan Blunden
Hi everyone, I'm giving a lightening talk at the San Francisco Django meetup tomorrow night about some of the awesome new features in Django 1.7. I wanted to highlight not just what *I think* are the best new features, but what members of the community are most excited about. Would be great to

Re: images umpload prob

2014-07-29 Thread Mario Gudelj
Use the url it gives you inside src attribute inside img tag. On 30/07/2014 1:19 pm, "ngangsia akumbo" wrote: > i have the following > > MODEL > > from django.db import models > > class Timer(models.Model): > title = models.CharField(max_length=100) > slug = models.SlugField(unique=True)

Re: Django package to convert Less to CSS

2014-07-29 Thread Chen Xu
I tried this, but I got errors like: /Library/Ruby/Gems/2.0.0/gems/less-2.4.0/bin/lessc:100:in `read': No such file or directory - /Users/xuchen81/Desktop/hw-kkworld/assets/less/kk-less/_global.css (Errno::ENOENT) from /Library/Ruby/Gems/2.0.0/gems/less-2.4.0/bin/lessc:100:in `' from /usr/bin/le

Re: Django 1.7 - What are you most excited about?

2014-07-29 Thread carlos
Hi maybe you need read the release note Django 1.7 about the new features https://docs.djangoproject.com/en/dev/releases/1.7/ Cheers :) On Tue, Jul 29, 2014 at 7:31 PM, Ryan Blunden wrote: > Hi everyone, > > I'm giving a lightening talk at the San Francisco Django meetup tomorrow > night about

writing simple forms

2014-07-29 Thread Dtr Prasad
I want write simple forms like file uploading,sesion tracking using python modules. How can it be done through Django,does not require model

Re: writing simple forms

2014-07-29 Thread carlos
Hi, this is for you https://docs.djangoproject.com/en/dev/topics/forms/ Cheers On Tue, Jul 29, 2014 at 8:52 PM, Dtr Prasad wrote: > I want write simple forms like file uploading,sesion tracking using python > modules. > How can it be done through Django,does not require model > > > > > > > > >

running script in django database

2014-07-29 Thread alghafli
Hello, I made a library application using django 1.6. currently I only need to populate the database. at the beginning, it is easier to write the information in a csv file and import it using a script. the script is running fine if I use manage.py shell and import the necessary file and call

Re: asyncio integration /benefits & performance

2014-07-29 Thread Russell Keith-Magee
Hi, On Wed, Jul 30, 2014 at 1:21 AM, sastry mln wrote: > Hi All, > >Recently there was a presentation in our company about node.js and > the success stories of using it in walmart and linkedin (it was 2 years old > story but news to me). And i started googling about this concept of > asy

Re: Django 1.7 - What are you most excited about?

2014-07-29 Thread Russell Keith-Magee
Hi Ryan, On Wed, Jul 30, 2014 at 9:31 AM, Ryan Blunden wrote: > Hi everyone, > > I'm giving a lightening talk at the San Francisco Django meetup tomorrow > night about some of the awesome new features in Django 1.7. > > I wanted to highlight not just what *I think* are the best new features, > b

Re: plz help me to learn django

2014-07-29 Thread memilanuk
On 07/29/2014 10:15 AM, François Schiettecatte wrote: Two great resources: https://www.djangoproject.com https://docs.djangoproject.com/en/1.6/intro/tutorial01/ http://www.djangobook.com/en/2.0/index.html Not sure I'd recommend djangobook.com... from their own site:

Re: update a field of a related table on form save

2014-07-29 Thread Babatunde Akinyanmi
Hi Brad, my response is inline On 30 Jul 2014 02:26, "Brad Rice" wrote: > > I have three tables. The first one is application which has a flag for if an app has been submitted as well as created date and modified date. The other two tables relate to the application table. I have two forms that ge

(ModelForm) confusion

2014-07-29 Thread Kamal Kaur
Greetings! What I have done: There are four tables, from which I have generated ModelForms. Getting the WorkerDetails from one side, adding the salary and attendance things from the other side as the view says. If there is at least one row added in WorkerDetail table, then it directly asks to add