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

2012-07-06 Thread m1chael
Hi! I personally find PostgreSQL much easier to work with. (and the docs are beautiful) MySQL has ugly docs, weird syntax, and it does unexpected strange things. (and their terms of use is a little weird I think too.. yes MySQL has burned me years ago and i've never forgiven it.) -endofrant-

Re: how to use HTTPS with django

2012-07-06 Thread Timothy Makobu
For secure logins, this helps https://docs.djangoproject.com/en/dev/topics/http/sessions/?from=olddocs/#session-cookie-secure On Fri, Jul 6, 2012 at 5:44 PM, John DeRosa wrote: > On Jul 6, 2012, at 4:24 AM, Melvyn Sopacua wrote: > > > On 6-7-2012 8:08, heni yemun wrote: > >

Re: help with rss feed ImproperlyConfigured

2012-07-06 Thread psychok7
on my feed.py i have class LatestEntriesFeed(Feed): title = "Chicagocrime.org site news" link = "/blog/" description = "Recent Posts" def items(self): return Debt.objects.all().order_by('-creation_date')[:10] can anyone help me? On Saturday, July 7, 2012 3:52:52 AM

help with rss feed ImproperlyConfigured

2012-07-06 Thread psychok7
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() method in your Feed class. I know i am supposed to create a get_absolute_url in my

Re: {% spaceless %} abuse (?)

2012-07-06 Thread Russell Keith-Magee
On Sat, Jul 7, 2012 at 1:53 AM, Dennis Lee Bieber wrote: > On Fri, 6 Jul 2012 21:15:40 +0800, Russell Keith-Magee > declaimed the following in > gmane.comp.python.django.user: > >> I'm sorry? I don't understand what you're driving at here. What is

Re: A single file that contains common django imports

2012-07-06 Thread Russell Keith-Magee
On Sat, Jul 7, 2012 at 3:29 AM, Scott Woodall wrote: > Would there be any issues with creating a single file contains common django > modules I use, then importing that file into my views, models etc. > > Example: > > common_imports.py > === > from django.conf

Re: submit parameters to py script

2012-07-06 Thread Smaran Harihar
Thanks for the reply Rohan. I am trying to create a Django App in which, user will be adding some info in the text box and on clicking submit, I wish to send the contents of the textbox to the py script. The output of the py script, I wish to display it in a table on my HTML template. I hope I

Re: submit parameters to py script

2012-07-06 Thread Rohan
For a cgi script or a wsgi script, all you need to do is add a script alias in your apache conf (if you're using apache). The parameters should be available as a a dictionary in both the cases (cgi.FieldStorage() and envrion). Although it would help to know why you want to do this. If you

Form wizard and dynamic fields

2012-07-06 Thread Leandro Alves
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 contain only one field to type the name of a directory. - The content of the second form, will depend on the directory name that

Form wizard and dynamic fields

2012-07-06 Thread Leandro Alves
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 contain only one field to type the name of a directory. The content of the second form, will depend on the directory name that was entered and the

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

2012-07-06 Thread houmie
Thanks everybody for the encouragement. Just to let you know you convinced me not giving up on postgresql. It is actually quite nice that rules are tighter, to see right away what might be wrong (e.g. field length etc) Starting up with postgresql is much harder than MySQL, but then it

submit parameters to py script

2012-07-06 Thread Smaran Harihar
Hey Djangoers, 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 my py script? 2. I have not modified my

Re: Still need help with the 405....please

2012-07-06 Thread Jeff Silverman
Nik I was trying to figure out how to make web services on such a way that I could import the wsdl into an info path form eventually pulling data from f5 ltm devices. Sort of ambitious I think but djamgo is supposed to be easy. Not. On Friday, July 6, 2012, Nikolas Stevenson-Molnar wrote: >

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

2012-07-06 Thread Melvyn Sopacua
On 6-7-2012 17:56, Houmie wrote: > The only reason I was considering postgresql was that some research > suggested postgresql has much better support for changing Schemas along the > way than MySQL. There are many advantages for Postgresql and some for MySQL. But this isn't a good reason to

Re: Acessing data on Model/Detail classes

2012-07-06 Thread Melvyn Sopacua
On 6-7-2012 17:14, Fabiano Martins wrote: > My idea was centralize the validation in the Model to allow use it on > several clients besides the primary Web page (such as a batch program, a > web service, etc.) Yes, and normally the clean() method is the right method, but ... > At this moment, the

Re: Returning nothing from a view

2012-07-06 Thread Larry Martell
On Fri, Jul 6, 2012 at 2:47 PM, Tomas Neme wrote: > Just return an empty response, with a 200 OK code: > > return HttpResponse("") > > I'm not sure whether you can omit the "" Thanks. I did this: return HttpResponse(status=201) > On Fri, Jul 6, 2012 at 5:44 PM,

Re: Returning nothing from a view

2012-07-06 Thread Tomas Neme
Just return an empty response, with a 200 OK code: return HttpResponse("") I'm not sure whether you can omit the "" On Fri, Jul 6, 2012 at 5:44 PM, Larry Martell wrote: > I have a situation where I'm sending an ajax request to a function > that updates a row in

Cacheing and JSON

2012-07-06 Thread Kevin Anthony
I have a JSON api exposed writen in django, in which remote devices ask if there are any commands for the device. And 99% of the time, the answer is no. I've played around with database cacheing, and the problem i've run into is, it can take several minutes until the new command gets sent to the

Returning nothing from a view

2012-07-06 Thread Larry Martell
I have a situation where I'm sending an ajax request to a function that updates a row in database. I then want to return control to the browser, with no changes to the page that was up. I am not returning anything from the function, and it's working the way I want, however I get an error in the

Re: {% spaceless %} abuse (?)

2012-07-06 Thread David Lam
On Fri, Jul 6, 2012 at 7:29 AM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > -1 on removing spaceless. > > On pages where you have lots of rows in a loop, the amount of whitespace > you end up with can massively increase page loading times. > > Sure, you

Re: Calling model methods from templates

2012-07-06 Thread Kevin
Yes, the following fixed the problem: def fcnTrue(self): return True I knew this would end up being some newbie mistake. Thank you!! On Friday, July 6, 2012 2:48:59 PM UTC-5, Tomas Neme wrote: > > Abigger piece of your model would be nice, but arent you missing a "self" > in that method

Re: Still need help with the 405....please

2012-07-06 Thread Nikolas Stevenson-Molnar
Out of curiosity, what is your end-goal with this? _Nik On 7/6/2012 12:44 PM, Jeff Silverman wrote: > Nik, I appreciate your help, but I'm about at the end with this. I'm > throwing in the towel. > > On Jul 6, 1:40 pm, Nikolas Stevenson-Molnar > wrote: >> I'm not

RE: Calling model methods from templates

2012-07-06 Thread lacrymol...@gmail.com
Abigger piece of your model would be nice, but arent you missing a "self" in that method definition? TypeErrors would fail silently in the templates -Mensaje original- De: Kevin Enviados: 06/07/2012 16:37:04 Asunto: Re: Calling model methods from templates I should mention this is

Re: Still need help with the 405....please

2012-07-06 Thread Jeff Silverman
Nik, I appreciate your help, but I'm about at the end with this. I'm throwing in the towel. On Jul 6, 1:40 pm, Nikolas Stevenson-Molnar wrote: > I'm not exactly sure, I usually try to avoid SOAP. But perhaps something > like

Re: Calling model methods from templates

2012-07-06 Thread Kevin
I should mention this is happening in a loop iterating over a list of objects from my view -- the same object type where the fcnTrue method is defined. So I'm actually doing the following in a loop {% if varTrue %} varTrue = true {% endif %} {% if fcnTrue %} *myObj*.fcnTrue = true {% endif %}

A single file that contains common django imports

2012-07-06 Thread Scott Woodall
Would there be any issues with creating a single file contains common django modules I use, then importing that file into my views, models etc. Example: common_imports.py === from django.conf import settings from django.core.urlresolvers import reverse from django.shortcuts import

Calling model methods from templates

2012-07-06 Thread Kevin
I'm fairly new to Django/Python so please bear with me. I want to create some methods in my models that return boolean values (has_employees, etc) but I cannot seem to access the return value in the template. Here's a cut-down example: Model: def fcnTrue(): return True View:

Re: 1.4: Emails to BCC addresses not sent

2012-07-06 Thread Javi Romero
El viernes, 6 de julio de 2012 15:58:50 UTC+2, Thomas escribió: > > ... > > If that fails as well, I guess a ticket is in order, but like I said >> "works for me" (in version 1.4). >> If that doesn't fail, then make sure cco is filled. >> > fwiw it works for me too in 1.4 using virtualenv.

Re: ForeignKey problem

2012-07-06 Thread Soviet
That's exactly what I want. Should I use 'through' or just make a new Model? As I said before, with your car example.. if you just want to know how > many of a part are in a car, Then what you did is enough, then you > could have some cars, and some pieces, say > > Cars = (Motorcycle, 4x4,

Re: Still need help with the 405....please

2012-07-06 Thread Nikolas Stevenson-Molnar
I'm not exactly sure, I usually try to avoid SOAP. But perhaps something like this? http://www.w3schools.com/soap/soap_example.asp. You'll have to modify it to match your SOAP app, of course. Depending on what you're trying to accomplish, SOAP may not be your best option. I tend to prefer REST,

Re: ForeignKey problem

2012-07-06 Thread Tomas Neme
oh, and the advantage is that you could have a car, for example car = Car.objects.get(name="4x4") car.parts.get(name="Transmission").partsincar.amount >> 2 The difference with doing it with another model is that you cannot do this, for example (or not as easily)

Re: ForeignKey problem

2012-07-06 Thread Tomas Neme
> Thanks, but damn, isn't that overly complicated (for me). Using through > looks like a easier way, but then I have to add Wheel four times and can't > just type '4' in some field, since I don't need it to exist in database four > time, just an information that there are four wheels. as I said,

Re: Still need help with the 405....please

2012-07-06 Thread Jeff Silverman
What should the XML look like? On Jul 6, 12:03 pm, Nikolas Stevenson-Molnar wrote: > Perhaps it's expecting XML in the request and trying to parse your POST data > (which is not XML)? > > _Nik > > On Jul 6, 2012, at 6:03 AM, Jeff Silverman wrote: > > > > > Ok Nik.  I

Re: ForeignKey problem

2012-07-06 Thread Thomas Lockhart
On 12-07-06 10:14 AM, Soviet wrote: Thanks, but damn, isn't that overly complicated (for me). Using through looks like a easier way, but then I have to add Wheel four times and can't just type '4' in some field, since I don't need it to exist in database four time, just an information that

Re: ForeignKey problem

2012-07-06 Thread Soviet
If I'll do something like: class Car(models.Model): name = models.CharField(max_length=100) parts = models.ManyToManyField('Part', through = 'PartsInCar') class Part(models.Model): name = models.CharField(max_length=100) class PartsInCar(models.Model): car =

Re: ForeignKey problem

2012-07-06 Thread Soviet
Thanks, but damn, isn't that overly complicated (for me). Using through looks like a easier way, but then I have to add Wheel four times and can't just type '4' in some field, since I don't need it to exist in database four time, just an information that there are four wheels. W dniu piątek, 6

Re: {% spaceless %} abuse (?)

2012-07-06 Thread Cal Leeming [Simplicity Media Ltd]
Oh, I should also mention that the last time I tested this was approx 6 months ago, so this may not be an issue any more. The other issue is it can cause 'View Source' to freeze up (or in firefox, just not display anything). On Fri, Jul 6, 2012 at 5:26 PM, Cal Leeming [Simplicity Media Ltd] <

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

2012-07-06 Thread Thomas Lockhart
On 12-07-06 8:56 AM, Houmie wrote: Today I have started my first steps into postgresql, since its recommended by the Django team. I came across several issues, that I solved patiently one by one. (disclaimer: I'm a Postgres homer) These issues *should* come up with a well-designed database.

Re: {% spaceless %} abuse (?)

2012-07-06 Thread Cal Leeming [Simplicity Media Ltd]
The last time I tested this, gzip'ing didn't really make much of a difference. Essentially we had this block repeated 500 times: something here This was then also indented 4x5 places from the left, so the amount of white space was massive. Some browsers (such

Re: Still need help with the 405....please

2012-07-06 Thread Nikolas Stevenson-Molnar
Perhaps it's expecting XML in the request and trying to parse your POST data (which is not XML)? _Nik On Jul 6, 2012, at 6:03 AM, Jeff Silverman wrote: > Ok Nik. I have removed the CSRF middleware and get a brand new error. > > XMLSyntaxError at /hello/ > error parsing attribute name, line

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

2012-07-06 Thread Houmie
Today I have started my first steps into postgresql, since its recommended by the Django team. I came across several issues, that I solved patiently one by one. 1) Creating tables under postgresql requires to login as a different OS login, from which you don't even know the password. Fine, I

Re: Unable to deploy due to a WSGI Error

2012-07-06 Thread victoria
>> >> Let me quickly introduce the contents of the files to make the case more >> concrete. >> This is my /etc/apache2/sites-available/default file I think that this is the problem. That file is not loaded by the Apache server included with BitNami. You would need to add a new include line in

Re: Acessing data on Model/Detail classes

2012-07-06 Thread Fabiano Martins
My idea was centralize the validation in the Model to allow use it on several clients besides the primary Web page (such as a batch program, a web service, etc.) At this moment, the database relationship yet not exists, but the "memory data relashionship" already exists. Conceptually I

Re: how to use HTTPS with django

2012-07-06 Thread John DeRosa
On Jul 6, 2012, at 4:24 AM, Melvyn Sopacua wrote: > On 6-7-2012 8:08, heni yemun wrote: > >> I want to know how to use HTTPS to securely login and signup a user with >> django. > > Django doesn't care about HTTPS. You'd handle this in the webserver by > redirecting to the secure virtual host

Re: ForeignKey problem

2012-07-06 Thread Tomas Neme
> I don't understand. It's the same wheel added four times, not four > different wheels. I guess you could implement it either way. The thing is that doing it this way would become complicated at the time you need to define what is attached where. For Lego pieces, I'd do this: class

Re: {% spaceless %} abuse (?)

2012-07-06 Thread Russell Keith-Magee
On Fri, Jul 6, 2012 at 10:29 PM, Cal Leeming [Simplicity Media Ltd] wrote: > -1 on removing spaceless. > > On pages where you have lots of rows in a loop, the amount of whitespace you > end up with can massively increase page loading times. You did read my

Re: Render time

2012-07-06 Thread Cal Leeming [Simplicity Media Ltd]
Just FYI - New Relic does a fantastic job of browser speed graphing - but it is an expensive product. On Fri, Jul 6, 2012 at 6:14 AM, Larry Martell wrote: > On Thu, Jul 5, 2012 at 10:48 PM, Andy McKay wrote: > >> I'm trying to use the Navigation

Re: {% spaceless %} abuse (?)

2012-07-06 Thread Cal Leeming [Simplicity Media Ltd]
-1 on removing spaceless. On pages where you have lots of rows in a loop, the amount of whitespace you end up with can massively increase page loading times. Sure, you could use whitespace stripping middleware I guess, but some people prefer not to have that. I agree that spaceless does make

Re: Highlighting Active Navigation Link - correct approach?

2012-07-06 Thread Cal Leeming [Simplicity Media Ltd]
You raise a good point about sub menus. Possibly something like this: def resolve_urlname(request): """Allows us to see what the matched urlname for this request is within the template""" from django.core.urlresolvers import resolve try: res = resolve(request.path)

Re: ForeignKey problem

2012-07-06 Thread Soviet
> You don't. You get all wheel objects and count them. > I don't understand. It's the same wheel added four times, not four different wheels. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: Highlighting Active Navigation Link - correct approach?

2012-07-06 Thread Melvyn Sopacua
On 6-7-2012 16:01, Cal Leeming [Simplicity Media Ltd] wrote: > I've actually just done a ticket about this.. > > https://code.djangoproject.com/ticket/18584 > > Personally, I think the approach mentioned in the ticket is a far saner way > of doing things. Just wondering about this: if res:

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread rick girdhar
after entering number in the template page .am getting the error,that is: NoReverseMatch at /record_system/studentid/ Reverse for 'record_system.views.search' with arguments '(None,)' and keyword arguments '{}' not found. and this is my new updated view.. def search(request , rollno):

Re: Highlighting Active Navigation Link - correct approach?

2012-07-06 Thread Cal Leeming [Simplicity Media Ltd]
I've actually just done a ticket about this.. https://code.djangoproject.com/ticket/18584 Personally, I think the approach mentioned in the ticket is a far saner way of doing things. Cal On Fri, Jul 6, 2012 at 12:55 PM, Dhiraj Thakur wrote: > > > On Monday, January 9,

Re: 1.4: Emails to BCC addresses not sent

2012-07-06 Thread Thomas Lockhart
... If that fails as well, I guess a ticket is in order, but like I said "works for me" (in version 1.4). If that doesn't fail, then make sure cco is filled. fwiw it works for me too in 1.4 using virtualenv. Thanks Melvyn for the simple example. - Tom -- You

Re: ForeignKey problem

2012-07-06 Thread Melvyn Sopacua
On 6-7-2012 15:17, Soviet wrote: > Lets try LEGO pieces. I have a LEGO set that has many pieces (ManyToMany). > But I have 4 wheels and 1 brick in that set. The 'brick' can be added with > no problem, but how do I save the information that there's 4 'wheel' > objects and not only one? You

Re: {% spaceless %} abuse (?)

2012-07-06 Thread Masklinn
On 6 juil. 2012, at 02:29, Micky Hulse wrote: > On Thu, Jul 5, 2012 at 5:00 PM, Russell Keith-Magee > wrote: >> Good question. I'm not really sure *what* it's supposed to be used >> for. Trimming whitespace to reduce page size is one possible use; the

Re: ForeignKey problem

2012-07-06 Thread Soviet
Alright, bad example. Lets try LEGO pieces. I have a LEGO set that has many pieces (ManyToMany). But I have 4 wheels and 1 brick in that set. The 'brick' can be added with no problem, but how do I save the information that there's 4 'wheel' objects and not only one? W dniu czwartek, 5 lipca

Re: {% spaceless %} abuse (?)

2012-07-06 Thread Russell Keith-Magee
On Fri, Jul 6, 2012 at 1:05 PM, Dennis Lee Bieber wrote: > On Fri, 6 Jul 2012 08:00:10 +0800, Russell Keith-Magee > declaimed the following in > gmane.comp.python.django.user: > > >> HTML code isn't supposed to be human readable, and all the modern

Re: Still need help with the 405....please

2012-07-06 Thread Jeff Silverman
Ok Nik. I have removed the CSRF middleware and get a brand new error. XMLSyntaxError at /hello/ error parsing attribute name, line 1, column 6Request Method: POST Request URL: http://piadm42.troweprice.com:/hello/ Django Version: 1.3.1 Exception Type: XMLSyntaxError Exception Value: error

Re: 1.4: Emails to BCC addresses not sent

2012-07-06 Thread Javi Romero
El viernes, 6 de julio de 2012 12:59:23 UTC+2, Melvyn Sopacua escribió: > > On 6-7-2012 11:36, Javi Romero wrote: > > Does this sound like I should open a new ticket on the bugtracker or > does > > this work right for anyone else? > > It definitely works for me, when I do some testing with

Re: Query regarding Models

2012-07-06 Thread Daniel Roseman
On Friday, 6 July 2012 08:53:27 UTC+1, Ashutosh Singh wrote: > > I wanted to import to import csv file to the model in django and then > after that I wanted to link the csv data to my data of different > model.Basically the other data is shapefile which has ids to which I wanna > link csv data

Re: Highlighting Active Navigation Link - correct approach?

2012-07-06 Thread Dhiraj Thakur
On Monday, January 9, 2012 11:57:52 AM UTC+5:30, Victor Hooi wrote: > > hi, > > I have a project where I'm using Bootstrap ( > www.github.com/twitter/bootstrap) with Django. > > I need to add a CSS class ("active") to highlight the active navigation > link. > > Anyhow, I did some Googling: > >

Re: Missing 'SITE_ID' breaks first Django app

2012-07-06 Thread Melvyn Sopacua
On 6-7-2012 7:38, DF wrote: > Hi. I just delayed my first Django app via Heroku and I'm having an issue > that's proving very difficult to resolve. I have django-registration and > profiles installed and apparently something runs afoul unless the > 'django.contrib.sites', and SITE_ID is

Re: how to use HTTPS with django

2012-07-06 Thread Melvyn Sopacua
On 6-7-2012 8:08, heni yemun wrote: > I want to know how to use HTTPS to securely login and signup a user with > django. Django doesn't care about HTTPS. You'd handle this in the webserver by redirecting to the secure virtual host for the login url. How to implement that is webserver specific.

Re: 1.4: Emails to BCC addresses not sent

2012-07-06 Thread Melvyn Sopacua
On 6-7-2012 11:36, Javi Romero wrote: > Does this sound like I should open a new ticket on the bugtracker or does > this work right for anyone else? It definitely works for me, when I do some testing with the EmailMessage object. You should reduce your testing to just sending a simple message

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread manish girdhar
hmmm i can find my solution after inserting this line rollno = request.POST.get('rollno') and this was the coding part of my application ,but can you please tell me that why my *" if form.is_valid():* " is not working..what's wrong in this?? On Fri, Jul 6, 2012 at 4:06 PM, manish girdhar

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread manish girdhar
hm finally got it.thanks for the quick reply friend..thanks alot. On Fri, Jul 6, 2012 at 4:00 PM, Jani Tiainen wrote: > 6.7.2012 13:18, manish girdhar kirjoitti: > > so sorry friend..am new to the django and am unable to catch your >> point...can you please

Query regarding Models

2012-07-06 Thread Ashutosh Singh
I wanted to import to import csv file to the model in django and then after that I wanted to link the csv data to my data of different model.Basically the other data is shapefile which has ids to which I wanna link csv data using those ids.Somebody please help me out its urgent.Plz -- You

Re: decorating an include in urls.py

2012-07-06 Thread Alexandr Aibulatov
Try to use this library https://github.com/jeffkistler/django-decorator-include 2012/7/6 Gelonida N : > I'd like to decorate all views in an include. > > Let's take for example: > > urlpatterns = patterns('', > url(r'^decorated_admin/', include(admin.site.urls)), > ) > > >

Re: Can't figure out how to obtain organized list of my friends

2012-07-06 Thread Keith D. Cardin
Thank you guys SO MUCH! I'm not only a new learning of Django, but of Python and programming in general. Only con to being self taught is that you learn these things as you go! Thank you for gearing me in the right direction, and so quickly! After some homework and deciding how to alter my

how to use HTTPS with django

2012-07-06 Thread heni yemun
Hi, I want to know how to use HTTPS to securely login and signup a user with django. I'd also like you to tell me how to attach extra information to the standard User object. The reference provided doesnot seem to be detailed enough to implement. THANK YOU! -- You received this message

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread Jani Tiainen
6.7.2012 13:18, manish girdhar kirjoitti: so sorry friend..am new to the django and am unable to catch your point...can you please describe this with example or with my code..thank you.. [Snip snip with binary scissors] Problem is that there is two problem points: Your view doesn't have

Re: Admin actions -- short_description as doc string?

2012-07-06 Thread Melvyn Sopacua
On 6-7-2012 3:50, Russell Keith-Magee wrote: > On Fri, Jul 6, 2012 at 9:06 AM, Melvyn Sopacua wrote: >> https://docs.djangoproject.com/en/1.4/_images/article_actions.png >> >> Code above states: >> make_published.short_description = "Mark selected stories as published" >>

Re: Model for ListView needed?

2012-07-06 Thread Melvyn Sopacua
On 6-7-2012 0:35, Smaran Harihar wrote: > Thanks for the reply Luigi, but when should we use queryset and when should > we use model? A queryset returns a /list/ of model instances. Thus you should queryset when you want more then one instance of the model displayed. >From the above you should

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread manish girdhar
so sorry friend..am new to the django and am unable to catch your point...can you please describe this with example or with my code..thank you.. On Fri, Jul 6, 2012 at 3:08 PM, Jani Tiainen wrote: > It doesn't ever work since you should rerender form with current data and >

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread Jani Tiainen
It doesn't ever work since you should rerender form with current data and errors if form.valid() returns false. Currently your logic doesn't return _nothing_ if form.valid() is false def studentid(request): if request.method == 'POST': form = Student_loginForm(request.POST)

Re: 1.4: Emails to BCC addresses not sent

2012-07-06 Thread Javi Romero
As usual, the webfaction support team is impresive in its support. Here's the extract from the mail log after sending the contact form. As it can be seen, there is no trace of bcc addresses. Also, the addresses to be bcc'ed are not the same that the one on the "To" field. Jul 5 11:15:56 mail6

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread manish girdhar
thanks for the concern firend but i already have an form.error in my template... *this is my template.. * student id {% if form.errors %} Please correct the error{{ form.errors|pluralize }} below. {% endif %} STUDENT RECORD SYSTEM

decorating an include in urls.py

2012-07-06 Thread Gelonida N
I'd like to decorate all views in an include. Let's take for example: urlpatterns = patterns('', url(r'^decorated_admin/', include(admin.site.urls)), ) Is there any way to decorate all views in admin.site.urls I was looking for a syntax similiar to: urlpatterns = patterns('',

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread Jani Tiainen
Print out form.errors it will contain dictionary about fields and errors in particular field. You get the error because your form didn't validate in the first place so either you have bad data, are missing required data or something else in validation fails. form.errors will reveal that.

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread manish girdhar
thank you for your concern friend,but i have an another view .in that it perfectly worksbut here am getting problem and i know *"if form.is_valid():"* is getting falsewhat am looking for is this, that why here am getting problem. this thing perfectlly works in my adding two number

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread Karl Sutt
There is no HttpResponse object returned if the form is *not* valid. You might want to return a template saying that the form input was incorrect. Tervitades/Regards Karl Sutt On Fri, Jul 6, 2012 at 11:49 AM, manish girdhar wrote: > hii tom, > yeah i have rectidy

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread manish girdhar
hii tom, yeah i have rectidy rollno = cd["rollno"] ,but again am getting error didn't get an httpresponse object... this is my view. def studentid(request): if request.method == 'POST': form = Student_loginForm(request.POST) if form.is_valid(): cd =

Re: 1.4: Emails to BCC addresses not sent

2012-07-06 Thread Javi Romero
El viernes, 6 de julio de 2012 02:18:43 UTC+2, Melvyn Sopacua escribió: > > On 5-7-2012 19:44, Javi Romero wrote: > > Hi list, I'm new around though I've been developing Django sites since > the > > early 1.0 releases > > > > I've been looking around for problems regarding email sending to