Re: Django Form Question, Last Post Wasn't Formatted Correctly So I Deleted and Made a New One.

2014-05-14 Thread G Z
thanks On Wednesday, May 14, 2014 5:37:31 PM UTC-6, Jason Arnst-Goodrich wrote: > > You're passing two different dictionary parameters there. Try something > like this: > > ctx = { 'customers':customers, 'form': form } > return render_to_response('index.html', ctx) > > On Wednesd

csrf question

2014-05-14 Thread G Z
So I read the documentation on passing csrf tokens, however its giving me an issue i think its because im trying to pass it as a dictonary variable with my form and customers. This is from the documentation from django.views.decorators.csrf import csrf_protectfrom django.shortcuts import rende

Re: django and oracle

2014-05-14 Thread Jani Tiainen
On Thu, 15 May 2014 07:02:08 +0300 Jani Tiainen wrote: > On Wed, 14 May 2014 07:54:58 -0700 (PDT) > "J. D." wrote: > > > Can someone help me with cx_Oracle and Django?! :) > > > > I have Oracle DB 11.2 with many PLSQL-procedures in it that return cursor > > with various output. I want to work

Re: django and oracle

2014-05-14 Thread Jani Tiainen
On Wed, 14 May 2014 07:54:58 -0700 (PDT) "J. D." wrote: > Can someone help me with cx_Oracle and Django?! :) > > I have Oracle DB 11.2 with many PLSQL-procedures in it that return cursor > with various output. I want to work with them without django ORM and > directly call them. > > First of

Re: Django Form Question, Last Post Wasn't Formatted Correctly So I Deleted and Made a New One.

2014-05-14 Thread Jason Arnst-Goodrich
You're passing two different dictionary parameters there. Try something like this: ctx = { 'customers':customers, 'form': form } return render_to_response('index.html', ctx) On Wednesday, May 14, 2014 3:22:22 PM UTC-7, G Z wrote: > > def index(request): > form = SignUpFo

Re: How do I post into database the input form form fields

2014-05-14 Thread G Z
https://www.youtube.com/watch?v=f0uZqPNijCw but im having issues displaying form.. On Wednesday, May 14, 2014 2:25:09 AM UTC-6, x_marine wrote: > > Hi, > > I have been working on a project that works with prefilled form fields in > html. > > I wonder how this can integrated into Django Models

Re: Django Form Question, Last Post Wasn't Formatted Correctly So I Deleted and Made a New One.

2014-05-14 Thread G Z
def index(request): form = SignUpForm(request.POST or None) if form.is_valid(): save_it = form.save(commit=False) save_it.save() customers = Customer.objects.all() ctx = { 'customers':customers } return render_to_response('inde

Re: Django Form Question, Last Post Wasn't Formatted Correctly So I Deleted and Made a New One.

2014-05-14 Thread G Z
> > how do i do that? > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-u

Can't get i18n/setLang to match any urls

2014-05-14 Thread Shawn H
I'm beginning the process of adding some translations to one public page, and I can't get my setLang url to match, getting a 404 instead. I've got USE_I18N = True in my settings. I've got 'django.core.context_processors.i18n', in my TEMPLATE_CONTEXT_PROCESSORS. Copied the directly from the do

Re: Model Objects and Updating db via XML

2014-05-14 Thread Sayth Renshaw
Thanks Tom, I have set up a way to extract the elements I want with xmltodict and played with lxml.objectify last night and that would work as well. But what exactly in django models am I using to bring in the data? Sayth On 15/05/2014 1:13 am, "Tom Evans" wrote: > On Tue, May 13, 2014 at 8:40

Re: Django case, when, then on querysets

2014-05-14 Thread Anthony
But a query isn't run until I actually do something with the object, by loading it into memory by accessing or iterating over a queryset I'm performing potential time consuming operations. Isn't it better to do whatever work I can on the database? In some cases I could be doing something similar fo

Re: Django case, when, then on querysets

2014-05-14 Thread Daniel Roseman
On Wednesday, 14 May 2014 01:20:39 UTC+1, Anthony Hawkes wrote: > > Thanks for the answer! Do you think it would be practical to let the orm > generate the base query and then doing a replace on the column name? I was > thinking of this approach as a custom manager method to return a raw result.

[Announce] Django security releases issued

2014-05-14 Thread Jacob Kaplan-Moss
Today we've issued releases to remedy three security issues reported to us. Affected versions are Django 1.4, Django 1.5, Django 1.6 and the Django 1.7 beta. Full details and download information are on the Django project weblog: https://www.djangoproject.com/weblog/2014/may/14/security-releases

Re: Django Form Question, Last Post Wasn't Formatted Correctly So I Deleted and Made a New One.

2014-05-14 Thread Venkatraman S
Please pass the form to the template :) On Wed, May 14, 2014 at 11:24 AM, G Z wrote: > Below is my code. I am trying to generate a customer signup form from the >> Customer model in the models.py file. >> > Below I have created forms.py which is the script that will generate the > form data bas

Re: django and oracle

2014-05-14 Thread Avraham Serour
it looks like your error occurs when using django ORM with oracle, but in the beginning of your email you mention that you don't want to use it, so what's the problem here? On Wed, May 14, 2014 at 5:54 PM, J. D. wrote: > Can someone help me with cx_Oracle and Django?! :) > > I have Oracle DB 11

Re: turn off csrf

2014-05-14 Thread hinnack
Am Mittwoch, 14. Mai 2014 14:39:27 UTC+2 schrieb hinnack: > Am Dienstag, 13. Mai 2014 19:15:27 UTC+2 schrieb Tom Evans: > >> On Tue, May 13, 2014 at 4:36 PM, hinnack wrote: >> > >> > Am Dienstag, 13. Mai 2014 16:48:57 UTC+2 schrieb Tom Evans: >> >> >> >> On Tue, May 13, 2014 at 2:49 PM, hinna

Re: Model Objects and Updating db via XML

2014-05-14 Thread Tom Evans
On Tue, May 13, 2014 at 8:40 PM, Sayth Renshaw wrote: > Can I ask for some assistance please. > > For my project I will need to upate the database from an external xml file > consistently. The xml is like this one > http://old.racingnsw.com.au/Site/_content/racebooks/20140515GOSF0.xml > If i have

Formset inside Formset

2014-05-14 Thread rgreene
Good day, We have an inline formset where each instance of the form has a ManyToManyField for selecting countries. Here is the code: *# models* *class Geographic_Scope_Region(models.Model):* *# class name exception (underscore) because ManyToManyField assumes pk is lower(Table_Name) + _id*

django and oracle

2014-05-14 Thread J. D.
Can someone help me with cx_Oracle and Django?! :) I have Oracle DB 11.2 with many PLSQL-procedures in it that return cursor with various output. I want to work with them without django ORM and directly call them. First of all i ran my python code without django, with the cx_Oracle driver and

Re: syntax usage for the Database name ??

2014-05-14 Thread Ramiro Morales
On Wed, May 14, 2014 at 8:38 AM, Eran Ariel wrote: > Hi, > > > > I am uncertain as to the proper syntax usage for the Database name. > > I have a MYSQL database called "test". Does the subsequent script > automatically point to the folder where mysql databases reside on my Ubuntu > machine? > > >

Re: turn off csrf

2014-05-14 Thread hinnack
Am Dienstag, 13. Mai 2014 19:15:27 UTC+2 schrieb Tom Evans: > On Tue, May 13, 2014 at 4:36 PM, hinnack > > wrote: > > > > Am Dienstag, 13. Mai 2014 16:48:57 UTC+2 schrieb Tom Evans: > >> > >> On Tue, May 13, 2014 at 2:49 PM, hinnack wrote: > >> > Hi, > >> > > >> > how can I turn off csrf

syntax usage for the Database name ??

2014-05-14 Thread Eran Ariel
Hi, I am uncertain as to the proper syntax usage for the Database name. I have a MYSQL database called "test". Does the subsequent script automatically point to the folder where mysql databases reside on my Ubuntu machine? os.path.join(BASE_DIR, 'db.test ') Furthermore, the instru

Django bug? FieldFile.save() accesses content.size after self.storage.save() has closed content; ValueError is raised when file is BytesIO

2014-05-14 Thread James Boyden
Hi all, Can anyone confirm that the following is a bug in Django (and that I'm not simply missing the correct way to do this)? I'm using Django 1.7 on Python 3.4. I'm new to Django but a longtime Python programmer. I've been digging into a ValueError I get when I supply a BytesIO instance as th

How do I post into database the input form form fields

2014-05-14 Thread x_marine
Hi, I have been working on a project that works with prefilled form fields in html. I wonder how this can integrated into Django Models and posted into the database via view validation. The value I get from javascritpt computation whic works well. My form is like this this. Price: Cos

Re: Model Objects and Updating db via XML

2014-05-14 Thread Sayth Renshaw
Thanks for the response I can look at converting the fixtures to json of that would make it work. I wouldn't contribute xml.support at this stage, the quality of my contribution would likely be poor. Sayth On 14/05/2014 4:24 pm, "Avraham Serour" wrote: > Fixtures are usually in json. Not sure