Release considerations

2012-07-10 Thread Jon Black
I've been working on a task management project and am at a point where I'm happy to make my first release. The idea is that people can install the project on their own server (at home, at work, wherever) and use it to manage their tasks. What should I consider doing before making the code

Re: Release considerations

2012-07-10 Thread kenneth gonsalves
On Tue, 2012-07-10 at 08:24 +0200, Jon Black wrote: > I've been working on a task management project and am at a point where > I'm happy to make my first release. The idea is that people can > install > the project on their own server (at home, at work, wherever) and use > it > to manage their

Re: CSRF verification failed. Request aborted.

2012-07-10 Thread Сергей Фурсов
as described in error message your view function have to use RequestContext for the template, instead of Context. your view should looks like def about(request): if request.method == 'POST':

Re: many "Broken INTERNAL link" with end string "/undefined/"

2012-07-10 Thread ferran
Hello Melvyn, I'm found this information http://stackoverflow.com/questions/11017609/undefined-randomly-appended-in-1-of-requested-urls-on-my-website-since-12-jun I'm have too: Referrer: http://www.marquezshop.com/es/catalogo/ofertas/ Requested URL:

Emberjs Vs knockoutjs with django?

2012-07-10 Thread Anand Agarwal
Hi All Recently we have revamped our client architecture to enhance user experience and improve performance of our product BootStrapToday ( http://bootstraptoday.com). BootStrapToday is built using Django. We needed a good javascript framework. So we evaluated Emberjs and knockoutjs and found

Cause of a "Lock wait timeout error"?

2012-07-10 Thread Derek
Running Django 1.4 and MySQL (InnoDB), with the development server. I have a setup with a one-to-one relationship that I think might be causing a database issue. Model A has a one-to-one with Model B (the endpoint of the relationship is stored in A) Model A also has both a one-to-many and

Re: Django-Subscription

2012-07-10 Thread Pervez Mulla
can I use Paypal for this.? On Mon, Jul 9, 2012 at 9:07 PM, shacker wrote: > On Monday, July 9, 2012 2:54:06 AM UTC-7, Pervez Mulla wrote: >> >> Hi... >> >> How can I make use Django_subscripation in my project...?? In my >> application I want to give subscription

cleaned_data in forms.py?

2012-07-10 Thread Leandro Alves
Hi, I'm new in Django and I'm struggling myself here to find out how to get the value of a field inside the forms.py. Yes, I did read the documentation, keep reading and searching on the internet... But please, could someone give a tip regarding this? I just want to get/use the values of

Regarding Template langauge

2012-07-10 Thread web_premi
Hi all, I want to know that whether django support jsp or not? as well as what kind of other langauges does django support like dhtml,php,jsp,asp? which best suite for it? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view

Re: cleaned_data in forms.py?

2012-07-10 Thread Сергей Фурсов
Why not use Form Wizard from django.contrib.formtools. Look at https://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/#conditionally-view-skip-specific-steps Simply change show_message_form_condition method to something like def show_message_form_condition(wizard):

Re: rendering modelForms

2012-07-10 Thread mapapage
I already read that, but my question is how can I css-style only some of my fields while the rest continue to be rendered by form.as_table. Is there such an option? I want that because with modelForms I have a direct mapping of my forms to my models and if I customize them manually I loose for

Dynamic generation of model admin forms

2012-07-10 Thread lubos
Hello, I have problems with significant alteration of admin forms. This project database is quite complex and inside relationships are not obvious enough to let Django automatically create usual model admin forms. On the basis of database, form fields must be generated dynamically, I cannot

Re: model sends two requests

2012-07-10 Thread jonas peters
Thanks, helped me a lot. Em segunda-feira, 9 de julho de 2012 17h53min23s UTC-3, Dennis Lee Bieber escreveu: > > On Mon, 9 Jul 2012 09:26:15 -0700 (PDT), jonas peters > declaimed the following in > gmane.comp.python.django.user: > > > I have a model and use

Re: cleaned_data in forms.py?

2012-07-10 Thread Leandro Alves
Hi, Yes... it is exactly with the form wizard that I'm trying to do it.. But how can I "receive" these values inside my forms.py? This is what I couldn't find yet. I want to be able use this values inside the ContactForm2 form. Thanks for your help so far. Leandro On Tuesday, July 10,

Re: rendering modelForms

2012-07-10 Thread kenneth gonsalves
On Tue, 2012-07-10 at 04:06 -0700, mapapage wrote: > I already read that, but my question is how can I css-style only some > of my fields while the rest continue to be rendered by form.as_table. > Is there such an option? that I do not think you can do. What you have to do is to drill down into

Re: Regarding Template langauge

2012-07-10 Thread kenneth gonsalves
On Tue, 2012-07-10 at 00:42 -0700, web_premi wrote: > I want to know that whether django support jsp or not? as well as what > kind of other langauges does django support like > dhtml,php,jsp,asp? which best suite for it? none of the above -- regards Kenneth Gonsalves -- You received this

Re: cleaned_data in forms.py?

2012-07-10 Thread Сергей Фурсов
You can try to override get_form_kwargs method def get_form_kwargs(self, step): if step == '1' cleaned_data = self.get_cleaned_data_for_step('0') or {} return {'sender': cleaned_data.get('sender', None)} else: return {} and in ContactForm2 override __init__ method

Re: cleaned_data in forms.py?

2012-07-10 Thread Sergiy Khohlov
Sometimes ago I've added a post to my blog about this: http://skhohlov.blogspot.com/2012/04/passing-values-from-view-to-form.html 2012/7/10 Сергей Фурсов : > You can try to override get_form_kwargs method > > def get_form_kwargs(self, step): > if step == '1' >

Re: Regarding Template langauge

2012-07-10 Thread Phang Mulianto
Hi , if you ask about template use in django ... there are some alternative besides default django template, which like mako, jinja, cheetah... regards, Mulianto On Tue, Jul 10, 2012 at 7:41 PM, kenneth gonsalves wrote: > On Tue, 2012-07-10 at 00:42 -0700, web_premi

Re: cleaned_data in forms.py?

2012-07-10 Thread Leandro Alves
Hi Сергей Ф, It worked now!!! \o/ But I have a question... in this case why do I need to send "None" in " get_form_kwargs" and why should I use the "super(ContactForm2, self).__init__(*args, **kwargs)" after the init? Thank you very much for your help!! Leandro * * On Tuesday, July 10,

Re: cleaned_data in forms.py?

2012-07-10 Thread Leandro Alves
Hi skhohlov, I will read it right now Thanks for sharing. Leandro On Tuesday, July 10, 2012 2:09:59 PM UTC+2, skhohlov wrote: > > Sometimes ago I've added a post to my blog about this: > > http://skhohlov.blogspot.com/2012/04/passing-values-from-view-to-form.html > > 2012/7/10 Сергей

Re: cleaned_data in forms.py?

2012-07-10 Thread kenneth gonsalves
On Tue, 2012-07-10 at 05:56 -0700, Leandro Alves wrote: > But I have a question... in this case why do I need to send "None" in > "get_form_kwargs" None is the default value to prevent a crash > and why should I use the "super(ContactForm2, self).__init__(*args, > **kwargs)" after the init?

Re: rendering modelForms

2012-07-10 Thread Jirka Vejrazka
Hi Marilena, I'm also using Twitter Bootstrap and over time migrated to this template snipped that I'm including in my templates at the place where you put {{ form.as_table }} http://dpaste.com/hold/768995/ If you find it useful, great :) I'm not a web developer by nature so there may be

Re: cleaned_data in forms.py?

2012-07-10 Thread Leandro Alves
Read and understood!! :) Thanks, Kenneth!! Leandro On Tuesday, July 10, 2012 3:00:34 PM UTC+2, lawgon wrote: > > On Tue, 2012-07-10 at 05:56 -0700, Leandro Alves wrote: > > But I have a question... in this case why do I need to send "None" in > > "get_form_kwargs" > > None is the default

Adding Checkbox in ModelAdmin

2012-07-10 Thread JZint
Hello, i have a little question which i could'nt answer myself reading the documentation. i'm trying to modify the modelAdmin of my "Picture"-model this is what i'm trying to do: class PictureAdmin(admin.ModelAdmin): def save_model(self, request, obj, form, change): # if

Catching Oracle Errors

2012-07-10 Thread Dan Gentry
My Django app runs on an Oracle database. A few times a year, the database is unavailable because of a scheduled process or unplanned downtime. However, I can't see how to catch the error and give a useful message back to the requester. Instead, a 500 error is triggered, and I get an email

Re: cleaned_data in forms.py?

2012-07-10 Thread Sergiy Khohlov
its constructor. You shoul use this because parent constructor should be save thanks, Serge (or Sergio for you :-) ) 2012/7/10 Leandro Alves : > Hi Сергей Ф, > > It worked now!!! \o/ > > But I have a question... in this case why do I need to send "None" in >

Model.save() behaves differently when used from ModelAdmin.save_model()

2012-07-10 Thread jul
I'm using `ModelAdmin.save_model` to set some data from the `request` object to my instance. When I change an existing `Magasin` instance from the admin, I get an `IntegrityError`, eg: "Duplicate entry '220' for key 'PRIMARY'" meaning that in Model.save, the instance is created, instead

Re: rendering modelForms

2012-07-10 Thread Tomas Neme
There's a way, but you'll need to touch the form on the python side quite a lot, changing the default widgets adding them the css classes you want. You can take a look at https://github.com/earle/django-bootstrap and https://github.com/dyve/django-bootstrap-toolkit/ they provide some shortcuts

mysql warnings raise exception

2012-07-10 Thread George Lund
I notice that this problem gets discussed occasionally but with no proper resolution, so I felt obliged to raise it again, as the consequences are quite serious for MySQL users. When MySQL issues a warning, Django sometimes raises an exception. This is discussed in

Re: Cause of a "Lock wait timeout error"?

2012-07-10 Thread Derek
I appreciate the reply Dennis; some good suggestions. But I was rather hoping that someone would point some "gotcha" (or potentially fatal flaw) with Django that could arise in certain edge cases - especially in connection with a 1:1 design scenario, On 10 July 2012 19:35, Dennis Lee Bieber

Re: Different authentication package

2012-07-10 Thread Jani Tiainen
Maybe you should more clearly specify your needs. On Tue, Jul 10, 2012 at 1:33 AM, Melvyn Sopacua wrote: > On 9-7-2012 20:41, Jani Tiainen wrote: > > Are you asking how to write custom authentication backend that can suit > > your needs? > > No, that would be my backup

Custom 403.html

2012-07-10 Thread chris
I have a view that returns HttpResponseForbidden('No permission') if a user shouldn't be on that page. It shows the message 'No permission' and the correct 403 response, but nothing else. I would like it to use my 403.html template I have in my root template directory no match the rest of the

Re: JSONField: which app to choose ?

2012-07-10 Thread Reinout van Rees
On 09-07-12 20:52, Michael Palumbo wrote: Hi, I have found several implementations of a Django JSON Field. Have you ever tried one ? Which one do you recommend ? I'm using the 'django-jsonfield' on pypi: http://pypi.python.org/pypi/django-jsonfield/ It is

Re: Release considerations

2012-07-10 Thread Reinout van Rees
On 10-07-12 08:24, Jon Black wrote: I've been working on a task management project and am at a point where I'm happy to make my first release. The idea is that people can install the project on their own server (at home, at work, wherever) and use it to manage their tasks. What should I

performance: How to measure: LXML or DB queries?

2012-07-10 Thread ydjango
Few ajax calls are very slow to return. The ajax call basically queries data from mutiple tables ( using Django ORM), create an XML using LXML and returns the XML. What is the best way to measure where the performance bottleneck is? I think it is DB access. LXML is the fastest XML library in

Re: JSONField: which app to choose ?

2012-07-10 Thread Michael Palumbo
Can you get it work in the admin ? I don't understand why I get a ValidationError "[u"'' is not a valid JSON string."] as soon as I try to reach the Add admin page of my Model... import jsonfield class Mapping(models.Model): data_map4 = jsonfield.JSONField() - class

Re: performance: How to measure: LXML or DB queries?

2012-07-10 Thread Nikolas Stevenson-Molnar
Try the django-debug-toolbar: https://github.com/django-debug-toolbar/django-debug-toolbar It will show you all queries executed for a request and how long they take. Of course, you'll have to disabled if when actually using the AJAX, since the toolbar injects itself into the response. But you

Difficulties Beginning

2012-07-10 Thread James Smith
Hey there, I've recently taken up learning Django, but I've run into an issue I can't seem to resolve. Some information: Windows 64-bit Django 1.4 Python 3.2 And this is the tutorial I'm following: https://docs.djangoproject.com/en/dev/intro/tutorial01/ When I try to start a new project, I

Re: Difficulties Beginning

2012-07-10 Thread Apokalyptica Painkiller
Hello, i'm not sure but may be your mistake is the name of the project. i mean, you type this: django-admin.py startproject pasta face The space between pasta and face, it's wrong, i guess it should be: django-admin.py startproject pasta_face And the SyntaxError i think it is: except

Re: Difficulties Beginning

2012-07-10 Thread James Smith
Thanks for the quick reply! I realized I posted a poor screenshot where the name of the project had a space in it. I was being a bit silly there, to be honest...that was after many failed attempts. I've tried without spacing, and I got the same thing. I've tried all sorts of things,

Re: Difficulties Beginning

2012-07-10 Thread Apokalyptica Painkiller
May be it's python's version,why don't you try python 2.7 2012/7/10 James Smith > Thanks for the quick reply! I realized I posted a poor screenshot where > the name of the project had a space in it. I was being a bit silly there, > to be honest...that was after many failed

Re: Difficulties Beginning

2012-07-10 Thread James Smith
Thanks, Dennis. That sure seems like a probable source for this error :) On Tuesday, July 10, 2012 10:25:34 PM UTC-4, James Smith wrote: > > Hey there, > > I've recently taken up learning Django, but I've run into an issue I can't > seem to resolve. > > Some information: > Windows 64-bit >

Form 'POST' to a database

2012-07-10 Thread JJ Zolper
I honestly just have a general question. If I have one database set in my settings file in settings.py and I try to execute a simple HTML Form using 'POST' how do I get that data into my PostgreSQL database? In my view do I have to interface with my model and thus the model takes care of the

Re: Form 'POST' to a database

2012-07-10 Thread Lee Hinde
On Jul 10, 2012, at 8:48 PM, JJ Zolper wrote: > I honestly just have a general question. > > If I have one database set in my settings file in settings.py and I try to > execute a simple HTML Form using 'POST' how do I get that data into my > PostgreSQL database? > > In my view do I have to

Re: Difficulties Beginning

2012-07-10 Thread James Smith
And Dennis was right! That fixed my problem. Thanks again. You too, Apokalyptica, for taking the time to try to figure this out. On Tuesday, July 10, 2012 11:13:02 PM UTC-4, James Smith wrote: > > Thanks, Dennis. That sure seems like a probable source for this error :) > > On Tuesday, July 10,