Problem with static in Django 1.5 virtualenv

2013-08-01 Thread Jairo Alonso Velásquez
Hi community, I posted a problem here: http://stackoverflow.com/questions/18005574/django-1-5-get-404-on-static-files I will do it again here if somebody can help me: I need a little help with this, I've been searching for a solution with no results. This are my settings: settings.py: STATIC_

Django App - Accessing Remote MySQL Database

2013-08-01 Thread Ji Park
Hello, I'm trying to make an app that can periodically access a remote mysql database. This app will query the remote database and copy some data to the local postgresql database. So far I know that celery can be used to schedule periodic tasks, but I'm not sure what to do about querying the r

Re: Integrate django app with EBS payment gateway

2013-08-01 Thread Russell Keith-Magee
On Thu, Aug 1, 2013 at 9:18 PM, steve jobs wrote: > I am using django and designed a website, and now i got to implement > payment gateway functionality. > > Actually how to integrate a django app with payment gateways ? > Whether there are any packages already available to get an idea because i >

Re: Importing project URLs without a database

2013-08-01 Thread Jon Dufresne
On Thu, Aug 1, 2013 at 2:38 PM, Phil wrote: > Could you post the entire content of your script? There is no way those 2 > lines (and the necessary "os" import) can cause this error. > > > You are right. I investigated much deeper. Turns out this is what I did. 1. Script imported root URL conf 2.

Re: Importing project URLs without a database

2013-08-01 Thread Phil
Could you post the entire content of your script? There is no way those 2 lines (and the necessary "os" import) can cause this error. Regards, Phil On Thursday, August 1, 2013 5:39:46 PM UTC-3, Jon Dufresne wrote: > > Hi, > > I am trying to write a script that outputs information about all URLs

Importing project URLs without a database

2013-08-01 Thread Jon Dufresne
Hi, I am trying to write a script that outputs information about all URLs in the project. The script should be able to do this without having a database populated or even created. Right now the script gets to the following line: os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")

Re: Django Signal DataBase Change on Template

2013-08-01 Thread carlos
Hi if you need create app for real time try this app can help you https://github.com/stephenmcd/django-socketio or find other app https://www.djangopackages.com/grids/g/websockets/ Cheers On Thu, Aug 1, 2013 at 10:59 AM, wrote: > Hi, > > Flot is your friend. Http://flotgraphs.org > > > > > Sen

Re: Ordering a queryset on a reverse foreign key's attribute

2013-08-01 Thread Daniele Procida
On Thu, Aug 1, 2013, Simon Charette wrote: >>From a quick look I'd also expect `order_by('-children__date')` to work. > >Can you provide the generated SQL query and some results? I have in fact raised a ticket about this which shows the generated se

Re: Django Signal DataBase Change on Template

2013-08-01 Thread acheraime
Hi, Flot is your friend. Http://flotgraphs.org Sent from my iPhone On Aug 1, 2013, at 10:54 AM, Saif Jerbi wrote: > I'm building a GPS Tracking System using Django, i should have a grid on my > template that display real time information of cars (position,vitesse, > temperature...). GPS s

Re: Upgrading to 1.5 on Centos

2013-08-01 Thread Bill Freeman
Move at least your settings.py into a new sub-directory named for the project (as with new projects in 1.4 or 1.5 -- you might make one if you haven't just to look at the directory structure), and add an __init__.py to that directory. You may need to (probably should) move your top level urls.py t

Re: SESSION_COOKIE_DOMAIN on multiple domains.

2013-08-01 Thread J. Cliff Dyer
published > > > anywhere yet. > > > > > > > > > Cheers, > > > Tom > > > > > > Dne Thu, 1 Aug 2013 06:41:20 -0700 (PDT) > > > "J. Cliff Dyer" > napsal(a): > > > > > > > Is there a wa

Re: Django Signal DataBase Change on Template

2013-08-01 Thread Bill Freeman
A lot of JavaScript is involved in doing this. I see three possible approaches: 1. Use a timer in JavaScript to cause the page to reload itself frequently. This isn't pretty. The page will glitch as it reloads. You will be reloading the whole page each time, which includes much that the browse

Re: SESSION_COOKIE_DOMAIN on multiple domains.

2013-08-01 Thread Tomas Ehrlich
t; > "J. Cliff Dyer" > napsal(a): > > > > > Is there a way to set the SESSION_COOKIE_DOMAIN for multiple domains, > > > possibly using the contrib.sites framework? > > > > > > We deploy on AWS, and when we roll out an update to o

Re: Upgrading to 1.5 on Centos

2013-08-01 Thread Larry Martell
On Thu, Aug 1, 2013 at 9:27 AM, Tom Evans wrote: > On Thu, Aug 1, 2013 at 4:10 PM, Larry Martell wrote: >> Thanks very much Tom. This explains a lot - we were using the 1.3 >> manage file with 1.4. I'm very close now, but I'm not sure what to put >> in for project_name - my project is called 'mot

Re: SESSION_COOKIE_DOMAIN on multiple domains.

2013-08-01 Thread J. Cliff Dyer
: > > > Is there a way to set the SESSION_COOKIE_DOMAIN for multiple domains, > > possibly using the contrib.sites framework? > > > > We deploy on AWS, and when we roll out an update to one of our site, we > > first create a new cloudformation stack, and attach a doma

Re: Ordering a queryset on a reverse foreign key's attribute

2013-08-01 Thread Simon Charette
>From a quick look I'd also expect `order_by('-children__date')` to work. Can you provide the generated SQL query and some results? Le jeudi 1 août 2013 09:58:25 UTC-4, Daniele Procida a écrit : > > I have an Event model: > > class Event(Model): > parent = models.ForeignKey('self',

Re: Django Signal DataBase Change on Template

2013-08-01 Thread C. Kirby
You are describing a push mechanism, ie. the server pushes new data to the client when it becomes available. That is basically untenable in a standard web server/client paradigm, and django explicitly is built for request/response pairs. That said, you can initiate the updates from the client.

Re: Upgrading to 1.5 on Centos

2013-08-01 Thread Tom Evans
On Thu, Aug 1, 2013 at 4:10 PM, Larry Martell wrote: > Thanks very much Tom. This explains a lot - we were using the 1.3 > manage file with 1.4. I'm very close now, but I'm not sure what to put > in for project_name - my project is called 'motor'. I tried > motor.settings, but I got 'could not imp

Re: SESSION_COOKIE_DOMAIN on multiple domains.

2013-08-01 Thread Tomas Ehrlich
and when we roll out an update to one of our site, we > first create a new cloudformation stack, and attach a domain name to it > like prod-oursite-20130801.devstacks.net. > > When we decide it's ready for production, we point www.oursite.com to the > stack.

Re: Upgrading to 1.5 on Centos

2013-08-01 Thread Larry Martell
On Thu, Aug 1, 2013 at 8:41 AM, Tom Evans wrote: > On Thu, Aug 1, 2013 at 3:17 PM, Larry Martell wrote: >> On Thu, Aug 1, 2013 at 2:30 AM, Branko Majic wrote: >>> On Wed, 31 Jul 2013 17:59:56 -0600 >>> Larry Martell wrote: >>> On my Mac, running python 2.7, I upgraded from 1.4 to 1.5 by do

Re: How template tag can receive values JS

2013-08-01 Thread Bill Freeman
If this is only to be done when loading a new page, then you could add the JS var value to the request as a query parameter. Then the view would have to pass the value to the template for the new page. On Thu, Aug 1, 2013 at 9:51 AM, Christian Erhardt < christian.erha...@mojo2k.de> wrote: > No,

Re: SESSION_COOKIE_DOMAIN on multiple domains.

2013-08-01 Thread Bill Freeman
our site, we > first create a new cloudformation stack, and attach a domain name to it > like prod-oursite-20130801.devstacks.net. > > When we decide it's ready for production, we point www.oursite.com to the > stack. This causes problems with the SESSION_COOKIE_DOMAIN, as we n

Django Signal DataBase Change on Template

2013-08-01 Thread Saif Jerbi
I'm building a GPS Tracking System using Django, i should have a grid on my template that display real time information of cars (position,vitesse, temperature...). GPS send data to Postgres DataBase via a module that parse Data and saved it in specific table. What i need is how to make my Web

Re: How to store position of current/active navigation entry

2013-08-01 Thread Bill Freeman
One traditional place to store navigation state is in the URL. If you are reloading the page with a new GET (such as because a link was clicked), you have to indicate what page to load in the URL, whether in the path or in the parameters. The view has access to the URL, and uses it to know where

Re: Upgrading to 1.5 on Centos

2013-08-01 Thread Tom Evans
On Thu, Aug 1, 2013 at 3:17 PM, Larry Martell wrote: > On Thu, Aug 1, 2013 at 2:30 AM, Branko Majic wrote: >> On Wed, 31 Jul 2013 17:59:56 -0600 >> Larry Martell wrote: >> >>> On my Mac, running python 2.7, I upgraded from 1.4 to 1.5 by doing this: >>> >>> rm -rf /Library/Python/2.7/site-package

Re: Upgrading to 1.5 on Centos

2013-08-01 Thread Larry Martell
On Thu, Aug 1, 2013 at 2:30 AM, Branko Majic wrote: > On Wed, 31 Jul 2013 17:59:56 -0600 > Larry Martell wrote: > >> On my Mac, running python 2.7, I upgraded from 1.4 to 1.5 by doing this: >> >> rm -rf /Library/Python/2.7/site-packages/django >> >> Followed by python setup.py install in the dir

SOLVED: modelformset_factory not validating multiple forms

2013-08-01 Thread Chris Ryan
I found the problem! The fields were being processed as expected but since I am using the FamilyMember table as the authentication table I needed to include the username and other fields (as hidden). On Thursday, August 1, 2013 9:13:18 AM UTC-4, Chris Ryan wrote: > > Hopefully this is an easy

Re: django jquery

2013-08-01 Thread Jonathan Baker
If you're a Django newb, I'd recommend first going through the Poll tutorial and then The Django Book . You need a fundamental understanding of Django (and HTML+JavaScript) to effectively develop w

Re: multiple templates fro single view

2013-08-01 Thread Fred Stluka
Can also use render_to_string(). --Fred Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: Without walls and fences, we need

Ordering a queryset on a reverse foreign key's attribute

2013-08-01 Thread Daniele Procida
I have an Event model: class Event(Model): parent = models.ForeignKey('self', related_name='children') date = models.DateField() My question is: given a queryset of this model, how can I order it based on the Events' children's dates so that (say) Events with child Events wit

Re: Avatar save

2013-08-01 Thread Harjot Mann
On Thu, Aug 1, 2013 at 2:37 PM, Deepak Sharma wrote: > I want that user save that cropped image to his/her favorite > destination (client side). You need to create a view in which you need to return response = HttpResponse(file(fullpath).read()) response['Content-Type'] = 'application/jpg' respo

How template tag can receive values JS

2013-08-01 Thread Christian Erhardt
No, what you are trying is not possible. The template tags are rendered on the server. They never appear on the client machine. Javascript is running on the client machine. They both will never see each other. You will always have to do a roundtrip to interact between Javascript and django temp

Re: How template tag can receive values JS

2013-08-01 Thread Larry Martell
On Thu, Aug 1, 2013 at 6:48 AM, Mário Idival wrote: > Good morning everyone, > I wonder how I can do (and if it is possible), pass a value of javascript > variable to a template tag Django. > > eg > how it works: > {{Document.id | split_filter}} -> split_filter is just a random method, > receives

SESSION_COOKIE_DOMAIN on multiple domains.

2013-08-01 Thread J. Cliff Dyer
Is there a way to set the SESSION_COOKIE_DOMAIN for multiple domains, possibly using the contrib.sites framework? We deploy on AWS, and when we roll out an update to one of our site, we first create a new cloudformation stack, and attach a domain name to it like prod-oursite-20130801

How to store position of current/active navigation entry

2013-08-01 Thread DJ-Tom
Hi, I'm currently creating a web app with django that will have a side bar menu with several sub-sections. I'm wondering if there is a "standard" way to store the "current" or "active" menu entry so I can highlite it in the menu area each time a request takes place. Is it possible to attach a

Re: Help getting started: Which server setup for a beginner? Apache? lighttpd? To use or not virtualenv?

2013-08-01 Thread Kelvin Wong
It is def worth taking the trouble to learn how to use virtualenv and virtualenvwrapper. Once they are set up and assuming that you haven't already put too much already into your global site-packages, they will save you time and greatly simplify keeping different project environments separate.

Re: Avatar save

2013-08-01 Thread Harjot Mann
On Thu, Aug 1, 2013 at 2:37 PM, Deepak Sharma wrote: > I want that user save that cropped image to his/her favorite > destination (client side). Hope this may help you. http://stackoverflow.com/questions/6121200/how-to-save-an-image-using-url-in-python-django -- Harjot Kaur Mann Blog: http://ha

Integrate django app with EBS payment gateway

2013-08-01 Thread steve jobs
I am using django and designed a website, and now i got to implement payment gateway functionality. Actually how to integrate a django app with payment gateways ? Whether there are any packages already available to get an idea because i am completely new in implementing this ? Particularly i w

Re: multiple templates fro single view

2013-08-01 Thread Lukas Nemec
On 08/01/2013 03:04 PM, Harjot Mann wrote: On Thu, Aug 1, 2013 at 6:10 PM, Lukas Nemec wrote: Well, after some consideration, result of a view is rendered HTML page which you send to browser, what do you mean by rendering multiple templates? are you talking about template inheritance = one ro

modelformset_factory not validating multiple forms

2013-08-01 Thread Chris Ryan
Hopefully this is an easy one. I have read through the documentation, searched online and just can't find a way around this error. I have two formsets that I've displayed in one view. The second formset is not validating upon POST so it won't save to the database. None of the fields are require

Re: I all django's user I'm new here and also new to Python+ django technology. but i wanna learn phython........

2013-08-01 Thread Lynn Fu
I very agree with Phil/ 在 2013年8月1日星期四UTC+8下午5时28分48秒,Rakesh Balhara写道: > > I all django's user I'm new here and also new to Python+ django > technology. but i wanna learn phython and i hv to make a project in this > technology so plzz tell me where from i start to learning i just want > to

Re: multiple templates fro single view

2013-08-01 Thread Harjot Mann
On Thu, Aug 1, 2013 at 6:10 PM, Lukas Nemec wrote: > Well, after some consideration, > > result of a view is rendered HTML page which you send to browser, > > what do you mean by rendering multiple templates? > are you talking about template inheritance = one root template which all > other templa

Re: How to display Chinese in django webpage

2013-08-01 Thread Lukas Nemec
Hi I'd suggest you to contact the developers of Zinnia blog, they should be able to help you easily Cheers :) Lukas On 08/01/2013 10:50 AM, zhao yan wrote: HELLO: I am a new django user I want to display Chinese in my webpage but it can't this is my settings.py: --

How template tag can receive values JS

2013-08-01 Thread Mário Idival
Good morning everyone, I wonder how I can do (and if it is possible), pass a value of javascript variable to a template tag Django. eg how it works: {{Document.id | split_filter}} -> split_filter is just a random method, receives an ID as would {{"Value Var JS" | split_filter}} -> pass the id tha

Re: multiple templates fro single view

2013-08-01 Thread Lukas Nemec
Well, after some consideration, result of a view is rendered HTML page which you send to browser, what do you mean by rendering multiple templates? are you talking about template inheritance = one root template which all other templates use? in that case, use {% extends 'root.html' %} tag, or

Re: I all django's user I'm new here and also new to Python+ django technology. but i wanna learn phython........

2013-08-01 Thread Phil
Hi, There are lots of excellent resources online to learn Django. I am myself going through that process. The best place to get started is, of course, the excellent Django documentation: https://docs.djangoproject.com/en/1.5/intro/tutorial01/ Finally, once you have a good grasp on the basics,

Re: User Permissions

2013-08-01 Thread Carlos Leite
On Wed, Jul 31, 2013 at 2:01 AM, Jani Tiainen wrote: > On Tue, 30 Jul 2013 16:39:27 -0300 > Carlos Leite wrote: > >> Django do not have a "per-row" permission system in the box. >> You will have to create that by yourself. > > That is slightly incorrect - Django _does_ have foundation for object

How to display Chinese in django webpage

2013-08-01 Thread zhao yan
HELLO: I am a new django user I want to display Chinese in my webpage but it can't this is my settings.py: - TIME_ZONE = 'Asia/Shanghai' USE_TZ = True USE_I18N = True USE_L10N = True LANGUAGE_CODE = 'zh-cn' LANGUAGES = ( ('zh_CN', gettext('S

Redirect Domain to specific Django App

2013-08-01 Thread BadStorm
Hi, I have a django project with 2 django app. My intent is to use the site framework to redirect one specific domain to one specific app. It is possible? Thanks Marco -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

I all django's user I'm new here and also new to Python+ django technology. but i wanna learn phython........

2013-08-01 Thread Rakesh Balhara
I all django's user I'm new here and also new to Python+ django technology. but i wanna learn phython and i hv to make a project in this technology so plzz tell me where from i start to learning i just want to learn it within one week... -- You received this message because you are subscri

multiple templates fro single view

2013-08-01 Thread Harjot Mann
In my project I have a view which renders to an html template but I want to render two templates at the same time from one view. How ca I do it?? -- Harjot Kaur Mann Blog: http://harjotmann.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "Django user

Re: South with MySQL?

2013-08-01 Thread Tom Evans
On Thu, Aug 1, 2013 at 10:56 AM, Nigel Legg wrote: > So is it something I have done wrong? From what you are saying it has run > the migration but I am not seeing that - still getting errors when I try to > access the page. If I do manag.py sql myapp I see the schema including the > new fields,

Re: South with MySQL?

2013-08-01 Thread Masklinn
On 2013-08-01, at 11:56 , Nigel Legg wrote: > So is it something I have done wrong? No. > From what you are saying it has run > the migration No, it has run *part* of the migration, then something failed during the migration. The part that's run is there, what came after the error did not run.

Re: South with MySQL?

2013-08-01 Thread Nigel Legg
So is it something I have done wrong? From what you are saying it has run the migration but I am not seeing that - still getting errors when I try to access the page. If I do manag.py sql myapp I see the schema including the new fields, but if I go into the shell, import the view, and do DataTabl

Re: South with MySQL?

2013-08-01 Thread Masklinn
On 2013-08-01, at 11:23 , Nigel Legg wrote: > So are you saying the migration wil or will not work with South using > MySQL?? No. I'm saying if the migration fails the database will be left in an intermediate (and likely incorrect) state. > What do I have to do, in addition to everything in the S

Re: South with MySQL?

2013-08-01 Thread Nigel Legg
So are you saying the migration wil or will not work with South using MySQL?? What do I have to do, in addition to everything in the South documentation, in orde3r to make a South migration work with MySQL, given what you have posted above? Regards, Nigel Legg 07914 740972 http://www.trevanianlegg

Avatar save

2013-08-01 Thread Deepak Sharma
Hello I am using django-avatar croping tool. Image crop well. That cropped image goes to avatar folder which is in /usr/local/lib/python2.7/dist-packages/django/contrib/admin/media/avatar/. I want that user save that cropped image to his/her favorite destination (client side). -- Deepak Kumar

Re: South with MySQL?

2013-08-01 Thread Masklinn
On 2013-08-01, at 10:09 , Nigel Legg wrote: > I tried to run a migration using south, and got the message: > "Since you have a database that does not support running schema-altering > statements in transactions, we have had to leave it in an interim state > between migrations." > Is this an incomp

Re: Upgrading to 1.5 on Centos

2013-08-01 Thread Branko Majic
On Wed, 31 Jul 2013 17:59:56 -0600 Larry Martell wrote: > On my Mac, running python 2.7, I upgraded from 1.4 to 1.5 by doing this: > > rm -rf /Library/Python/2.7/site-packages/django > > Followed by python setup.py install in the dir I untar-ed Django-1.5.1 > to. This all worked fine. > > > O

South with MySQL?

2013-08-01 Thread Nigel Legg
I tried to run a migration using south, and got the message: "Since you have a database that does not support running schema-altering statements in transactions, we have had to leave it in an interim state between migrations." Is this an incompatibility with MySQL, or because my DB is incorrectly c