Re: Django in Eclipse+PyDev, lot's of functions and imports are undefined/unresolved

2012-10-26 Thread Chris Pagnutti
Yeah, I'm quite sure the interpreter can see django. I can verify it from the console, and the app runs fine, despite all the complaints, so I'm not too worried about it. What does Project > Clean do? On Friday, October 26, 2012 8:16:18 PM UTC-4, Andrew McHarg wrote: > > Have you verified

Django Boundary Service

2012-10-26 Thread Pattie Reaves
Django N00b here ... I'm trying to install & configure the Django Boundary Serviceplugin. When I get to the step where you load the shape files into the Postgres database (I'm using the tutorial

Re: Django in Eclipse+PyDev, lot's of functions and imports are undefined/unresolved

2012-10-26 Thread Andrew McHarg
Have you verified that the python interpreter pydev is looking at has django installed in it? That might account for it. Also try doing a Project > Clean. That being said I have found that pydev's code analysis can be pretty janky under a variety circumstances such as switching branches outside

Re: pub_date timezone

2012-10-26 Thread donarb
You misspelled 'pub_date' as 'put_date' in your model definition. On Thursday, October 25, 2012 9:30:57 AM UTC-7, BrendanC wrote: > > Hi erm > > Went back over your comment and realised what you commented. > After python manage.py I gget the python prompt>>> and then typed > from polls.models

Re: How to reference model instance fields dynamically

2012-10-26 Thread Chris Pagnutti
Indeed. Was trying that, but wasn't working on account of me forgetting to save inst first. It's all good now. Thanks a mil Brad. All the best. On Friday, October 26, 2012 11:37:36 AM UTC-4, Chris Pagnutti wrote: > > Say I have a model like > class MyModel(models.Model) >name =

Re: How to reference model instance fields dynamically

2012-10-26 Thread Brad Pitcher
Use setattr's counterpart, getattr :-) getattr(inst, k).add(relatedObject) On Fri, Oct 26, 2012 at 5:16 PM, Chris Pagnutti wrote: > Awesome. Thanks Brad. Now the question is, what if the attribute is a > ManyToManyField. > > e.g. > inst.k.add(relatedObject) > > How

Re: How to reference model instance fields dynamically

2012-10-26 Thread Chris Pagnutti
Awesome. Thanks Brad. Now the question is, what if the attribute is a ManyToManyField. e.g. inst.k.add(relatedObject) How to reference k properly if k is a string containing the name of a ManyToManyField of inst? On Friday, October 26, 2012 11:37:36 AM UTC-4, Chris Pagnutti wrote: > > Say I

Re: Django in Eclipse+PyDev, lot's of functions and imports are undefined/unresolved

2012-10-26 Thread Chris Pagnutti
It turns out that, although eclipse is complaining a lot, the site runs just fine. I guess I'll just have to get used to ignoring eclipse complaints when working with django. Thanks. On Friday, October 26, 2012 12:48:35 PM UTC-4, Chris Pagnutti wrote: > > Hi. I created a django project using

Re: Intermittent mysql connection errors

2012-10-26 Thread Guy
After more testing it appears that this is an O/S layer issue and not specifically a django issue. On Thursday, October 25, 2012 3:07:16 PM UTC-7, Guy wrote: > > I'm experiencing an annoying problem with a couple of django apps. Both > apps are games built on Django that make regular calls to

Re: Django in Eclipse+PyDev, lot's of functions and imports are undefined/unresolved

2012-10-26 Thread Nick Santos
I don't have a solution, but I can indicate that the same thing has happened to me on a standard install of Python 2.7.2 (no virtualenv) on Windows 7, so I don't know that it's anything about your setup in particular, if that helps. -Nick On Fri, Oct 26, 2012 at 9:48 AM, Chris Pagnutti

Re: Save formtools.WizardView for later completion in another session?

2012-10-26 Thread ducky
I also came across this issue. I managed to address this by actually looking at the code for django.contrib.formtools.wizard.views.WizardView. (I am no django expert. So I am sure there might be a cleaner way. This worked for me. So I am just sharing my experience.) I overrode the get and

Django in Eclipse+PyDev, lot's of functions and imports are undefined/unresolved

2012-10-26 Thread Chris Pagnutti
Hi. I created a django project using the eric4 IDE. I'm just trying to transfer everything over to Eclipse+PyDev. I basically just rebuilt the whole project from scratch by copying and pasting all the source code. I'm pretty sure I set up my python interpreter fine. I'm using django-trunk

Re: [ANNOUNCE] Django 1.5 alpha 1 released

2012-10-26 Thread Nikolas Stevenson-Molnar
+1 ... excited for all the great new stuff (esp. custom user models!) _Nik On 10/25/2012 9:00 PM, Stephen Anto wrote: > Hi, > > Nice to hear thank you so much for all who worked together for > coming up new version. > > On Fri, Oct 26, 2012 at 1:28 AM, James Bennett

Re: Strange behaviour after pressing on button

2012-10-26 Thread Nikolas Stevenson-Molnar
Just include a 'csrftoken' form parameter with your other form data. If you're submitting the entire form, you can use the {% csrf_token %} template tag anywhere inside your tags. _Nik On 10/26/2012 2:14 AM, Stone wrote: > This is misunderstand able for me. > How can I submit as a parameter? >

Re: Modernizing the Tutorial

2012-10-26 Thread Lee Hinde
On Thu, Oct 25, 2012 at 4:37 PM, Russell Keith-Magee wrote: > > > On Thu, Oct 25, 2012 at 9:00 PM, Tomas Neme wrote: >> >> Now that function-based views are being deprecated, or at least that >> class-based views are being favored, there should be

Re: How to reference model instance fields dynamically

2012-10-26 Thread Brad Pitcher
You can use python's setattr function to do this: for k,v in fields.iteritems(): setattr(inst, k, v) On Fri, Oct 26, 2012 at 8:37 AM, Chris Pagnutti wrote: > Say I have a model like > class MyModel(models.Model) >name = models.CharField(max_length=100) >

How to reference model instance fields dynamically

2012-10-26 Thread Chris Pagnutti
Say I have a model like class MyModel(models.Model) name = models.CharField(max_length=100) number = models.IntegerField() In a script, I want to have something like fields = {"name":"Joe", "number":5} And I want to update a MyModel instance using the fields dictionary, something like

planetdjango.org down?

2012-10-26 Thread Alexandre Provencio
Can't access since yesterday :/ -Alexandre -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to

Re: Django and MongoDB

2012-10-26 Thread Mando
you could use pymongo http://api.mongodb.org/python/current/ On Friday, October 26, 2012 3:41:27 AM UTC-5, mh wrote: > > Hi, > what is the current recommendation for using MongoDB with Django? I know > about the django-nonrel project, but it bases on Django 1.3, and we're > heading to Django

Re: Strange behaviour after pressing on button

2012-10-26 Thread Kurtis Mullins
Just to give you a hint, you'll need to do 2 things: 1. Use {% csrf_token %} in your view to generate the CSRF Token Form Field 2. Include the value and name from that Form Field in your Javascript Request #2 is much more a Javascript issue; not specific to django. although someone here may help

Re: Installing Djando and tutor polls app

2012-10-26 Thread Rodrigo Morgado
Stefan and Lachian, I really appreciate your help. I didn't see spelling mistake. Thank you and have a nice day. Rodrigo 2012/10/26 Stephen Anto > Hi, > > as Lachian said, It is spelling mistake for ForeignKey. Just correct your > word. > > > On Fri, Oct 26, 2012 at

Re: Strange behaviour after pressing on button

2012-10-26 Thread Stone
Hi Nik, I do not understand. How can I submitted as a actual form parameter? Are there any examples? On Oct 25, 5:24 pm, Nikolas Stevenson-Molnar wrote: > It looks like you're submitting your request via AJAX and using the > X-CSRFToken header. It's very possible that

Django and MongoDB

2012-10-26 Thread mh
Hi, what is the current recommendation for using MongoDB with Django? I know about the django-nonrel project, but it bases on Django 1.3, and we're heading to Django 1.5 in few weeks, with ubercool custom User feature. Anyone would like to share ideas? Regards, Mateusz -- You received this

Re: How does threading and processes work in Django

2012-10-26 Thread Philip Mountifield
I think what you are looking for is Celery (http://celeryproject.org/). This handles asynchronous tasks in a clean and tidy manor meaning your normal requests are free to return their responses while processing continues. You can check the results of tasks later on in another request. Regards