Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-08 Thread Jani Tiainen
Tested against latest master. Same behaviour. In Oracle backend base.py is following piece of code: # Check whether cx_Oracle was compiled with the WITH_UNICODE option. This will # also be True in Python 3.0. if int(Database.version.split('.', 1)[0]) >= 5 and not hasattr(Database, 'UNICODE'):

Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-08 Thread Jani Tiainen
8.1.2013 21:00, akaariai kirjoitti: I created the following test case into django's test suite modeltests/ basic/tests.py: def test_unicode(self): # Note: from __future__ import unicode_literals is in effect... a = Article.objects.create(headline='0 \u0442\u0435\u0441\u0442

Admin and ForeignKey

2013-01-08 Thread Kristofer
Hello, I have three models, defined like the following (code below simplified): class Shirt(Model): sku = CharField() description = CharField() class Color(Model) name = CharField() shirt = ForeignKey(Shirt) price = Decimal() class Order(Model) shirt = ForeignKey(Shirt) color = Forei

Re: Can't sync DB

2013-01-08 Thread Nick Sandford
Since you have already created the table using syncdb, you need to instruct South to fake the initial migration. Try the command ./manage.py migrate auth --fake and see if that works. You only need to run this once and then all future migrations don't need the --fake flag. Cheers, Nick On Tue, J

Re: CSRF Verification error appeared after I changed DNS

2013-01-08 Thread Amirouche
On Wednesday, January 9, 2013 3:21:08 AM UTC+1, Saqib Ali wrote: > > Yes, I checked my cookies and there is a csrftoken: > jrQ4T0IZPqFpbjoPLlzJSnsEPQxzHAJh > I didn't change the SESSION_COOKIE_DOMAIN value. There is no such setting > in my settings.py. > > I don't know then : / Maybe restart g

Re: CSRF Verification error appeared after I changed DNS

2013-01-08 Thread Saqib Ali
Yes, I checked my cookies and there is a csrftoken: jrQ4T0IZPqFpbjoPLlzJSnsEPQxzHAJh I didn't change the SESSION_COOKIE_DOMAIN value. There is no such setting in my settings.py. I did no On Tuesday, January 8, 2013 8:09:03 PM UTC-5, Amirouche wrote: > > Did you check your cookies, is there any

Re: HTML Source on Browser Rendering

2013-01-08 Thread Ryoichiro Kamiya
Thanks all for seeing this thread. With further experiment, the result shows the HTML source with tag even after emptying the contents of the Django template file. When I tested it in various browsers, the browser automatically added basic HTML structure with tag on top of my contents. I comp

Re: CSRF Verification error appeared after I changed DNS

2013-01-08 Thread Amirouche
Did you check your cookies, is there any csrftoken ? Did you change SESSION_COOKIE_DOMAIN ? On Wednesday, January 9, 2013 1:19:35 AM UTC+1, Saqib Ali wrote: > > BTW, I forgot to mention that my template contains the following HTML: > > {% csrf_token %} > > E-mail: type="text" class="requi

Re: Documentation of app_directories.Loader

2013-01-08 Thread Amirouche
Héllo Per-Olof, On Saturday, January 5, 2013 4:17:14 PM UTC+1, Per-Olof Åstrand wrote: > > I had a problem interpreting the documentation of app_directories.Loader > in > https://docs.djangoproject.com/en/dev/ref/templates/api/#loading-templates(I > use the dev version of Django). As I read the

Re: CSRF Verification error appeared after I changed DNS

2013-01-08 Thread Saqib Ali
BTW, I forgot to mention that my template contains the following HTML: {% csrf_token %} E-mail: On Tuesday, January 8, 2013 6:44:49 PM UTC-5, Saqib Ali wrote: > > > Hi. > > I have been using Django successfully for a few days now. I was running my > django application on an

CSRF Verification error appeared after I changed DNS

2013-01-08 Thread Saqib Ali
Hi. I have been using Django successfully for a few days now. I was running my django application on an Amazon Web Service machine. I was assigned some arbitrary DNS name that looked like this: http://ec2-XXX.XXX.XXX.XXX.compute-1.amazonaws.com. My Django app was working find with my model and

Announcment - django-databrowse

2013-01-08 Thread Alir3z4
Hi, Since Django 1.4 released, `django.contrib.databrowse` get deprecated. And it's removed from 1.5. Actually I hope django.contrib.* completely get wiped off django, I guess django development will be faster and cleaner without those app. I've extracted and adopted it. Now it's available as st

Re: Project Structure - Lots of scattered custom views

2013-01-08 Thread Amirouche
Héllo Chad, I'd like to help but I need more infos if you don't mind and is granted to provide them. On Monday, January 7, 2013 9:52:35 PM UTC+1, chad petzoldt wrote: > > Right now my project only has 2 apps that use a database (*real* apps). > The rest of the website is composed of many custom

Re: show an image in django

2013-01-08 Thread Mario Gudelj
Try removing .. from the path. Also make sure your static path is set correctly in settings.py On 9 Jan, 2013 1:42 AM, "jianhui chen" wrote: > Hi all, > I want to show an image in project in which the folder DIR looks like this: > images/a.jpg > templates/introduction.html > > In introduction.htm

Re: ORM, Oracle and UTF-8 encoding problem.

2013-01-08 Thread akaariai
I created the following test case into django's test suite modeltests/ basic/tests.py: def test_unicode(self): # Note: from __future__ import unicode_literals is in effect... a = Article.objects.create(headline='0 \u0442\u0435\u0441\u0442 test', pub_date=datetime.n ow())

Re: sort cache

2013-01-08 Thread psychok7
hi there. redis does seem like a better solution than the cache. i need redis (or the cache) because of performance reasons. i know they are faster for the insert and retrieve that i need in a FIFO order. Found this http://rediscookbook.org/implement_a_fifo_queue.html and it seems it will do th

Re: Project Structure - Lots of scattered custom views

2013-01-08 Thread Sanjay Bhangar
hey all, This seems to be an itch I've had to scratch myself in the past - let me see if I understand the situation vaguely correctly: You have a site that uses Django / database features for some things, but then you also have a lot of content that's being designed in some design tool and needs

Re: Syncdb error with new 1.5rc1

2013-01-08 Thread galgal
As for my problem, I solved it by making manage.py migrate --fake But I don't know that is the best and good solution. So far it works somehow :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://

Re: sort cache

2013-01-08 Thread Amirouche
Héllo psychok7, On Tuesday, January 8, 2013 1:45:07 PM UTC+1, psychok7 wrote: > > Hi guys, just wondering if its possible to sort a django cache? I need to > add data with an auto increment id to the cache and sort it in reverse > order to get it back. I no this can be easily accomplished with t

Re: Can't set static file directory.

2013-01-08 Thread jianhui chen
Hi, I am not to interrupt your question, actually I have the same problems as you. It seems that Django comers suffer this problem so much. I use Manager Static File as a guide, but still has problem. 1, Put your static files somewhere that staticfiles will find them I set following

Re: Can't set static file directory.

2013-01-08 Thread Agnese Camellini
I've foud a tutorial , finally. Interesting, but it speaks about an older version of Django. Thank you all for the answers. 2013/1/8 Jonathan > Assuming that you have settings.STATIC_ROOT configured, you can use the > following snippet to handle UR

ORM, Oracle and UTF-8 encoding problem.

2013-01-08 Thread Jani Tiainen
Hi, I've been trying to save UTF-8 characters to oracle database without success. I've verified that database is indeed UTF-8 capable. I can insert UTF-8 characters directly using cx_Oracle. But when I use ORM it will trash characters. Model I use: class MyTest(models.Model): txt = Cha

Re: image list

2013-01-08 Thread Bill Freeman
On Tue, Jan 8, 2013 at 6:03 AM, Randa Hisham wrote: > > i have list of images > i send it and display as table in django template > i make user to change add delete images > how to save back this changes > -- > Randa Hesham > Software Developer > > When you say you allow the user to add images, w

Re: OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")

2013-01-08 Thread Javier Guerra Giraldez
On Tue, Jan 8, 2013 at 4:04 AM, Diederik van der Boor wrote: > When you ask the mysql driver to connect to localhost, it will use the > socket. > To avoid this issue, better use 127.0.0.1. which issue? what's wrong with using socket? -- Javier -- You received this message because you are sub

show an image in django

2013-01-08 Thread jianhui chen
Hi all, I want to show an image in project in which the folder DIR looks like this: images/a.jpg templates/introduction.html In introduction.html I use It can show image correctly when I open the "introduction.html" directly using firefox, but it shows ""GET /images/gauge_example.jpg HTTP/1.1" 4

Re: strangle url error in django with google app engine

2013-01-08 Thread jianhui chen
The problem is solved. Thanks. On Mon, Jan 7, 2013 at 10:02 AM, Daniel Roseman wrote: > On Monday, 7 January 2013 13:54:59 UTC, jianhui chen wrote: > >> Hi all. >>I use djangoappengine http://www.allbuttonspressed.** >> com/projects/djangoappengine#**zip-packages

Re: Syncdb error with new 1.5rc1

2013-01-08 Thread Thiago Carvalho D' Ávila
I found out what I was doing wrong in my model. I was using UserManager without having 'is_active' and 'is_admin' fields. Solved! As with galgal's problem. I had no luck using South to migrate from auth_mixin to django 1.5. I am doing it manually =/ 2013/1/8 galgal > I also get strange error: >

Re: mod_wsgi performance problem

2013-01-08 Thread Javier Guerra Giraldez
On Mon, Jan 7, 2013 at 10:51 PM, carlos wrote: > maybe try deploy with gunicorn and nginx http://gunicorn.org/ > http://wiki.nginx.org/Main while nginx/gunicorn is a very good setup, there's nothing wrong with apache/mod_wsgi. i find unlikely that changing a good choice for another equally good

Re: Can't set static file directory.

2013-01-08 Thread Jonathan
Assuming that you have settings.STATIC_ROOT configured, you can use the following snippet to handle URL routing for static files with the dev server: # urls.py if settings.DEBUG: urlpatterns += patterns('', (r'^static/(?P.*)$', 'django.views.static.serve', { 'document_root'

Re: Syncdb error with new 1.5rc1

2013-01-08 Thread galgal
I also get strange error: https://groups.google.com/forum/#!topic/django-users/lVUZ3hClyUg On Monday, January 7, 2013 10:46:18 PM UTC+1, Thiago wrote: > > I used auth mixin before in my app, then made the changes to make it work > on the official Django with new custom user. > > The problem is t

Re: Syncdb error with new 1.5rc1

2013-01-08 Thread Thiago Carvalho D' Ávila
Basically, I am using Person class as my AUTH_USER_MODEL. I realized it was missing 'username' in REQUIRED_FIELDS. from django.contrib.auth.models import UserManager, AbstractBaseUser ... class Person(AbstractBaseUser): objects = UserManager() username = models.CharField(_('username'), ma

sort cache

2013-01-08 Thread psychok7
Hi guys, just wondering if its possible to sort a django cache? I need to add data with an auto increment id to the cache and sort it in reverse order to get it back. I no this can be easily accomplished with the normal mysql database but since the cache is faster i would like to do it there th

Re: Can't set static file directory.

2013-01-08 Thread Agnese Camellini
I'm not using apache now, i'm just using the development server into django. Why is it so difficult to serve static files? joy 2013/1/8 Mike Dewhirst > On 8/01/2013 10:03pm, joy wrote: > >> I have the same problem, the tutorial speaks about a list of things to do: >> >> * Push your code up to

Re: Can't set static file directory.

2013-01-08 Thread Mike Dewhirst
On 8/01/2013 10:03pm, joy wrote: I have the same problem, the tutorial speaks about a list of things to do: * Push your code up to the deployment server. * On the server, run collectstatic to

Re: Can't set static file directory.

2013-01-08 Thread joy
I have the same problem, the tutorial speaks about a list of things to do: - Push your code up to the deployment server. - On the server, run collectstaticto copy all the static files into STATI

image list

2013-01-08 Thread Randa Hisham
i have list of images i send it and display as table in django template i make user to change add delete images how to save back this changes -- Randa Hesham Software Developer Twitter:@ro0oraa FaceBook:Randa Hisham ٍ -- You

Re: OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")

2013-01-08 Thread Diederik van der Boor
The hostname "localhost" has a special meaning for MySQL, at least on Linux it has. When you ask the mysql driver to connect to localhost, it will use the socket. To avoid this issue, better use 127.0.0.1. Also check whether the MySQL server is running on that port (netstat -a ?), whether the ser