Error creating project from the Command Prompt

2012-06-07 Thread andres orozco
I've installed django 1.4 and i want to test the installation, i don't know too much about this cuz' i'm just learning, but i tried it using the windows 7 command prompt but i've got this error http://i.imgur.com/znZGW.png could someone help me please? -- You received this message because you ar

Re: Error creating project from the Command Prompt

2012-06-07 Thread Jani Tiainen
7.6.2012 10:29, andres orozco kirjoitti: I've installed django 1.4 and i want to test the installation, i don't know too much about this cuz' i'm just learning, but i tried it using the windows 7 command prompt but i've got this error http://i.imgur.com/znZGW.png could someone help me please?

Getting at Oracle ROWID

2012-06-07 Thread rahajiyev
There's an existing Oracle database I want to hook Django up with. The problem is, the table I need lacks single-key primary keys. Oracle does provide its unique table-wide ROWID which can normally be used as a PK with a few restrictions. But it's a LOB, so a cast to string is normally required to

Re: Accessing Backend DB for UI

2012-06-07 Thread Tanveer Ali Sha
YeahI got it, Thank you brother . Thank You On Thu, Jun 7, 2012 at 10:44 AM, Dennis Lee Bieber wrote: > On Thu, 7 Jun 2012 09:45:53 +0530, Tanveer Ali Sha > declaimed the following in > gmane.comp.python.django.user: > > > sorry ,I have a Perl back-end running as an API,i want to contro

Re: Understanding Django for PHP developer

2012-06-07 Thread mikegolf
Bruno, exactly what I've been looking for! Thanks! On Jun 4, 11:28 am, bruno desthuilliers wrote: > On Jun 3, 12:18 pm, mikegolf wrote: > > > Hi, > > I've started to learn Django recently, however for last 5+ years I've > > been developing using PHP (especially Yii) and thus asking if there's >

limit number of related instance for m2m field in django-admin

2012-06-07 Thread vijay shanker
hi is there any way to limit the number of instances that can be attached to a m2m field. e.g author = models.manytomany(Book) i want to limit the max number of book objects that can be attached to author. How to go about this. -- You received this message because you are subscribed to the Googl

Re: running a task in fabfile from django

2012-06-07 Thread Rafael Durán Castañeda
On 06/06/2012 01:28 PM, umit sethi wrote: Hi, I have a fabric task eg- def run_task(): #code here From the command prompt I run this task: fab -c env.fabricrc run_task - H hostnamr How can I run this task from django?I click on a button on a webpage in django app and it should do this. How c

Re: Python FAQ: Webdev

2012-06-07 Thread Peter of the Norse
On May 12, 2012, at 11:49 PM, Nick Apostolakis wrote: > On 13/05/2012 07:32 πμ, Peter Murphy wrote: >> All, >> >> The site recommends "Flask" by the way - not Django. The author thinks >> it is too heavyweight for his or her uses. But there seems to be a lot >> of ideas in the article about how

Re: limit number of related instance for m2m field in django-admin

2012-06-07 Thread Kurtis Mullins
You could customize the Admin Book Creation Form's save() method to check for X number of books an author already has. Note: I have very limited experience customizing the Admin application and have only used this method through a normal Form. On Thu, Jun 7, 2012 at 7:56 AM, vijay shanker wrote:

Redirect form after post, and download pdf

2012-06-07 Thread Rob
This is probably very easy, but i cannot get this working (Django 1.2). I want to generate a pdf based on the values of a form, and redirect the form to a thanks page. Generating the pdf is no problem, but first generate the pdf to download, and after that redirect the form the the thanks page do

Re: Python FAQ: Webdev

2012-06-07 Thread Nick Apostolakis
On 07/06/2012 04:25 μμ, Peter of the Norse wrote: There's a large group of programmers, especially in Python, that loves "Do one thing, and do it well". If you don't need database support, then half of Django goes unused. If you do need to save data, then you'll love ModelForms. I like that Dj

Re: Getting at Oracle ROWID

2012-06-07 Thread Ian
On Thursday, June 7, 2012 3:55:37 AM UTC-6, rahajiyev wrote: > > There's an existing Oracle database I want to hook Django up with. The > problem is, the table I need lacks single-key primary keys. Oracle > does provide its unique table-wide ROWID which can normally be used as > a PK with a few

Re: Django session and Dojo dnd.

2012-06-07 Thread voss
Hello Hendrik, To simplify things and to do some tests, I started with disabling the csrf protection. Here is my JS: dojo.xhrPost( { url: "/test/", content: {details: JSON.stringify(details)}, load: func

Re: Django session and Dojo dnd.

2012-06-07 Thread Hendrik Speidel
Hi Voss, i guess you are right ... it may not be related to CSRF-Protection at all. Are you using the django development server? I have found some references for '\x16\x03\x01' using google, e.g. http://wishmesh.com/2010/05/apache-logs-contains-x16x03x01-when-accessing-site-via-https/ It seems

Re: Django session and Dojo dnd.

2012-06-07 Thread voss
Hi Hendrik, Thank you for your prompt reply. I really appreciate it! Yes, I am using the django development server, and it is on port 8000. I, too, read that the https can cause the '\x16\x03\x01' problem, but I don't see how this can happen in my case because I did not create any https'. Al

Re: Django session and Dojo dnd.

2012-06-07 Thread Hendrik Speidel
Hi Voss, you were missing a comma after "details: JSON.stringify(details)" However, i don't think that was the cause of the problem. When using csrf_exempt you do not need to include the csrf token. I have now created a test project and it's working here. The project is called 'testp' and the

Update database with model changes

2012-06-07 Thread Robert Steckroth
Hey Gang, is there a way to update the database with a syncdb or other command after a model has been changed? I added a field the the model after the syncdb. -- Bust0ut, Surgemcgee: Systems Engineer --- PBDefence.com BudTVNetwork.com RadioWeedShow.com "Bringing entertainment to Unix" -- You r

Re: Update database with model changes

2012-06-07 Thread Kevin Anthony
Use south Kevin Please excuse brevity, sent from phone On Jun 7, 2012 2:05 PM, "Robert Steckroth" wrote: > Hey Gang, is there a way to update the database with a syncdb or > other command after a model has been changed? I added a field > the the model after the syncdb. > > > -- > Bust0ut, Surgem

Re: Update database with model changes

2012-06-07 Thread Nikhil Verma
If you mean you added a field after creating a model class table you need to generate the sql statement for the new field only( for hint , django will generate automatically if you do python manage.py sql appname and see the sql) in a file and execute that file . Let say you have xyz.sql just run

Load photos in front-end, which way i should to choose?

2012-06-07 Thread Dominis
Greetings. I beginner in Django, and now i need to load photos from local_storage to front-end. But i dont understand which way is better for this. I need to it work like this: On my site i have category called Lamps, with few articles, on_table_lamp, night_lamp and other... Each article (on the

Two asks about customization admin-interface

2012-06-07 Thread Dominis
Greetings, i read about admin customization, but dont find answers... or dont understand it. I have 2 questions. 1. I need to just add one css class for specialy field. It can be solve via Formsets, but i dont understand how do it for one field, i dont wanna to touch other fields in formset. I

Re: Django session and Dojo dnd.

2012-06-07 Thread voss
Hello Hendrik, Your code works on my machine, too!! I don't know what is wrong with my code. I will definitely compare it carefully to yours. Hopefully, I will find the cause soon. By the way, I do have firebug running all the time, but it does not show any errors. Once again, thank you so mu

Admin links not working after switching to Django 1.4

2012-06-07 Thread mete
Hello folks, i have a django application that was created using 1.3.1, when i change the runtime to use django 1.4 via virtualenv, on the admin page: there is only the main screen , and no links to crud operations. Anyone faced a similar issue? Thanks in advance Mete -- You received this messa

question about migrating php project

2012-06-07 Thread kjs
Hello, I am about to launch a Codeigniter project, but have future thoughts about trying out Django sometime down the line. My data is in MySQL and I have the urls as: www.site.com/product/id/slug-name The id is they primary id of the product. If I do switch over to Django, will it be simple

Re: Django session and Dojo dnd.

2012-06-07 Thread voss
Hi Hendrik, THANK YOU, THANK YOU, and THANK YOU!! I found it!! I made a mistake when defining the url, and that's why I kept getting the "code 400" error. Your test code is extremely beneficial! I can't thank you enough for all your help! voss On Thursday, June 7, 2012 1:04:27 PM UTC-5, h

Develop a Facebook app with Django

2012-06-07 Thread francescobocca...@libero.it
Hi all, i read some documentation on the web about Django and Facebook but i didn't found a right way to develop my Facebook application with Djando. Can you suggest how can start it? Thanks Francesco -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: question about migrating php project

2012-06-07 Thread CLIFFORD ILKAY
On 06/07/2012 01:26 PM, kjs wrote: Hello, I am about to launch a Codeigniter project, but have future thoughts about trying out Django sometime down the line. My data is in MySQL and I have the urls as: www.site.com/product/id/slug-name The id is they primary id of the product. If I do switc

Re: Develop a Facebook app with Django

2012-06-07 Thread Timothy Makobu
Hi. Checkout this thread https://groups.google.com/forum/?fromgroups#!topic/django-users/fyGDJmTvpz4 On Thu, Jun 7, 2012 at 10:15 PM, francescobocca...@libero.it < francescobocca...@libero.it> wrote: > Hi all, > i read some documentation on the web about Django and Facebook but i didn't > found a

Question

2012-06-07 Thread Peregil
I am trying to learn how to work with Django, and I am trying to make a user registration with a login/password user. However, all the tutorials are confusing and with so many bugs to run something. I would appreciate if someone knows a great website, book, or have an example how to create this pag

Re: Question

2012-06-07 Thread Nikolas Stevenson-Molnar
The official tutorial is probably the best "getting started" literature for Django that I've come across. What sorts confusion/bugs are you encountering? And just to make sure: this is the tutorial you're referring to? https://docs.djangoproject.com/en/1.4/intro/tutorial01/ _Nik On 6/7/2012 12:3

Re: Question

2012-06-07 Thread Gerald Klein
I agree with Nik, the tutorial works but you have to make sure to pay close attention and follow every step. I made the mistake the first time though because I am a veteran of assuming too much and ended up missing nuances that were pivotal to get things to work and beat my head against the wall ti

Django mod_wsgi + No data received in browser

2012-06-07 Thread Jose
I have the following code in wsgi.py and when I try viewing my site in a browser I get a no data received message (Unable to load the webpage because the server sent no data.) I feel like I'm missing the part where this wsgi.py file loads the actual contents of my site... import os import sys imp

How override RequestContext in generic views?

2012-06-07 Thread Mikhail Golubev
Hello, I'm a kind of newbie with Django and recently I faced the following problem. I wrote custom context processor, that adds in RequestContext 'base_template' variable. It works fine but in some views I'd like to override somehow this variable. I can do this with default shortcuts function lik

Re: Update database with model changes

2012-06-07 Thread Psamathos
South will handle schema migrations for you: http://south.aeracode.org/ This tutorial is a good place to start and covers the basic set-up: http://south.aeracode.org/docs/tutorial/part1.html Basically, you want to revert your changes so your model matches your database, install south and config

Re: Update database with model changes

2012-06-07 Thread Robert Steckroth
Well, that would be a lesson for me. Looks like I will have to incorporate south into my endeavours. Much thanks to the Django community. On Thu, Jun 7, 2012 at 8:55 PM, Psamathos wrote: > South will handle schema migrations for you: http://south.aeracode.org/ > > This tutorial is a good place

[no subject]

2012-06-07 Thread Satvir Toor
here is my problem As i request for a url specified in urlpatterns variable in urls.py file of the djangoproject It gives TypeError Exception Value: 'str' object is not callable suggest me -- You received this message because you are subscribed to the Google Groups "Django users" group. To pos

how to have a foreign key to a field of same model which in turn is foreign key to another model ..

2012-06-07 Thread vijay shanker
hi how can i have this: client_groups = models.ForeignKey(User, to_field="groups") it din worked -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group,

mssql

2012-06-07 Thread Min Hong Tan
hi all, i'm going to use django-mssql. is there any one has use this b4? and any working example? am i need to define a model in models.py?? how if i run syndb. will it sync to my default. mysql database? Regards, MH -- You received this message because you are subscribed to the Google Groups

Re: Getting at Oracle ROWID

2012-06-07 Thread rahajiyev
> MyModel.objects.extra(select={'rowid': "rowid || ''"}) > Thanks. I don't think extra() takes primary_key=True, does it? I wouldn't want Django to auto-add column id otherwise. Assuming I have: MyModel.objects.extra(select={'id': "rowid || ''"}) OK, that's fine for fetching the ID itself, suitab

Re: Admin links not working after switching to Django 1.4

2012-06-07 Thread mete
Hello folks, i found out that we had a buggy url config that messed up admin urls, did not realized this in 1.3.1 though Cheers Hello folks, > > i have a django application that was created using 1.3.1, when i > change the runtime to use django 1.4 via virtualenv, on the admin > page: there