Re: Tutorial database problem

2012-05-27 Thread ajohnston
What happens if you do: $ python manage.py shell ## at the bash prompt >> import django.db.backends.sqlite3 ## in the python shell If you get an error, you might try reinstalling django. But I'm not sure what the problem is/was. Your DATABASES code looks fine. -- You

Re: setting up new django project

2012-05-27 Thread azizmb.in
HI You should have a look at virtualenv and virtualenvwrapper . On Mon, May 28, 2012 at 8:23 AM, xaegis wrote: > Hello, this is my first time posting to a list! > I am

Re: Is Django Right for Me?

2012-05-27 Thread ivan sugiarto
furthermore if you want to integrate Django, Tablet and PC you should make Django webservice (either using Json or XML), after that you must create Tablet and PC application that fetch django webservice. So the rough architecture would be : Web Apps (ie Django, PHP or Java) --->create Web

setting up new django project

2012-05-27 Thread xaegis
Hello, this is my first time posting to a list! I am running python 2.7 with django 1.4 installed on Ubuntu 12.04 I am having trouble creating new projects with django. Whenever I use the command: Code: sudo /usr/local/lib/python2.7/dist-packages/django/bin/django-admin.py startproject cms I

Re: Tutorial database problem

2012-05-27 Thread phantom21
See above. Initially I had tried /home/mark/database/mark.db, but got the same error, so I tried it in the directory sqlite3 executable resides. Got THE SAME ERROR! The error has nothing to do with where the database resides it seems. The error seems to indicate some issue with the ENGINES

Re: Getting the Database Version

2012-05-27 Thread Vanessa Gomes
Hey, actually I'm fixing the ticket. :) I know about connection.vendor, actually on the solution for sqlite3 I used it. Thank you. 2012/5/27 Russell Keith-Magee > On Mon, May 28, 2012 at 5:09 AM, Vanessa Gomes > wrote: > > Hello, guys. > > > >

django-registration simple backend help

2012-05-27 Thread psychok7
hi there i am writing an app using django-registration 0.8 installed from pip and using the simple-backend my problem is, when i register a new user it logs me in after inserting in the db and redirects me to /users// but if i login normally using the django.contrib.auth it redirects me to

Re: Getting the Database Version

2012-05-27 Thread Russell Keith-Magee
On Mon, May 28, 2012 at 5:09 AM, Vanessa Gomes wrote: > Hello, guys. > > Does anyone know where I can find the name / version of the database? For > example, if I'm using PostegreSQL, want it returned something like "8.4.11 > PostgreSQL, psycopg2 2.4.4." Hi Vanessa,

Re: output string for template render object

2012-05-27 Thread Min Hong Tan
hi Chew, Thanks. I have found out the html code that i render is invalid. :P too tire for late night programming Regards, MH On Sun, May 27, 2012 at 11:17 AM, Chew Kok Hoor wrote: > Hi Min Hong, > > I think you need to provide a simple example, of values in the

Re: Is Django Right for Me?

2012-05-27 Thread Russell Keith-Magee
On Mon, May 28, 2012 at 12:28 AM, KevinE wrote: > Not a web developer but have a bit of software savy and looking to develop a > custom app for use in my business which is consulting engineering. I want to > develop application that helps me in documenting

Django ForeignKey which does not require referential integrity?

2012-05-27 Thread diabeteman
Hello everyone, I recently posted a question on stackoverflow.com but didn't get any answers. I've found similar questions but without any satisfying solutions. Here is my question http://stackoverflow.com/questions/10623854/django-soft-foreignfield-without-database-integrity-checks Here is a

Getting the Database Version

2012-05-27 Thread Vanessa Gomes
Hello, guys. Does anyone know where I can find the name / version of the database? For example, if I'm using PostegreSQL, want it returned something like "8.4.11 PostgreSQL, psycopg2 2.4.4." -- Vanessa Gomes de Lima Graduanda em Ciência da Computação - 2009.1 - Centro de Informática - UFPE --

Django Admin events

2012-05-27 Thread Mariano DAngelo
Anybody nows if django support capturing events on model admin widgets. I have a field, and when the users change it I want to make a query with that value and load to another field, but I do wanna wait to save method... Is there any way besides writing my own widgets? thanks Example

Admin site - search by related ManyToMany

2012-05-27 Thread Lee
I'm looking for advice on the best way to approach a conceptually simple custom search feature for a basic Admin site. I've spent days reading about custom views, advanced search, dynamic tables, EAV, etc., enough to realize that there a lot of possible solutions, some probably much easier and

Re: Off-line Django apps / Caching and synchronizing data

2012-05-27 Thread ALJ
Thanks for the link Marcin. To anyone else interested in looking into this, it looks like the first stop is to read Mark Pilgrim's chapter "Let's Take This Offline " in "Dive Into HTML5". -- You received this message because you are subscribed to

Re: output string for template render object

2012-05-27 Thread Chew Kok Hoor
Hi Min Hong, I think you need to provide a simple example, of values in the context (programs, generate_html,generate_script), your template and the result as well as the expected result so that it is easier for forum members to help you. Thanks. Regards, Kok Hoor On Sun, May 27, 2012

Re: Error with Views on Admin and Index page

2012-05-27 Thread aron.s...@gmail.com
- Reply message - From: "Peter of the Norse" Date: Sun, May 27, 2012 9:53 am Subject: Error with Views on Admin and Index page To: Can we see your urls.py? I'm worried that you’re directing to a views.py file that doesn't

Re: Error with Views on Admin and Index page

2012-05-27 Thread aron.s...@gmail.com
W.11 - Reply message - From: "Peter of the Norse" Date: Sun, May 27, 2012 9:53 am Subject: Error with Views on Admin and Index page To: Can we see your urls.py? I'm worried that you’re directing to a views.py file that doesn't

anybody used Jython 2.5+ and Django

2012-05-27 Thread Gelonida N
Did anybody play with this? What versions of django are supported? What DB engines are supported? Any performance comparison between Cpython and Jython? Thanks in advance for pointers / comments Any hints on how to create such a setup on Ubuntu 12.04? -- You received this message

Re: Off-line Django apps / Caching and synchronizing data

2012-05-27 Thread Marcin Tustin
You might also like this: http://stackoverflow.com/questions/2786303/offline-mode-app-in-a-html5-browser-possible On Sun, May 27, 2012 at 5:39 PM, Marcin Tustin wrote: > As per the above it's not really a django issue. The main django > participation would be to provide

Re: Off-line Django apps / Caching and synchronizing data

2012-05-27 Thread Marcin Tustin
As per the above it's not really a django issue. The main django participation would be to provide an AJAX api which the client web page can sync with when it gets back online, which you would need to do for any AJAX application. If you do get your project working, do write up a tutorial. I'd be

Re: Off-line Django apps / Caching and synchronizing data

2012-05-27 Thread KevinE
> > Just posted a similar question - sounds like we need a "DjangoOffline" > component. Does such a beast exist? > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Is Django Right for Me?

2012-05-27 Thread KevinE
Not a web developer but have a bit of software savy and looking to develop a custom app for use in my business which is consulting engineering. I want to develop application that helps me in documenting inspections I make on a jobsite. Basicly what happens is I would go out with a tablet and

Re: Is there are some id obfuscate libs in django?

2012-05-27 Thread Brian Schott
Keep in mind that obfuscation isn't security, so the answer really depend on your goal. Are you concerned about auto-incrementing integer IDs being sequential in REST urls? If so, use named slugs or UUIDs from django-extensions. UUIDs aren't obfuscated from a security perspective (they can

Re: Is there are some id obfuscate libs in django?

2012-05-27 Thread Marcin Tustin
Why would you want this? Arbitrary integers are already completely opaque. On Sun, May 27, 2012 at 4:12 PM, forrest yang wrote: > Just try to convert the increasing numeric id in the database to some > other obfuscated id. > The lib need to support long type integer

Is there are some id obfuscate libs in django?

2012-05-27 Thread forrest yang
Just try to convert the increasing numeric id in the database to some other obfuscated id. The lib need to support long type integer range conversion and convert in two directions. Is there are some id obfuscate libs in django or widely used in django community? Any one knows that? Thanks

Re: Httprequest with xml body - how to parse with elementtree?

2012-05-27 Thread francescortiz
This link could help: http://lmgtfy.com/?q=python+parse+xml On Saturday, May 26, 2012 4:24:29 PM UTC+2, Benjamin Carlson wrote: > > I'm new to django, and am trying to write a web service. > > The request will have xml in the body. How can I parse that into > elementtree root node? > > Thanks

Re: Tutorial database problem

2012-05-27 Thread phantom21
No. Why I'm asking. I don't see a problem with the DATABASES section of the file, but another pair of eyes might. The error implies a problem with the ENGINES line, but, again, I don't see it. Mark On May 27, 6:56 am, Fadi Samara wrote: > so have you found any

Re: Error with Views on Admin and Index page

2012-05-27 Thread Peter of the Norse
Can we see your urls.py? I'm worried that you’re directing to a views.py file that doesn't actually exist. On May 24, 2012, at 2:38 PM, cat123 wrote: > No I'm not doing the Django tutorial. I'm following a couple of older > Django books that were published circa 2009 using Django 1.1. ('m >

Re: DatabaseError at /admin/ attempt to write a readonly database

2012-05-27 Thread Antoni Aloy
Don't use sqlite, use a postressql or mysql database. If you just need sqlite: Create an special user for your application, and addit to the www-data group, and mark sqlite databse as read/write for that user. Hope it help! 2012/5/27 Fadi Samara : > Hi, > > I have

Re: Database Query in Shell

2012-05-27 Thread Sandeep kaur
On Sun, May 27, 2012 at 6:05 PM, wrote: > To get a queryset containing all the objects where field == other_field > should be something like the following: > > from django.db.models import F > > Amounts.objects.filter(field = F("other_field")) > > to then

Re: Database Query in Shell

2012-05-27 Thread mgc_django-users
On 27/05/2012 9:28 PM, Sandeep kaur wrote: I have a table Amounts which has 2 columns field and other_field. These columns are filled in such a way that either other_field is null or other_field = field. I want to make a database query such that if field == other_field : field = "OTHER"

Re: Tutorial database problem

2012-05-27 Thread Fadi Samara
so have you found any solution? On Sun, May 27, 2012 at 8:55 PM, phantom21 wrote: > initially I'd created given the path as /home/mark/database/mark.db > but that gave me the same error so I wanted to try creating it in the > same place as sqlite3 existed, with the same

Re: Tutorial database problem

2012-05-27 Thread Fadi Samara
Hi, I'm not creating it outside the project path, I create /u01/my-project and gave it 755 permission, and have use default path for the database file to be in the same directory of the manage.py file. I'm using a normal user (not root), but I think the Apache user does not have access to

DatabaseError at /admin/ attempt to write a readonly database

2012-05-27 Thread Fadi Samara
Hi, I have django running against apache with wsgi, using sqlite3 as my database. When I run the admin page, I will end up with "attempt to write a readonly database", the only solution worked for me to chmod 777 to the django project directory.According to Django website they don't recommend

Database Query in Shell

2012-05-27 Thread Sandeep kaur
I have a table Amounts which has 2 columns field and other_field. These columns are filled in such a way that either other_field is null or other_field = field. I want to make a database query such that if field == other_field : field = "OTHER" else: field = field That means the entries in

Re: global name 'content' is not defined

2012-05-27 Thread Tanveer Ali Sha
thank you nikhil and nevio...:) On Sun, May 27, 2012 at 2:48 PM, Nevio Vesic wrote: > You're missing a `content` at def view_page. I've marked possible solution > *(as red)* that could fix it. > > def view_page(request, page_name): >try: >page

Re: Tutorial database problem

2012-05-27 Thread phantom21
initially I'd created given the path as /home/mark/database/mark.db but that gave me the same error so I wanted to try creating it in the same place as sqlite3 existed, with the same results. Mark On May 27, 6:29 am, Jirka Vejrazka wrote: > Hi, > >   you're creating

Re: Tutorial database problem

2012-05-27 Thread Jirka Vejrazka
Hi, you're creating your database file in /usr/bin which is intended for system executable files, not databases etc. It's highly likely that you don't even have write permissions there (unless you work using the "root" account which is a big NO-NO). Set your database file somewhere where you

Re: global name 'content' is not defined

2012-05-27 Thread Nevio Vesic
You're missing a `content` at def view_page. I've marked possible solution *(as red)* that could fix it. def view_page(request, page_name): try: page = Page.objects.get(pk=page_name) *content = page.content* except Page.DoesNotExist:

Re: global name 'content' is not defined

2012-05-27 Thread Nikhil Verma
Hi >From the traceback the error is in :- def view_page(request, page_name): try: page = Page.objects.get(pk=page_name) except Page.DoesNotExist: return render_to_response("create. > > html",{"page_name":page_name}) >return

global name 'content' is not defined

2012-05-27 Thread Ali Shaikh
'model.py` from django.db import models class Page(models.Model): name = models.CharField(max_length=20, primary_key=True) content = models.TextField(blank=True) # Create your models here. `view.py` from wiki.models import Page from django.shortcuts import

output string for template render object

2012-05-27 Thread Min Hong Tan
hi all, i have one question return render_to_response(mainPageTemplate, {'programs':find_program , 'generate_html':generate_html, 'generate_script':generate_script },

Re: how to do this?

2012-05-27 Thread doniyor
okay i solved it by rendering a list of names Am Sonntag, 27. Mai 2012 08:07:26 UTC+2 schrieb doniyor: > > yeah, you are right.. now i have another html-related problem. well, now i > have even all html fields created thru for-loop. but now all of them have > the same attr value:

Re: how to do this?

2012-05-27 Thread doniyor
yeah, you are right.. now i have another html-related problem. well, now i have even all html fields created thru for-loop. but now all of them have the same attr value: name="prod". and now i want to refer to all of them and send all as email to the buyer. how can i make reference to all field