Re: map in django

2012-07-05 Thread Timothy Makobu
Something like this? http://timslab.net/tornodes/ Questions; how do you GET the location? Is it a constant location, or does it depend on something? What is at that location, that makes you want to save it? Once we know why and how you get a location, we can help you better. On Thu, Jul 5, 2012

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

2012-07-05 Thread manish girdhar
thank ...i rectify this error. On Thu, Jul 5, 2012 at 12:29 PM, manish girdhar wrote: > thanks for the help friend..after manipulate that thing i got an error of* > *UnboundLocalError at /record_system/studentid/ > > local variable 'rollno' referenced before assignment > > ... > > On Thu, Jul

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

2012-07-05 Thread kenneth gonsalves
On Thu, 2012-07-05 at 12:29 +0530, manish girdhar wrote: > thanks for the help friend..after manipulate that thing i got an error > of* > *UnboundLocalError at /record_system/studentid/ > > local variable 'rollno' referenced before assignment error in indentation - it is difficult to check this

Re: map in django

2012-07-05 Thread Satvir Toor
On Thu, Jul 5, 2012 at 12:38 PM, Timothy Makobu wrote: > Something like this? http://timslab.net/tornodes/ can say. > > Questions; how do you GET the location? Is it a constant location, or does > it depend on something? What is at that location, that makes you want to > save it? Once we know why

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

2012-07-05 Thread manish girdhar
yes it was indentation error and i rectified that.thanks for the concern friend.. On Thu, Jul 5, 2012 at 12:40 PM, kenneth gonsalves wrote: > On Thu, 2012-07-05 at 12:29 +0530, manish girdhar wrote: > > thanks for the help friend..after manipulate that thing i got an error > > of* > > *UnboundLoc

Re: map in django

2012-07-05 Thread Timothy Makobu
http://stackoverflow.com/questions/3652951/google-maps-api-get-coordinates-of-address On Thu, Jul 5, 2012 at 10:24 AM, Satvir Toor wrote: > On Thu, Jul 5, 2012 at 12:38 PM, Timothy Makobu > wrote: > > Something like this? http://timslab.net/tornodes/ > can say. > > > > Questions; how do you GET

Re: Problem to complète the xml template

2012-07-05 Thread Jirka Vejrazka
> Hello, > http://cdm-fr.fr/2006/schemas/CDM-fr.xsd"; language="fr-FR"> > {% if formations %} > > Hi there, you probably want to follow your {% if formations %} statement with: {% for formation in formations %} Check Django template documentation again - you're moving along th

DetailView - invalid literal for int() with base 10:

2012-07-05 Thread Barry Morrison
I've been beating my head against this all night and now into the morning...I have NO idea what I'm doing wrong and Google and Stack Overflow haven't been as helpful as I had hoped. https://gist.github.com/7dc0b98a2fe056379ae8 Any help or guidance would be greatly appreciated! Thanks!! --

Re: DetailView - invalid literal for int() with base 10:

2012-07-05 Thread Jon Black
I'm not sure without running it, which I can't do now. I have noticed that your slug is not and id, but the field PostSubReddit is a foerignkey which might expect an id. Unrelated, I think your models shouldn't be pluralised (e.g. Post instead of Posts). If you want the table name to be plural, us

Re: DetailView - invalid literal for int() with base 10:

2012-07-05 Thread Barry Morrison
Apologies, here is the error output if it helps. ValueError at /favs/Reddit/sysadmin/ invalid literal for int() with base 10: 'sysadmin' Request Method: GET Request URL: http://127.0.0.1:8000/favs/Reddit/sysadmin/ Django Version: 1.4 Exception Type: ValueError Exception Value: invalid

Re: DetailView - invalid literal for int() with base 10:

2012-07-05 Thread Jon Black
That doesn't help so much as there's no context information. Nice to see the 'sysadmin' bit which wasn't in your original post. Google throws up a lot of things for that: http://www.google.nl/search?q=invalid+literal+for+int%28%29+with+ base+10%3A+%27sysadmin -- Jon Black www.jonblack.org On Th

Re: DetailView - invalid literal for int() with base 10:

2012-07-05 Thread Jon Black
Hit send too soon then. My guess is that your kwargs being passed to filter() contains some suspect things. -- Jon Black www.jonblack.org On Thu, Jul 5, 2012, at 11:27, Jon Black wrote: That doesn't help so much as there's no context information. Nice to see the 'sysadmin' bit which wasn't in yo

insert html into a form from Django code (not template)

2012-07-05 Thread angelika
Is there a way to insert arbitrary html into a form from the Django code, and not in the template? The equivalent of #markup in a Drupal form. /Angelika -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

internationalization on database with hard-coded data

2012-07-05 Thread ledzgio
Hi all, how can I apply internationalization on database with hard-coded data? I import my data by creating .sql files with data inside. Is there a better way to manage hard-coded data for internationalization? and what if those data can grow with time? thanks -- You received this message be

Re: insert html into a form from Django code (not template)

2012-07-05 Thread Jon Black
This (https://docs.djangoproject.com/en/dev/topics/forms/?from=olddocs #customizing-the-form-template) and more generally the entire page explains how to work with forms. -- Jon Black www.jonblack.org On Thu, Jul 5, 2012, at 02:57, angelika wrote: Is there a way to insert arbitrary html into a

Re: Handling millions of rows + large bulk processing (now 700+ mil rows)

2012-07-05 Thread Babatunde Akinyanmi
For the knowledge of it, me two On 7/4/12, Timothy Makobu wrote: > I'm in. > > On Tue, Jul 3, 2012 at 2:35 AM, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> wrote: > >> Just in case anyone missed the URL, you can book your slot here: >> >> http://www.doodle.com/8pte

Re: insert html into a form from Django code (not template)

2012-07-05 Thread angelika
Thanks, but I am asking if there is a way to insert html into a form from the backend code, and *not in the template*? On Thursday, July 5, 2012 11:57:57 AM UTC+2, angelika wrote: > > Is there a way to insert arbitrary html into a form from the Django code, > and not in the template? The equival

Re: insert html into a form from Django code (not template)

2012-07-05 Thread Jon Black
I've never done this, so I'm just throwing out ideas to try and be helpful. I've found your stackoverflow post as well, which has more information. (http://stackoverflow.com/questions/11341118/printing-repeated-dj ango-form-fields-individually) Have you tried looping over the fields in the templat

Re: insert html into a form from Django code (not template)

2012-07-05 Thread angelika
Thanks for answering! I would really like to do it that way, if I could. But I only want the html for some of the fields, not all of them. It would be great if I could iterate over just a few fields or be able to generate the name of the field in a loop, something like this: [some fields] {% f

Re: Problem to complète the xml template

2012-07-05 Thread bruno desthuilliers
On Wednesday, July 4, 2012 8:12:50 PM UTC+2, nef wrote: > > Hello, > Bonjour > I want to cry a function allowing me to complete a template *. Xml. May I > have a problem with the passage of the object render_to_response. In short > here is my code. In fact, I do not know how to return an obj

Re: map in django

2012-07-05 Thread Satvir Toor
I followed below link http://pypi.python.org/pypi/django-google-maps/ it works fine in admin interface, But I want to display a map using django templates. I wish for a output like No. of text fields and a address field, the map would display the location on itself according to value entered into a

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

2012-07-05 Thread Jeff Silverman
Good call. I used Fiddler to generate the POST string, however, I get no response. It appears to go into the @soap(String, Integer, _returns=Array(string)) statement and hangs at that point, not returning. On Jul 3, 3:47 pm, Nikolas Stevenson-Molnar wrote: > Looking at the soaplib source, it lo

Re: Controlling access

2012-07-05 Thread Tom Evans
On Tue, Jul 3, 2012 at 6:39 PM, Larry Martell wrote: > I have a client that asked me to add some new functionality to their > app, and then they said 'This new functionality should be controlled > in Django admin so that only the admin user can see it.' Is there a > way to control this in Django a

queryset caching - without caching middleware

2012-07-05 Thread Henrik Genssen
Hi all, what's the magic here? I am using django 1.3 with sqlite or postgres by invoking: runserver 10.150.2.15:8080 --noreload I have a view (no cache decorator) doing simple querys on the orm and return that as html - nothing fancy The view is executed on each request, but the database is hi

Re: install a new model in my project

2012-07-05 Thread lokesh s
Hi, You can try downloading the source ball extract django_multiuploader inside your project folder. Thanks, Lokesh On Thursday, July 5, 2012 12:40:47 AM UTC+5:30, Tomas Neme wrote: > > > (django_multiuploader), and i write in INSTALLED_APPS > 'sorl.thumbnail', > > 'multiuploader', t

Re: insert html into a form from Django code (not template)

2012-07-05 Thread Σταύρος Κρουστούρης
On 07/05/2012 01:20 PM, angelika wrote: Thanks, but I am asking if there is a way to insert html into a form from the backend code, and *not in the template*? You can pass the html as a string from a context variable (i believe this should work), but this is not a very good way to do things. Yo

Re: Problem to complète the xml template

2012-07-05 Thread nef
Hello, Thank you for your help. I have solved my problem. As I did not need a loop because there is just an object. My mistake was at my query that did not return objects. Thank you for your response On Thursday, July 5, 2012 7:42:06 AM UTC, JirkaV wrote: > > > Hello, > > http://cdm-fr.fr/2006/

ForeignKey on CharField and char operations

2012-07-05 Thread Serg Shtripling
Hello, community! Have anyone tried this: class AType(models.Model): #cut mnemo = models.CharField(u'Mnemocode', max_length=31, null=True, unique=True) class A(models.Model): #cut type = models.ForeignKey(AType, 'mnemo', verbose_name=u'A Type', null=True) class B(models.Model):

Re: insert html into a form from Django code (not template)

2012-07-05 Thread Σταύρος Κρουστούρης
On 07/05/2012 01:40 PM, Jon Black wrote: /*SC*/DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"/*EC*/ I've never done this, so I'm just throwing out ideas to try and be helpful. I've found your stackoverflow post as well, which has more informa

Re: map in django

2012-07-05 Thread Timothy Makobu
The link I gave you does exactly that. You give GMaps an address and it gives you JSON (or XML) of many things, among them longitude and latitude. You can then use maybe http://gmap3.net/ to display the location on the map. The ajax that will glue all that together into one page is the homework.

Re: insert html into a form from Django code (not template)

2012-07-05 Thread angelika
I've written a longer post here: http://stackoverflow.com/questions/11341118/printing-repeated-django-form-fields-individually explaining what I need. Either a way to individually print out the fields in a loop or a way to insert html from the backend. Maybe it's just not possible to do this

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

2012-07-05 Thread Jeff Silverman
Ok, I'm further along, I think. Now I'm getting the following response = super(DjangoSoapApp, self).__call__(environ, start_response) (Pdb) p start_response (Pdb) super(DjangoSoapApp, self).__call__(environ, start_response) *** TypeError: super() argument 1 must be type, not function On Jul

Re: queryset caching - without caching middleware

2012-07-05 Thread hinnack
hmm, Ok, Queryset Caching happens alle the time... So here are some more questions on this: - where is the data stored? - can I ask a model, if its result is cached or a fresh one? - can I disable or force a "refresh" of the cache? - how would i use a query in a property of a class, without runnin

Re: cannot deploy due to wsgi error

2012-07-05 Thread Melvyn Sopacua
On 4-7-2012 21:17, Peter Zakin wrote: > [Wed Jul 04 02:29:15 2012] [error] [client 140.180.6.212] ImportError: /opt/ > bitnami/python/lib/python2.7/lib-dynload/_io.so: undefined symbol: > PyUnicodeUCS2_AsEncodedString There ya go. The python installation is flawed. -- Melvyn Sopacua -- You re

Re: mysqldb help! Can't connect to MySQL server error...

2012-07-05 Thread Melvyn Sopacua
On 4-7-2012 21:31, Matthew Piatkowski wrote: >> DATABASE_PORT = '3036' # Set to empty string for default. >> Not used with sqlite3. >> Typo that should probably 3306. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" gr

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

2012-07-05 Thread Melvyn Sopacua
On 4-7-2012 22:29, Tomas Neme wrote: > Besides that, if you don't want actual Base instances, then this is an > abstract class, and you should do this: > > class Base(models.Model): > eggs > plants > class Meta: > abstract=True > > class Foo(Base): > carpet=

Re: Admin actions -- short_description as doc string?

2012-07-05 Thread Melvyn Sopacua
On 5-7-2012 2:02, Russell Keith-Magee wrote: > The short_description is a label that can be used for display purposes -- > a 'human readable' version of the method name. Where is this used though? I've had the suspicion that the picture in the documentation needs updating, cause it doesn't show th

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

2012-07-05 Thread Tomas Neme
I wanted to chang the subject because I didn't want to spam someone's plead for help into a design discussion, but then I thought, how am I gonna make sure this is read by the right people? Also, context would be lost, so.. sorry about this But I don't see how what you say makes sense. I mean, al

Re: ForeignKey on CharField and char operations

2012-07-05 Thread Tomas Neme
I might not be understanding this fully, but what about A.objects.filter(type__mnemo__startswith="type1")? On Thu, Jul 5, 2012 at 7:51 AM, Serg Shtripling wrote: > Hello, community! > Have anyone tried this: > class AType(models.Model): > #cut > mnemo = models.CharField(u'Mnemocode', max_

Re: mysqldb help! Can't connect to MySQL server error...

2012-07-05 Thread Tom Evans
On Thu, Jul 5, 2012 at 1:53 PM, Melvyn Sopacua wrote: > On 4-7-2012 21:31, Matthew Piatkowski wrote: >>> DATABASE_PORT = '3036' # Set to empty string for default. >>> Not used with sqlite3. >>> > Typo that should probably 3306. > I'm sure the guy from 2009 that he is quoting will be g

Re: mysqldb help! Can't connect to MySQL server error...

2012-07-05 Thread Sergiy Khohlov
Could you please connect to mysql from console. Is it OK ? Look like mysql is not started you connect to wrong port connect from network is blocked credentials are wrong 2012/7/5 Tom Evans : > On Thu, Jul 5, 2012 at 1:53 PM, Melvyn Sopacua wrote: >> On 4-7-2012 21:31, Matthew Piatkowski wrote:

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

2012-07-05 Thread Tom Evans
On Thu, Jul 5, 2012 at 2:33 PM, Tomas Neme wrote: > I wanted to chang the subject because I didn't want to spam someone's > plead for help into a design discussion, but then I thought, how am I > gonna make sure this is read by the right people? Also, context would > be lost, so.. sorry about this

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

2012-07-05 Thread Melvyn Sopacua
On 5-7-2012 15:33, Tomas Neme wrote: > But I don't see how what you say makes sense. > > I mean, all the way starting from this: > >> No, you /should/ not. You may do this, but you will end up with two >> tables that /do not share the records/. >> From the OP's post it's obvious these classes sh

Re: mysqldb help! Can't connect to MySQL server error...

2012-07-05 Thread Tom Evans
On Thu, Jul 5, 2012 at 2:59 PM, Sergiy Khohlov wrote: > Could you please connect to mysql from console. Is it OK ? > > Look like > mysql is not started > you connect to wrong port > connect from network is blocked > credentials are wrong > Seriously? WTF? This is a thread from April 2009, the O

Re: mysqldb help! Can't connect to MySQL server error...

2012-07-05 Thread Sergiy Khohlov
WOW ! I forget about date ! Sorry 2012/7/5 Tom Evans : > On Thu, Jul 5, 2012 at 2:59 PM, Sergiy Khohlov wrote: >> Could you please connect to mysql from console. Is it OK ? >> >> Look like >> mysql is not started >> you connect to wrong port >> connect from network is blocked >> credentials

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

2012-07-05 Thread Tom Evans
On Thu, Jul 5, 2012 at 8:38 AM, manish girdhar wrote: > yes it was indentation error and i rectified that.thanks for the concern > friend.. > I would have thought that it was you refering to the undefined variable rollno here: cd = form.cleaned_data rollno = cd[rollno]

Re: mysqldb help! Can't connect to MySQL server error...

2012-07-05 Thread Melvyn Sopacua
On 5-7-2012 15:45, Tom Evans wrote: > On Thu, Jul 5, 2012 at 1:53 PM, Melvyn Sopacua wrote: >> On 4-7-2012 21:31, Matthew Piatkowski wrote: DATABASE_PORT = '3036' # Set to empty string for default. Not used with sqlite3. >> Typo that should probably 3306. >> > > I'm sur

Re: internationalization on database with hard-coded data

2012-07-05 Thread Melvyn Sopacua
On 5-7-2012 12:06, ledzgio wrote: > how can I apply internationalization on database with hard-coded data? I > import my data by creating .sql files with data inside. > > Is there a better way to manage hard-coded data for internationalization? > and what if those data can grow with time? Data

Re: insert html into a form from Django code (not template)

2012-07-05 Thread Tom Evans
On Thu, Jul 5, 2012 at 1:15 PM, angelika wrote: > I've written a longer post here: > http://stackoverflow.com/questions/11341118/printing-repeated-django-form-fields-individually > explaining what I need. Either a way to individually print out the fields in > a loop or a way to insert html from th

Re: queryset caching - without caching middleware

2012-07-05 Thread Tom Evans
On Thu, Jul 5, 2012 at 1:28 PM, hinnack wrote: > hmm, Ok, Queryset Caching happens alle the time... > > So here are some more questions on this: > - where is the data stored? > - can I ask a model, if its result is cached or a fresh one? > - can I disable or force a "refresh" of the cache? > - how

Re: insert html into a form from Django code (not template)

2012-07-05 Thread Melvyn Sopacua
On 5-7-2012 16:26, Tom Evans wrote: > On Thu, Jul 5, 2012 at 1:15 PM, angelika wrote: >> I've written a longer post here: >> http://stackoverflow.com/questions/11341118/printing-repeated-django-form-fields-individually >> explaining what I need. Either a way to individually print out the fields in

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

2012-07-05 Thread Tomas Neme
> Not really. But from the question: > "But how can I tell south to fill the super class with the data from the > old schema?" Well, in aswer to this, and Tom's remarks, you assumed he wanted to have a new table because he was asking how to populate it, I assumed he maybe doesn't know about abstra

Re: insert html into a form from Django code (not template)

2012-07-05 Thread angelika
Well thank you, Tom, you're a star! Will try this out as soon as possible, Cheers On Thursday, July 5, 2012 4:26:06 PM UTC+2, Tom Evans wrote: > > On Thu, Jul 5, 2012 at 1:15 PM, angelika > wrote: > > I've written a longer post here: > > > http://stackoverflow.com/questions/11341118/printing-

Re: insert html into a form from Django code (not template)

2012-07-05 Thread angelika
Only a few of the fields need to be repeated in the form, not the entire form. /Angelika On Thursday, July 5, 2012 4:35:18 PM UTC+2, Melvyn Sopacua wrote: > > On 5-7-2012 16:26, Tom Evans wrote: > > On Thu, Jul 5, 2012 at 1:15 PM, angelika > wrote: > >> I've written a longer post here: > >>

Re: queryset caching - without caching middleware

2012-07-05 Thread Melvyn Sopacua
On 5-7-2012 14:28, hinnack wrote: > - can I disable or force a "refresh" of the cache? -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Djang

Re: insert html into a form from Django code (not template)

2012-07-05 Thread Tom Evans
On Thu, Jul 5, 2012 at 3:35 PM, Melvyn Sopacua wrote: > Nice solution, but weren't formsets made for this type of thing? I'm > trying to figure out why formsets couldn't be used here and coming up > blank, unless the naming convention is somehow unchangeable. Possibly. Formsets are great if you w

Re: queryset caching - without caching middleware

2012-07-05 Thread Tom Evans
On Thu, Jul 5, 2012 at 3:49 PM, Melvyn Sopacua wrote: > On 5-7-2012 14:28, hinnack wrote: >> - can I disable or force a "refresh" of the cache? > > > Transactions/READ REPEATED behaviour is unl

Re: insert html into a form from Django code (not template)

2012-07-05 Thread Melvyn Sopacua
On 5-7-2012 16:48, angelika wrote: > Only a few of the fields need to be repeated in the form, not the entire > form. Right, so split out the repeated fields in a separate form. Remember that the form tag and submit button is not part of the form object. If these repeated fields are many-to-many

RE: [] Re: queryset caching - without caching middleware

2012-07-05 Thread Henrik Genssen
>Could you show where and how you are executing the query? If the >queryset is a global, and does not go out of scope at the end of the >request, then reusing the queryset will not cause the queryset to be >re-evaluated. > >Eg, in this example, categories is a global outside of the view, and >once

Re: [] Re: queryset caching - without caching middleware

2012-07-05 Thread Tom Evans
On Thu, Jul 5, 2012 at 4:08 PM, Henrik Genssen wrote: >>Could you show where and how you are executing the query? If the >>queryset is a global, and does not go out of scope at the end of the >>request, then reusing the queryset will not cause the queryset to be >>re-evaluated. >> >>Eg, in this ex

Re: Super slow authentication

2012-07-05 Thread Ali Mesdaq
Sorry your right I didn't even include some basic info. Basically I am using django_auth_ldap.backend.LDAPBackend as my first authentication backend and .ModelBackend as my secondary. I have a login page that needs authentication before you can do anything useful in the views by using a decorator o

Re: ForeignKey problem

2012-07-05 Thread Soviet
Thanks a lot! After few experiments I think I get it :). But! I do have another problem. Lets ditch our football example. Let's say that I have something like that: class CherryTree(models.Model): name = models.IntegerField() cherries = models.ManyToManyField('CherryFruit') class Cherry

Error with permissions update file

2012-07-05 Thread Dott. Tegagni Alessandro
I wrote a django app, but i have a problem with the file permissions of the uploads files from a web form. Basically I can upload a image and a pdf file but it always keep chmod 600. I have add in settings.py: FILE_UPLOAD_PERMISSIONS = 0777, but when i upload a image/pdf file the permissions

Re: ForeignKey on CharField and char operations

2012-07-05 Thread Serg Shtripling
четверг, 5 июля 2012 г., 20:40:00 UTC+7 пользователь Tomas Neme написал: > > I might not be understanding this fully, but what about > A.objects.filter(type__mnemo__startswith="type1")? > > Wouldn't it create INNER JOIN query on a_type table? AFAIR it would and it's a bit overhead. But surely

Converting to Postgres database; error with UserProfile model

2012-07-05 Thread DF
I have a problem that I hope someone with insight can aid with. My first Django project is near completion and I’m currently transitioning to a Postgres database in anticipation of deploying via Heroku. The process was going fairly smoothly until this occurred when I ran python manage.py syncdb

Re: ForeignKey on CharField and char operations

2012-07-05 Thread Tomas Neme
> Wouldn't it create INNER JOIN query on a_type table? AFAIR it would and it's > a bit overhead. > But surely it is a better solution than mine one, thanks for that. Well, in that case, I think your problem is that your AType PK isn't the mnemo field, but some integer field, so type_id is integer,

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

2012-07-05 Thread Nikolas Stevenson-Molnar
Hmmm, not sure about this one. Try printing out the type of DjangoSoapApp before that line is called: print type(DjangoSoapApp) _Nik On 7/5/2012 5:20 AM, Jeff Silverman wrote: > Ok, I'm further along, I think. Now I'm getting the following > > response = super(DjangoSoapApp, self).__call__(envi

Re: ForeignKey problem

2012-07-05 Thread Tomas Neme
> But! I do have another problem. Lets ditch our football example. Let's say > that I have something like that: > > class CherryTree(models.Model): > name = models.IntegerField() > cherries = models.ManyToManyField('CherryFruit') > > class CherryFruit(models.Model): > name = models.Char

Overriding the clean() method to an inlines model

2012-07-05 Thread Luigi NA
Greetings, can someone point out how can I accomplish this: I have 2 models Item and Upload, upload has an Fkey to Item and is being displayed Inlines. I am trying to override the clean() method so that only 1 upload object per item can be selected as featured. I asked the forums and was told t

Help using the clean() overwrite to control if user selects more than one boolean field in the admin

2012-07-05 Thread Luigi NA
I am running into a problem, I asked for assistance in IRC but I still did not understand. I have 2 objects one called Item, the other Upload, upload is linked to Item via Fkey and is being displayed inline. Upload also has a field called Featured. I am trying to override the clean() method for

1.4: Emails to BCC addresses not sent

2012-07-05 Thread Javi Romero
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 BCC addresses but can't find anything that explains what I'm seeing. I have a ModelForm that renders a pretty simple contact form, and o

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

2012-07-05 Thread Jeff Silverman
The print output is: On Jul 5, 1:38 pm, Nikolas Stevenson-Molnar wrote: > Hmmm, not sure about this one. Try printing out the type of > DjangoSoapApp before that line is called: > > print type(DjangoSoapApp) > > _Nik > > On 7/5/2012 5:20 AM, Jeff Silverman wrote: > > > > > Ok, I'm further alon

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

2012-07-05 Thread Nikolas Stevenson-Molnar
Is your code still the same as you posted earlier: http://djangosnippets.org/snippets/2638/? And the error is occuring on ln 28? _Nik On 7/5/2012 11:01 AM, Jeff Silverman wrote: > The print output is: > > > > > On Jul 5, 1:38 pm, Nikolas Stevenson-Molnar > wrote: >> Hmmm, not sure about this on

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

2012-07-05 Thread Jeff Silverman
I've been flip flopping my views.py between that snippet, and https://gist.github.com/935809, which is a bit different, but easier to follow. On Jul 5, 2:03 pm, Nikolas Stevenson-Molnar wrote: > Is your code still the same as you posted > earlier:http://djangosnippets.org/snippets/2638/?And the

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

2012-07-05 Thread Nikolas Stevenson-Molnar
Hmmm, I can't think of what may be happening. One more debug thing to try, print the help of DjangoSoapApp just before the problem line: print help(DjangoSoapApp) That way, if the DjangoSoapApp symbol is getting reassigned to a function somewhere along the way, that might clue you in. _Nik On 7

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

2012-07-05 Thread Jeff Silverman
Resulting output, Help on function DjangoSoapApp in module mysite.BDSCheckUser.views: DjangoSoapApp(*args, **kwargs) On Jul 5, 2:31 pm, Nikolas Stevenson-Molnar wrote: > Hmmm, I can't think of what may be happening. One more debug thing to > try, print the help of DjangoSoapApp just before the

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

2012-07-05 Thread Nikolas Stevenson-Molnar
Would you please provide the source for mysite.BDSCheckUser.views? _Nik On 7/5/2012 11:37 AM, Jeff Silverman wrote: > Resulting output, > > Help on function DjangoSoapApp in module mysite.BDSCheckUser.views: > > DjangoSoapApp(*args, **kwargs) > > > On Jul 5, 2:31 pm, Nikolas Stevenson-Molnar > w

Re: Decoupling Urls

2012-07-05 Thread Smaran Harihar
Hey Nik, Thanks for the detailed explanation. It is clear now. Thanks, Smaran On Tue, Jul 3, 2012 at 5:47 PM, Nikolas Stevenson-Molnar < nik.mol...@consbio.org> wrote: > Hi Smaran, > > Yes, by full path, I mean, for example, 'polls.urls'. And yes, it is a > string. Django interprets it as a mo

Re: Converting to Postgres database; error with UserProfile model

2012-07-05 Thread m1chael
syncdb is doing nothing for you? On Thu, Jul 5, 2012 at 1:06 PM, DF wrote: > I have a problem that I hope someone with insight can aid with. My first > Django project is near completion and I’m currently transitioning to a > Postgres database in anticipation of deploying via Heroku. The process w

Re: Converting to Postgres database; error with UserProfile model

2012-07-05 Thread DF
This happened when I ran sync.db. All the other tables were created. I'm using South but I ran sync.db first to create the initial tables. When I ran South, the 'profiles' app still didn't appear. There's also a signals.py file with the following: def create_profile(sender, instance, signal, cr

Acessing data on Model/Detail classes

2012-07-05 Thread Fabiano Martins
Hi, I'm novice on Django, and I have a problem that I can't resolve through documentation. I like to make a validation on Model.clear() of the master class method based on data of your detail classes, but it returns always a empty set. This example

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

2012-07-05 Thread Jeff Silverman
# soaplib v2.0.0beta2 (from memory) # Django v1.3 (stable) # NOTE: CSRF middleware has been turned off! # For urls.py, see: https://gist.github.com/935812 import soaplib from soaplib.core.service import rpc, DefinitionBase from soaplib.core.model.primitive import String, Integer from soaplib.core.

{% spaceless %} abuse (?)

2012-07-05 Thread David Lam
hmm, kinda semi-noob, but heres my scenario I just started working on a fairly large Django project thats been around for a couple years. In the templates, I see a lot of use of {% spaceless %} tags whose apparent function is solely to trim whitespace to reduce page size/page load time or someth

Re: install a new model in my project

2012-07-05 Thread dhararon
El miércoles, 4 de julio de 2012 14:10:47 UTC-5, Tomas Neme escribió: > > > (django_multiuploader), and i write in INSTALLED_APPS > 'sorl.thumbnail', > > 'multiuploader', then i execute manager.py runserver and return > "Error: No > > module named multiuploader" I dont understand how

Re: install a new model in my project

2012-07-05 Thread Tomas Neme
> I used pip for install sorl.thumbnail but "multiuploader" it isn't in > the pip's repo well, HOW did you install it? you can still tell pip to use a git or mercurial repository, or a tarbal file, for example (virtualenv) $ pip install git+git:// github.com/Lacrymology/cmsplugin_s3slider.git#e

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

2012-07-05 Thread Nikolas Stevenson-Molnar
Try removing the @csrf_exempt decorator (for testing, you can disable CSRF for the site in your settings file by commenting out the CsrfViewMiddleware). _Nik On 7/5/2012 1:03 PM, Jeff Silverman wrote: > # soaplib v2.0.0beta2 (from memory) > # Django v1.3 (stable) > # NOTE: CSRF middleware has bee

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

2012-07-05 Thread Nikolas Stevenson-Molnar
Here's a good example of how Python decorators work behind the scenes: http://en.wikipedia.org/wiki/Python_syntax_and_semantics#Decorators. Essentially, the @csrf_exempt decorator is a function, meaning that when you use it to decorate a class, you reassign the name of that class to a function whic

check for edited views.py

2012-07-05 Thread Smaran Harihar
Hey Djangoers, I am messing around with a big django project and adding my view by editing the views.py in the project code. This is the code that I have added, def current_datetime(request): now = datetime.datetime.now() html = "It is now %s." % now return HttpResponse(html) By this co

Re: check for edited views.py

2012-07-05 Thread Nikolas Stevenson-Molnar
Well, the only way to know for sure would be regression testing (http://en.wikipedia.org/wiki/Regression_testing). If the project makes use of the Django testing functionality (https://docs.djangoproject.com/en/1.4/topics/testing/), then you could just run the tests. Otherwise, you would need to l

Re: check for edited views.py

2012-07-05 Thread Smaran Harihar
hmmm I guess you are right Nik. Will try it that way. Thanks On Thu, Jul 5, 2012 at 3:12 PM, Nikolas Stevenson-Molnar < nik.mol...@consbio.org> wrote: > Well, the only way to know for sure would be regression testing > (http://en.wikipedia.org/wiki/Regression_testing). If the project makes > use

Re: Model for ListView needed?

2012-07-05 Thread Luigi Castro
They did not provide the model parameter because ca queryset was used, note the following line. queryset=Poll.objects.order_by('-pub_date')[:5] On Thursday, July 5, 2012 1:13:38 PM UTC-6, Sam007 wrote: > > Hey Djangoers, > > In the fourth and last part of the Django tutorials, > > urlpatterns

Re: Model for ListView needed?

2012-07-05 Thread Smaran Harihar
Thanks for the reply Luigi, but when should we use queryset and when should we use model? On Thu, Jul 5, 2012 at 3:25 PM, Luigi Castro wrote: > They did not provide the model parameter because ca queryset was used, > note the following line. > > queryset=Poll.objects.order_by**('-pub_date')[:5]

Re: Admin actions -- short_description as doc string?

2012-07-05 Thread Russell Keith-Magee
On Thu, Jul 5, 2012 at 9:22 PM, Melvyn Sopacua wrote: > On 5-7-2012 2:02, Russell Keith-Magee wrote: >> The short_description is a label that can be used for display purposes -- >> a 'human readable' version of the method name. > > Where is this used though? I've had the suspicion that the picture

Re: Render time

2012-07-05 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: > > https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html > > We use

Re: {% spaceless %} abuse (?)

2012-07-05 Thread Russell Keith-Magee
On Fri, Jul 6, 2012 at 4:27 AM, David Lam wrote: > hmm, kinda semi-noob, but heres my scenario > > I just started working on a fairly large Django project thats been around > for a couple years. > > In the templates, I see a lot of use of {% spaceless %} tags whose apparent > function is solely t

Re: 1.4: Emails to BCC addresses not sent

2012-07-05 Thread Melvyn Sopacua
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 BCC > addresses but can't find anything that explains what I'm seeing. You've included a l

Re: {% spaceless %} abuse (?)

2012-07-05 Thread Micky Hulse
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 If you develop for IE6, there's the IE6 whitespace bug. One fix, that I know of, is to remove all

Re: Converting to Postgres database; error with UserProfile model

2012-07-05 Thread Melvyn Sopacua
On 5-7-2012 19:06, DF wrote: > django.db.utils.DatabaseError: relation "report_userprofile" does not exist > LINE 1: INSERT INTO "report_userprofile" ("user_id", "first_name", "... > [ ... ] > This is the database model: > > class UserProfile(models.Model): > > user = models.OneToOneField

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

2012-07-05 Thread Jeff Silverman
Nik, I will give that a try. The reason for the decorator was that I was getting 403 forbidden, and the decorator made that one go away. If I remove the csrf from the settings file, will that solve that problem? On Tuesday, July 3, 2012 9:32:20 AM UTC-4, Jeff Silverman wrote: > > Below is the

Re: {% spaceless %} abuse (?)

2012-07-05 Thread David Lam
On Thu, Jul 5, 2012 at 5:00 PM, Russell Keith-Magee wrote: > On Fri, Jul 6, 2012 at 4:27 AM, David Lam wrote: > > hmm, kinda semi-noob, but heres my scenario > > > > I just started working on a fairly large Django project thats been around > > for a couple years. > > > > In the templates, I see

  1   2   >