Re: ViewDoesNotExist'module ' object has no attribute 'Form'

2012-11-16 Thread Sandeep kaur
On Fri, Nov 16, 2012 at 11:00 AM, muhammed riyas wrote: > > while using django forms i gt an error 'view does not exist' > > from django import forms > > class Employeeprofileform(forms.Form): > employee_name = forms.CharField(max_length=100) > employee_number = forms.IntegerField() >

Re: views on one page

2012-11-16 Thread Nebros
That was exactly what i have searched for. thank you very mutch. it works now. i post here again my current code, if another needs the same help... views- def kundendaten(request): cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=MAURITIUS;DATABA

proxy model for intermediate m2m tables

2012-11-16 Thread karan
I was doing some optimization around my auth tables. User model in django.contrib.auth.models has an m2m to Groups I want to fetch all the groups for a particular name using User's queryset. something like this - request.user.groups.filter(name = "xyz") I want to avoid the inner join orm makes

Post in view

2012-11-16 Thread Nebros
Hi again. I tryed to use my "POST" from the site before as a variable of the view from page 2. Here you can see my 2 pages and the views...: page one "portal.html" {% include "header.html" %} Kunde {% include "header2.html" %} Kunde {% block content

can't get translation to work

2012-11-16 Thread Jonas Geiregat
I've got an app with the following translation settings: # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = 'nl-BE' gettext = lambda s: s LANGUAGES = ( ('en', gettext('English')), ('nl', gettext('

Re: Adding rows to the form

2012-11-16 Thread Sandeep kaur
On Thu, Nov 15, 2012 at 4:53 PM, Satinderpal Singh wrote: > Hi friends, > I want to create a form so that the tables related to the form accepts > the multiple values by adding rows in the form, just like in gmail > only the first entry of the first row but not saved the entries of the > rows tha

Re: TypeError:

2012-11-16 Thread Victor Rocha
Take a look at this thread. https://groups.google.com/forum/?fromgroups=#!topic/django-users/Z_AXgg2GCqs It seems that your custom field is outdated. Field objects in django 1.4 now take two new named arguments: "connection" and "prepared". Update your field to be in compliance with new django

What used @models.permalink and get_absolute_url? Please an example to better understand this. An example of the documentation is not clear to me

2012-11-16 Thread enemytet
How (and why) to use @models.permalink and get_absolute_url? Please an example to better understand this. An example of the documentation is not clear to me -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web

Re: rendered template + additional data ajax response

2012-11-16 Thread smcoll
You want to include a rendered template in a JSON response? Take a look at https://github.com/eldarion/bootstrap-ajax and this related blog post: http://paltman.com/2012/08/23/twitter-bootstrap-and-ajax/ It's designed with the intention of supporting bootstrap markup, but i believe it's actual

RuntimeWarning "DateTimeField received a naive datetime" with TIMESTAMP MySQL field

2012-11-16 Thread Sencha
I'm running into an issue with the use of the MySQL `TIMESTAMP` field compared to `DATETIME` field. Django is run with timezone support and default timezone of `UTC`. I have 2 fields in my MySQL table, one is type `DATETIME` and the other is `TIMESTAMP`. Both are set in the model as a `DateTime

Re: How to implement pre-save operations for inlines in the admin interface?

2012-11-16 Thread Carsten Fuchs
Hi Arnold, Am 15.11.2012 21:29, schrieb Arnold Krille: Even if you do not need it outside the admin-interface (in this project), from the logic this belongs to the model, not into some view. Thank you very much for your replies, and in this regard (that the logic would much better be kept in

Re: Autoescape of & char ignoring safe filter

2012-11-16 Thread Peter of the Norse
I know this is months old, but I've been working on my back log. First of all, you should be using & in your URLs. They will get unescaped by the browser and show up as & when you click the link. This is so commonly overlooked that the browser will automatically escape them when loading. Then

Re: How to implement pre-save operations for inlines in the admin interface?

2012-11-16 Thread Martin J. Laubach
Don't overthink it. If believe you are likely to run into cascading recursive updates, then those cascades will happen no matter where you put the update. You will need to deal with it some way or another (locking, careful ordering, better data structures, whatever), but just moving things

Re: RuntimeWarning "DateTimeField received a naive datetime" with TIMESTAMP MySQL field

2012-11-16 Thread Timster
It's well-documented. Check out the Django documentation page on time zones: https://docs.djangoproject.com/en/1.4/topics/i18n/timezones/ When time zone support is enabled, Django uses time-zone-aware datetime objects. If your code creates datetime objects, they should be aware too. In this mod

Re: RuntimeWarning "DateTimeField received a naive datetime" with TIMESTAMP MySQL field

2012-11-16 Thread Sencha
Yes I'm aware of this, however I'm not generating the datetime objects, it's all coming from Django (hence me wondering whether or not it's a bug or not). All I need to do to replicate the bug is get the object from the db and then save is straight away; then warning appears. Django abstracts a

Re: sqlsync help

2012-11-16 Thread siddharth ghumre
Hi Friend, It would be really helpful if you paste the entire error msg. No one can figure out what went wrong by looking at your previous mail. On Tue, Nov 13, 2012 at 2:56 AM, Dennis Lee Bieber wrote: > On Mon, 12 Nov 2012 01:47:17 -0800 (PST), hardik juneja > declaimed the following in > gm

Re: How to implement pre-save operations for inlines in the admin interface?

2012-11-16 Thread Carsten Fuchs
Am 16.11.2012 18:17, schrieb Martin J. Laubach: Don't overthink it. If believe you are likely to run into cascading recursive updates, then those cascades will happen no matter where you put the update. You will need to deal with it some way or another (locking, careful ordering, better da

Re: no need to syncdb

2012-11-16 Thread I単igo Medina
Thanks for sharing, Mike. It's great using tests on this way. I've being used versioning for a long time and that way it is easy to apply and revert the changes too. iñ On Fri, 16 Nov 2012, Mike Dewhirst wrote: I just discovered something fantastic about Django I didn't know before. I real

Re: Django in virtualenv + nginx + uwsgi set up guide

2012-11-16 Thread Leonardo M. Millefiori
Hi Chris, you may get some ideas from this long guide, which is fairly recent: [1] http://www.abidibo.net/blog/2012/04/30/deploy-django-applications-nginx-uwsgi-virtualenv-south-git-and-fabric-part-1/ [2] http://www.abidibo.net/blog/2012/05/23/deploy-django-applications-nginx-uwsgi-virtualenv-sout

Re: Django in virtualenv + nginx + uwsgi set up guide

2012-11-16 Thread I単igo Medina
Thanks for sharing. Good reference. :) iñ --- grosshat.com Servicios de desarrollo web, usabilidad y sistemas On Fri, 16 Nov 2012, Leonardo M. Millefiori wrote: Hi Chris, you may get some ideas from this long guide, which is fairly recent: [1] http://www.

Re: Django in virtualenv + nginx + uwsgi set up guide

2012-11-16 Thread Chris Pagnutti
Yep. I got the server up and running, and that was definitely the most useful resource. Thanks. On Fri, Nov 16, 2012 at 5:30 PM, I単igo Medina wrote: > > Thanks for sharing. Good reference. :) > > iñ > > --**- > grosshat.com > Servicios de desarrollo web, usa