Re: Oracle: blank, null, and empty_strings_allowed

2012-06-19 Thread Kurtis Mullins
So you're trying to, basically, enforce "required=True" at the database-level? On Tue, Jun 19, 2012 at 7:23 PM, Ian wrote: > On Monday, June 18, 2012 5:59:27 PM UTC-6, André Pang wrote: >> >> What I'd like to do is (1) disallow NULLs, and (2) disallow empty >> strings.

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-19 Thread Ian
On Monday, June 18, 2012 5:59:27 PM UTC-6, André Pang wrote: > > What I'd like to do is (1) disallow NULLs, and (2) disallow empty strings. > It looks like there's no current way to do this with Oracle since the > backend overrides null to always be True, and blank is an admin validation >

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-19 Thread André Pang
The idea is to try to ensure that no empty strings make it to the database, so you're not allowed to insert them into the database. You can ensure this at the Django (ORM) layer right now with blank=True for the admin or by checking the blank attribute manually in your own code, but there's no

Re: Any clue why Facebook iframe would be blank?

2012-06-19 Thread Kurtis
*Bump* I've been trying to diagnose this problem. I have no idea what's going on, though. 1. I tried just serving a simple .html page on Nginx to see if that's where the problem was. It didn't serve properly (through an error) but it did actually display the error. The problem there was, you

Re: Implementing Django Search

2012-06-19 Thread DF
Thank you. I ended up using Haystack but I appreciate your insight. On Tuesday, June 19, 2012 12:08:44 AM UTC-4, Daniel Sokolowski wrote: > > I also found that piece of code when I needed to implement search - it > was confusing so I ended up with my own approach that was easier to > understand

Re: django-admin.py startproject mysite

2012-06-19 Thread Seyfullah Tıkıç
http://stackoverflow.com/questions/2870262/django-admin-py-startproject-mysite-not-working-well-on-windows-7 solved my problem. 2012/6/19 Seyfullah Tıkıç > Yes, I use an admin account. Python.exe is in my path as "c:\Python27". Ok > I will try python way. > > Thank you. > >

Re: 'str' object has no attribute 'resolve'

2012-06-19 Thread Kurtis Mullins
Those URLs are outside of the tuple. Also, you're not using url() types to define the urls so any reverse lookup will fail. On Tue, Jun 19, 2012 at 2:00 PM, Xavier Ordoquy wrote: > Hi, > > If you just return the original urls.py, there's no way we can know what > you did

Re: Wsgi path problem: deploying on a production server

2012-06-19 Thread wgw
Thanks for your help; it's good to see how others configure Apache. I'll give the Location block a try. I'm not sure that will solve my problem, because you still have the WSGIScriptAlias with root . That means all traffic to your site should go through python and wsgi. My app works fine that

Re: django-admin.py startproject mysite

2012-06-19 Thread Seyfullah Tıkıç
Yes, I use an admin account. Python.exe is in my path as "c:\Python27". Ok I will try python way. Thank you. 2012/6/19 Dennis Lee Bieber > On Tue, 19 Jun 2012 08:41:55 +0300, Seyfullah Tıkıç > declaimed the following in

Django SYNCDB or SQL error, in core models.

2012-06-19 Thread upmauro
Hi all ! When i begin my application i used inspectdb to generate models, after this when i try use SYNCDB or SQL Django raise this exception: python2.7 manage.py syncdb Error: One or more models did not validate: core.djangocontenttype: "app_label": CharField cannot have a "max_length"

Re: 'str' object has no attribute 'resolve'

2012-06-19 Thread Xavier Ordoquy
Hi, If you just return the original urls.py, there's no way we can know what you did and this will prevents us from helping you. As mentioned by Babatunde, you should give the traceback and the modified urls (use dpaste.com for that). Regards, Xavier Ordoquy, Linovia. Le 19 juin 2012 à 18:34,

Re: I need a programmer Python Django

2012-06-19 Thread RandyatBixly
Yes, please list the requirements. We specialize in Python/Django development (www.bixly.com) and may be able to help. If you list details we can go from there. Best, Randy George Bixly.com On Thursday, June 14, 2012 4:28:04 PM UTC-7, javierlima13 wrote: > > I need a quote for a app Im

Ranking Queryset

2012-06-19 Thread Peter Ung
Hi All, I'm trying to do ranking of a QuerySet efficiently (keeping it a QuerySet so I can keep the filter and order_by functions), but cannot seem to find any other way then to iterate through the QuerySet and tack on a rank. I dont want to add rank to my model. I know how I can get the

Adding a field in the User - Group relation in Auth

2012-06-19 Thread Yann 'Meow' Bordenave
Hello here, I'm new with Django, I'm practicing what I learnt on an app for teams management. I wanted to know if it is possible to add a field in the ManyToMany relation between users and groups in auth, to add a foreign key on a function model. The goal is to specify the function of an user in

Re: 'str' object has no attribute 'resolve'

2012-06-19 Thread Babatunde Akinyanmi
Hi. Give the full traceback please. It'll be easier to assist with the information On 6/19/12, Sabbineni Navneet wrote: > it still shows the same error > > On Tuesday, June 19, 2012 9:23:50 PM UTC+5:30, Sabbineni Navneet wrote: >> >> This is my url.py file: >> from

Re: 'str' object has no attribute 'resolve'

2012-06-19 Thread Sabbineni Navneet
it still shows the same error On Tuesday, June 19, 2012 9:23:50 PM UTC+5:30, Sabbineni Navneet wrote: > > This is my url.py file: > from django.conf.urls.defaults import * > > # Uncomment the next two lines to enable the admin: > #from django.contrib import admin > #admin.autodiscover() > > > >

Re: 'str' object has no attribute 'resolve'

2012-06-19 Thread Sabbineni Navneet
still it shows the same error On Tuesday, June 19, 2012 9:23:50 PM UTC+5:30, Sabbineni Navneet wrote: > > This is my url.py file: > from django.conf.urls.defaults import * > > # Uncomment the next two lines to enable the admin: > #from django.contrib import admin > #admin.autodiscover() > > > >

Re: 'str' object has no attribute 'resolve'

2012-06-19 Thread Xavier Ordoquy
Hi, 1) uncomment the two lines to enable admin as it is said: from django.contrib import admin admin.autodiscover() 2) use: url(r'^admin/', include(admin.site.urls)), Regards, Xavier Ordoquy, Linovia. Le 19 juin 2012 à 17:53, Sabbineni Navneet a écrit : > This is my url.py file: >

'str' object has no attribute 'resolve'

2012-06-19 Thread Sabbineni Navneet
This is my url.py file: from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: #from django.contrib import admin #admin.autodiscover() urlpatterns = patterns('', (r'^admin/$', include('django.contrib.admin.urls')), ) # Examples: # url(r'^$',

Re: Custom model field as foreign key

2012-06-19 Thread Kurtis Mullins
hmm, maybe you need a custom Select Widget for your custom field? Or check out the select widget and see if it's looking for any _meta information on the field that determines how the widget is displayed. On Tue, Jun 19, 2012 at 8:49 AM, Melvyn Sopacua wrote: > On

Re: Writing or editing files using Django

2012-06-19 Thread Kurtis Mullins
I agree. It's very easy to use the templates to do just that. Once you have them processed and saved as a variable (which would be a string) then you can do anything with them that Python is capable of. For example, you could use them to generate emails, save text files, etc... As far as calling

Re: Writing or editing files using Django

2012-06-19 Thread Melvyn Sopacua
On 19-6-2012 14:37, Blaxton wrote: > My understanding from template system was: > Django template system is to create html files on fly while returning > the resulting html to user's browser! Nope, that's just the default use. The template system can be used for anything to return "text" based on

Re: Custom model field as foreign key

2012-06-19 Thread Melvyn Sopacua
On 19-6-2012 14:45, Juan Pablo Martínez wrote: > You saw this? > > https://docs.djangoproject.com/en/dev/howto/custom-model-fields/#django.db.models.Field.to_python Yes, that's not the issue. I've implemented to_python and get_prep_* and everything goes ok, until the field gets used as

Localization of text in a variable

2012-06-19 Thread Salvatore Iovene
Hi, I'm having the following code: Models: untranslated = "Foo" translated = ugettext(untranslated) # Hopefully "makemessages" will read this insert_in_database(untranslated) Later in a View: text = get_from_database(); And I pass it to a template where I do: {% trans text %} This is not

Re: Custom model field as foreign key

2012-06-19 Thread Juan Pablo Martínez
You saw this? https://docs.djangoproject.com/en/dev/howto/custom-model-fields/#django.db.models.Field.to_python On Tue, Jun 19, 2012 at 9:38 AM, Melvyn Sopacua wrote: > Hi, > > When using a custom field as primary key, and subsequently as a > ForeignKey the database

Custom model field as foreign key

2012-06-19 Thread Melvyn Sopacua
Hi, When using a custom field as primary key, and subsequently as a ForeignKey the database representation gets stored as the related value on the object. This is a problem when it has to match the selected value in a form and the documentation doesn't provide any clues where I should be

Re: Writing or editing files using Django

2012-06-19 Thread Blaxton
My understanding from template system was: Django template system is to create html files on fly while returning the resulting html to user's browser and the resulting static files would not be saved any where in file system. How can I save the created files by template system on file system

Re: Trying to find something in multiple databases... Confused...

2012-06-19 Thread Melvyn Sopacua
On 19-6-2012 9:46, Laurence MacNeill wrote: > On Monday, June 18, 2012, Melvyn Sopacua wrote: > >> On 18-6-2012 9:52, Laurence MacNeill wrote: >>> well -- I hit the wrong key and posted that before I was finished >> typing... >>> >>> here's what's in my views.py file: >>> def index(request) >>>

Re: Writing or editing files using Django

2012-06-19 Thread kenneth gonsalves
On Tue, 2012-06-19 at 00:40 -0700, Blaxton wrote: > I am a newbie in Django and in need of some hints to > point in the right direction. > > I am building a new > application which users would enter some names and then > after > clicking on submit, some non .html files should be created or >

Re: Migrating to Django 1.4

2012-06-19 Thread Vignesh
hi galgal, I got it solved, it was some random problem with the perticular terminal instance, In a new terminal instance every thing was working But thanks a lot On Tuesday, June 19, 2012 2:34:19 PM UTC+5:30, galgal wrote: > > Have changed your old manage.py to new one? > Django 1.4

Writing or editing files using Django

2012-06-19 Thread Blaxton
I am a newbie in Django and in need of some hints to point in the right direction.  I am building a new application which users would enter some names and then after clicking on submit, some non .html files should be created or modified while entered data should be inserted in some parts of

Re: How to trigger perl scrip in Django

2012-06-19 Thread Pervez Mulla
OKi.no Am just trying out something different . On Tue, Jun 19, 2012 at 12:54 PM, kenneth gonsalves wrote: > On Mon, 2012-06-18 at 22:57 -0700, Pervez Mulla wrote: > > I am Newbie.recently started with django,how to trigger simple Perl > > script > > in django

Re: Custom Tags and Includes, invalid block !

2012-06-19 Thread bruno desthuilliers
On Tuesday, June 19, 2012 12:37:29 AM UTC+2, upmauro wrote: > > Hello, sorry my english ! > > I have one question, i create one custom tag and this works fine. > > But i have a situation : > > *site.html* > * > * > {% include "header.html" %} > > Django looks the best framework for web ! > > {%

Re: Migrating to Django 1.4

2012-06-19 Thread galgal
Have changed your old manage.py to new one? Django 1.4 generates new manage.py. Maybe that's the problem? On Tuesday, June 19, 2012 9:15:01 AM UTC+2, Vignesh wrote: > > Hi, > > I started migrating our django 1.2.3 project to django 1.4, > > Now the manage.py is not showing any management commands

Re: Trying to find something in multiple databases... Confused...

2012-06-19 Thread Laurence MacNeill
Right -- different tables in the same database, of course... Thanks. L. On Monday, June 18, 2012, Daniel Roseman wrote: > On Monday, 18 June 2012 08:40:53 UTC+1, Laurence MacNeill wrote: >> >> Ok, I'm a total django noob here, so I am probably doing this wrong... >> But here goes... >> >>

Re: Trying to find something in multiple databases... Confused...

2012-06-19 Thread Laurence MacNeill
On Monday, June 18, 2012, Melvyn Sopacua wrote: > On 18-6-2012 9:52, Laurence MacNeill wrote: > > well -- I hit the wrong key and posted that before I was finished > typing... > > > > here's what's in my views.py file: > > def index(request) > > current_username = os.environ['REMOTE_USER'] >

Re: How to trigger perl scrip in Django

2012-06-19 Thread Sergiy Khohlov
yesterday was a similar question: >>> from subprocess import call >>> call("uname") Linux 0 >>> call("uname", "-a") 2012/6/19 Pervez Mulla : > > > I am Newbie.recently started with django,how to trigger simple Perl script > in django project, > > EX: > small script in

Re: How to trigger perl scrip in Django

2012-06-19 Thread kenneth gonsalves
On Mon, 2012-06-18 at 22:57 -0700, Pervez Mulla wrote: > I am Newbie.recently started with django,how to trigger simple Perl > script > in django project, this has nothing to do with django - use python. Search for subprocess.call() (is some professor somewhere giving his students an

Migrating to Django 1.4

2012-06-19 Thread Vignesh
Hi, I started migrating our django 1.2.3 project to django 1.4, Now the manage.py is not showing any management commands added by outside apps like, haystack, south etc. Am I missing something obvious? -Thanks Vignesh -- You received this message because you are subscribed to the Google

Writing or editing files using Django

2012-06-19 Thread Blaxton
I am a newbie in Django and in need of some hints to point in the right direction. I am building a new application which users would enter some names and then after clicking on submit, some non .html files should be created or modified while entered data should be inserted in some parts of the

How to trigger perl scrip in Django

2012-06-19 Thread Pervez Mulla
I am Newbie.recently started with django,how to trigger simple Perl script in django project, EX: small script in perl or bash to do a hello world to a file echo "hello world" > /home/hello.txt should be able to trigger the hello world script and see if the /home/hello.txt file has been