How to serve static files on heroku without any cloud storage like Amazon S3

2012-07-07 Thread surya
My project is on heroku and my website templates has some CSS, JS files. Totally 5 of them. I don't want to get off with amazon s3 for the sake of those 5 files (very small ones). However, I even need to enter my credit -card, which I don't like :P So, as far as I know, my only option is to

database values in a select form.

2012-07-07 Thread Lee Hinde
I have a table, Choice, that is used to build common lists. For instance, there might be a list "Employment_Status" with values "Full-Time" and "Part-Time" I want to use those values in various forms, so in the appropriate models.py I have: def _get_list_choices(list): choices =

Signal receivers not registered in the app. They work fine in shell

2012-07-07 Thread Mario Gudelj
Forgot to add subject. Sorry! -- Hi djangoers, I have signals issue I can not figure out. NAy help is greatly appreciated. So, I have defined my own signal like this in my signals.py: --- signals.py --- from django.dispatch import Signal # Sent when a payment is successfully

[no subject]

2012-07-07 Thread Mario Gudelj
Hi djangoers, I have signals issue I can not figure out. NAy help is greatly appreciated. So, I have defined my own signal like this in my signals.py: --- signals.py --- from django.dispatch import Signal # Sent when a payment is successfully processed. payment_successful =

Re: Render time

2012-07-07 Thread Larry Martell
On Mon, Jun 25, 2012 at 9:04 PM, Andy McKay wrote: >> Now they want me to add to that how long >> the browser takes to render the page after it gets the data. > > You can use the navigation timing API: > >

Re: Form wizard and dynamic fields

2012-07-07 Thread Leandro Alves
Does anyone have any advice please? :) Thanks, Leandro On 7. juli 2012, at 02:33, Leandro Alves wrote: > Hello, > > I'm starting to use Django now and I would need some orientations in order to > create a Form Wizard. > > The idea is simple: > > The first form will

Re: Problem with DetailView

2012-07-07 Thread Soviet
But the ListView is working fine. And they don't use in the documentation, just this, which I modified to fit my model: urlpatterns = patterns('', (r'^publishers/$', ListView.as_view( model=Publisher, )), ) W dniu sobota, 7 lipca 2012 22:44:23 UTC+2 użytkownik Sam007 napisał: >

Re: Problem with DetailView

2012-07-07 Thread kooliah
On 07/07/2012 10:36 PM, Soviet wrote: Now that I have basic understanding of models, I encountered even more confusing subjects - views and urls. Now, the class-generic views are quite easy to grasp at basic level, but I fail to understand what's wrong with this code: urlpatterns =

Re: Problem with DetailView

2012-07-07 Thread Smaran Harihar
If I am not wrong. The issue is with the List View not Detail View. You need to provide, List View with query set. If you are providing model parameter, you will also need to give it a primary key 'pk', like you did for Detail View. Hope that helps, Smaran On Jul 7, 2012 3:36 PM, "Soviet"

Problem with DetailView

2012-07-07 Thread Soviet
Now that I have basic understanding of models, I encountered even more confusing subjects - views and urls. Now, the class-generic views are quite easy to grasp at basic level, but I fail to understand what's wrong with this code: urlpatterns = patterns('', (r'^$', ListView.as_view(

Re: help with rss feed ImproperlyConfigured

2012-07-07 Thread psychok7
anyone?? On Saturday, July 7, 2012 3:52:52 AM UTC+1, psychok7 wrote: > > hi, i am trying to implement the syndicate feed framework simple rss with > my program, but i get a ImproperlyConfigured at /latest/feed/ > > Give your Debt class a get_absolute_url() method, or define an item_link() >

Re: migration via south for inheritance change -> please help

2012-07-07 Thread Tomas Neme
> and I do > for fruit in Fruits.objects.all(): fruit.rott() > > will anything happen at all? I know in C++ this would work... ;-) > > on database-level I know how to do it, I just don't know if the django > abstraction handles this automalically. I.. don't know. I'd think yes, at least I wonder

Re: migration via south for inheritance change -> please help

2012-07-07 Thread Daniel Walz
Hi again, 2012/7/7 Tomas Neme : >> The big difference is, -as I see it- I will not get real polymorphism, >> as the base class would need to do the join on all it's child classes. >> Is that true? > > with abstract models you won't get polymorphism at all, in the > database

Re: submit parameters to py script

2012-07-07 Thread Daniel Walz
Hi Samir and Babatunde, 2012/7/7 Babatunde Akinyanmi : > However, I don't think its possible to send both an html page and a > CSV so I guess you'll have to choose one or send them one at a time > (html page then csv). I'm sure Mevlyn will know if its possible > though. >

Re: migration via south for inheritance change -> please help

2012-07-07 Thread Tomas Neme
> The big difference is, -as I see it- I will not get real polymorphism, > as the base class would need to do the join on all it's child classes. > Is that true? with abstract models you won't get polymorphism at all, in the database level (this is, you WON'T be able to do Fruit.objects).

Re: submit parameters to py script

2012-07-07 Thread zae bee
I know that in django has database routes. May be, that cat you help? https://docs.djangoproject.com/en/dev/topics/db/multi-db/#using-routers суббота, 7 июля 2012 г., 2:20:59 UTC+4 пользователь Sam007 написал: > > Hey Djangoers, > > I am trying to execute a python script on submit button on a

Re: migration via south for inheritance change -> please help

2012-07-07 Thread Daniel Walz
Thanks guys for this helpfull discussion 2012/7/5 Tomas Neme : > [...] I assumed > he maybe doesn't know about abstract models because he said he's just > getting started programming (or at least on py/dj) and maybe he wasn't > sure what behavior he needed, and what were

Re: Model for ListView needed?

2012-07-07 Thread Smaran Harihar
Thanks for the reply Melvyn. So by multiple model instances you mean the multiple records that poll app has in it's database? On Fri, Jul 6, 2012 at 3:22 AM, Melvyn Sopacua wrote: > On 6-7-2012 0:35, Smaran Harihar wrote: > > Thanks for the reply Luigi, but when should we

Re: submit parameters to py script

2012-07-07 Thread Smaran Harihar
Once again thanks for the helpful guidance Melvyn and Babatunde. Babatunde: I will go through the links you provided and come back with new queries. Melvyn : Ya, I am a newbie in Django but have Web Development exp. There is one problem when I wish to create models and queryset for connecting to

Re: If using South, does it even matter what the underlying database is?

2012-07-07 Thread kenneth gonsalves
On Sat, 2012-07-07 at 12:34 +0100, houmie wrote: > # "local" is for Unix domain socket connections only > local all all peer > > to > > # "local" is for Unix domain socket connections only > local all all trust > > > Is this the normal approach? Do I have to do the

Re: If using South, does it even matter what the underlying database is?

2012-07-07 Thread houmie
Oh one more thing: I have created a new superuser for postgre called django_user Now when I try to connect to it it says: FATAL: Peer authentication failed for user "django_user" But the password is correct, I had no choice than change the settings in /etc/postgresql/9.1/main/pg_hba.conf

Re: submit parameters to py script

2012-07-07 Thread Melvyn Sopacua
On 7-7-2012 11:44, Smaran Harihar wrote: > Thanks for the reply Melvyn and Babatunde. So my script is, using the > parameters, to search in a database and then spitting out the output back > as CSV. This only makes sense in the django world, if your script is accessing a database that is not part

Re: submit parameters to py script

2012-07-07 Thread Babatunde Akinyanmi
Errr, have you read this: https://docs.djangoproject.com/en/1.4/howto/outputting-csv/ Your view can know if a form was submitted, submitted but with invalid data and submitted with valid data. A view is just a python function so if you have determined that the user submitted valid data, just go

Re: submit parameters to py script

2012-07-07 Thread Smaran Harihar
Thanks for the reply Melvyn and Babatunde. So my script is, using the parameters, to search in a database and then spitting out the output back as CSV. I wish to return the CSV and also display the output in the table on my html template. Ok, so adding it to view makes more sense, but how do i

Re: how to use HTTPS with django

2012-07-07 Thread Timothy Makobu
I would think he would have areas that need to be logged in to all SSL. He already has the cert for SSL logins, and its prudent these days to have such apps all SSL, with tools making it straight forward to lift unencrypted traffic off a network. On Sat, Jul 7, 2012 at 11:28 AM, Melvyn Sopacua

Re: submit parameters to py script

2012-07-07 Thread Melvyn Sopacua
On 7-7-2012 0:20, Smaran Harihar wrote: > I am trying to execute a python script on submit button on a html file. > > So i have created a view which renders a html template file and on > 'submit', I wish to send few parameters to the py script. > > I wanted to know, > > 1. where should I keep

Re: how to use HTTPS with django

2012-07-07 Thread Melvyn Sopacua
On 7-7-2012 10:27, Timothy Makobu wrote: > " I want to know how to use HTTPS to securely login ..." which satisfies > the first part of the question. This way it wont be possible to login > without HTTPS enabled for the project. What use is logging in if you're logged out the minute the

Re: how to use HTTPS with django

2012-07-07 Thread Timothy Makobu
" I want to know how to use HTTPS to securely login ..." which satisfies the first part of the question. This way it wont be possible to login without HTTPS enabled for the project. On Sat, Jul 7, 2012 at 11:22 AM, Melvyn Sopacua wrote: > On 7-7-2012 5:05, Timothy Makobu

Re: how to use HTTPS with django

2012-07-07 Thread Melvyn Sopacua
On 7-7-2012 5:05, Timothy Makobu wrote: > For secure logins, this helps > https://docs.djangoproject.com/en/dev/topics/http/sessions/?from=olddocs/#session-cookie-secure > No it doesn't. That is for secure /sessions/, which means that if you use this during the login process then the session is

Re: submit parameters to py script

2012-07-07 Thread Babatunde Akinyanmi
Hi, Just like Rohan said, why not do that in your view when processing your form? Here's from the documentation: https://docs.djangoproject.com/en/1.4/topics/forms/?from=olddocs On 7/7/12, Smaran Harihar wrote: > Thanks for the reply Rohan. I am trying to create a