Re: Django & Oracle connection problem

2013-01-24 Thread akaariai
On 25 tammi, 00:27, Dylan Klomparens wrote: > I have a Django program that is connecting to an Oracle database. In my > settings.py file I have this configuration: > > DATABASES = { >   'default': { >     'ENGINE': 'django.db.backends.oracle', >     'NAME': 'xe', >     'USER': 'MY_USER_NAME', >  

Re: 2 projects, 2 apps, bad templates ...

2013-01-24 Thread Tomas Neme
just to clarify: somewhere else, not a subdir of any of your projects/ | ---FOOAPP/ | ---templates/ | ---fooapp/ | --mytemplate.html projectA/ | --settings.py | --urls.py | --templates/ |

Re: 2 projects, 2 apps, bad templates ...

2013-01-24 Thread Tomas Neme
> > Use virtualenvs. That's basic for any serious python development > > you'll want to do. > > Totally agree. Setting up virtualenv's are our long term goal. really, it should be your SHORT term goal. As for your problem, you can't expect to install FOOAPP in two different directories on the sam

Re: 2 projects, 2 apps, bad templates ...

2013-01-24 Thread Micky Hulse
Hi Tomas! Thank you for your reply, I really appreciate it. :) On Thu, Jan 24, 2013 at 6:12 PM, Tomas Neme wrote: > Use virtualenvs. That's basic for any serious python development > you'll want to do. Totally agree. Setting up virtualenv's are our long term goal. > Besides that, you might add

Re: 2 projects, 2 apps, bad templates ...

2013-01-24 Thread Tomas Neme
Use virtualenvs. That's basic for any serious python development you'll want to do. Besides that, you might add DjangoProjectA to sys.path on ProjectA (and add DjangoProjectB to sys.path on ProjectB) in their respective manage.py files. On the other hand, why does pip install -e install it under

2 projects, 2 apps, bad templates ...

2013-01-24 Thread Micky Hulse
Noob alert! :D I work on a server where we have multiple Django projects that all share one Django installation. Each project has it's own subdomain. At this time, we aren't using virtual envs. Situation: 1. I built a basic application (let's call it FOOAPP) inside of DjangoProjectA; after usi

Re: define form in yaml file

2013-01-24 Thread Chris Hinds
Hey, I've got a project where models, forms and templates are all generated from a single yaml file. It works well here as the forms are long, with a fair amount of layout and plenty of formsets. I'm doing a refactor at the moment which should yield some reusable bits. I'd be very happy to

Django & Oracle connection problem

2013-01-24 Thread Dylan Klomparens
I have a Django program that is connecting to an Oracle database. In my settings.py file I have this configuration: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.oracle', 'NAME': 'xe', 'USER': 'MY_USER_NAME', 'PASSWORD': 'abcdefghijklmnopqrstuvwxyz', 'HOST': 'db

"Add another [inline item]" and custom widgets with JavaScript

2013-01-24 Thread Daniele Procida
I work with a rather complex autocomplete widget for admin that works with generic foreign keys (select the content type, then you can do an autcomplete search for the item). The problem is that it breaks when you "Add another [inline item]" in the admin - the issue raised in

Re: define form in yaml file

2013-01-24 Thread Leonardo S
Hi, I'm new to Django and here. yaml file is commonly used in Rails framework. Django uses simple python file (settings.py). What security risk? Have you got any example ? 2013/1/24 Adrian Andreias > Hello, > > I need a way to define a django form through a yaml file (or another text > forma

define form in yaml file

2013-01-24 Thread Adrian Andreias
Hello, I need a way to define a django form through a yaml file (or another text format). Is there some code that already does this? I'm trying to not reinvent the wheel. I can't use simple python classes, since this would user input and would be a security risk and I need a simpler and limited

Re: Database Transaction Migration

2013-01-24 Thread Sandeep kaur
> I haven't used South for complex data migrations, but I think it's > most useful just after (or simultaneously to) doing the schema > of course, if both old and new applications are written with Django > and handle data via the Django ORM, then you can do things like: > > > import oldapp.models

Database Transaction Migration

2013-01-24 Thread Sandeep kaur
-- Forwarded message -- From: Javier Guerra Giraldez Date: Wed, Jan 23, 2013 at 3:34 AM Subject: Re: Database Transaction To: django-users@googlegroups.com On Tue, Jan 22, 2013 at 11:54 AM, Sandeep kaur wrote: > Yes, I also thought south will be helpful but when we need to do >

Re: How can i redirect a form to amother page when validation is correct

2013-01-24 Thread Jason Arnst-Goodrich
It's not redirecting because the following statement never evaluates to True: if accept is not None and accept.is_active: You are using auth.authenticate (see below) but I don't think that's what you want in this case. auth is the built in django auth system which your code isn't using. acce

Re: Generic views and url issues

2013-01-24 Thread amy . cerrito
Updating my template code to use namespace:url_name did it! list url: List of all ad calls detail url: Thanks again for everyone's feedback! On Thursday, January 24, 2013 10:07:14 AM UTC-5, Tom Christie wrote: > > Hi Amy, > > I'd suggest you check the following... > > * Your > ROOT_URLCO

Re: Django Baseball Site Model

2013-01-24 Thread David Gomez
What about my model? Is this model good for what I'm planning to do? On Thursday, January 17, 2013 12:34:23 AM UTC-5, Mac wrote: > > You could create another field under Stat called team, and rename the > class stat to "Stint" or "Term" or "Session" ( I can't think of a better > word ) to repres

Re: Generic views and url issues

2013-01-24 Thread Tom Christie
Hi Amy, I'd suggest you check the following... * Your ROOT_URLCONFsetting is correct. * If the `urls.py` module you're referring to here is a project URL conf and not the root URL conf, make sure that it is being included by the

Re: Generic views and url issues

2013-01-24 Thread Bill Freeman
Have you tried it without the quotes around 'detail' in the url template tag invocation? If I'm remembering correctly, the need for the quotes depends on django version and options. Bill On Thu, Jan 24, 2013 at 9:01 AM, Amy Cerrito wrote: > Thanks for your response! > > Unfortunately, your sug

Re: Generic views and url issues

2013-01-24 Thread Amy Cerrito
Thanks for your response! Unfortunately, your suggestion did not eliminate the NoReverseMatch error. NoReverseMatch at /testadcall/ Reverse for 'detail' with arguments '()' and keyword arguments '{'object_id': 1}' not found. I have another example where I request the list view, which does not

Re: What exactly does order_with_respect_to do?

2013-01-24 Thread Anton Agestam
Thanks for the correction, found this thread when Googleing for an explanation. On Tuesday, December 15, 2009 5:28:10 PM UTC+1, smcoll wrote: > > This is probably a dead thread, but... i think the answer given is > incorrect. > > 'order_with_respect_to' adds an '_order' integer field to the mo

Re: download pdf in admin

2013-01-24 Thread grat
thank you very much, I add MEDIA_URL and workink all. Milan Dne středa, 23. ledna 2013 11:46:11 UTC+1 psjinx napsal(a): > > Hey Milan, > > Uploaded files are available at `MEDIA_URL` which is generally set to > `/media`. So if you enable serving for media files, then your file should > be ava

Re: how do I dynamically modify a choice field

2013-01-24 Thread Bill Freeman
On Thu, Jan 24, 2013 at 7:06 AM, Mike Dewhirst wrote: > On 24/01/2013 10:30pm, frocco wrote: > >> Thanks Mike, >> >> Since I am new to django, how would I code this? >> >> In my for loop, my row.stock field has a value. >> Lets say row.stock is 20 >> I want my choice field to show 1 to 20 >> >> T

Re: how do I dynamically modify a choice field

2013-01-24 Thread frocco
I see your point. maybe I should validate stock when they press update and/or post order. On Wednesday, January 23, 2013 10:36:46 AM UTC-5, frocco wrote: > > Hello, > > In my view, I am displaying rows of data that have a choice field in a > form. > one form for each row > > I want to change the

How can I execute a store procedure in django, using multi-database?

2013-01-24 Thread Fellipe Henrique
How can I execute a store procedure in django, using multi-database? Thanks T.·.F.·.A.·. S+F *Fellipe Henrique P. Soares* *"Quemadmodum gladius neminem occidit, occidentis telum est."* (Epistulae morales ad Lucilium, Lucius Annaeus

Re: how do I dynamically modify a choice field

2013-01-24 Thread Mike Dewhirst
On 24/01/2013 10:30pm, frocco wrote: Thanks Mike, Since I am new to django, how would I code this? In my for loop, my row.stock field has a value. Lets say row.stock is 20 I want my choice field to show 1 to 20 The next row.stock might have 12 I want my choice field to show 1 to 12 In other

Re: how do I dynamically modify a choice field

2013-01-24 Thread frocco
Thanks Mike, Since I am new to django, how would I code this? In my for loop, my row.stock field has a value. Lets say row.stock is 20 I want my choice field to show 1 to 20 The next row.stock might have 12 I want my choice field to show 1 to 12 In other words, I do not want the user to select