Re: Updating a model instance with extra checks.

2012-08-21 Thread Sebastien Flory
That was my idea too, but using this way, the pre_save / post_save signals wont be triggered. It seems strange to me to be using the objects manager instead of the model instance directly, no? Seb Le mardi 21 août 2012 02:11:42 UTC+2, Thomas Orozco a écrit : > > As a followup to the suggestion

issues with file upload

2012-08-21 Thread 软刀
I now work with mongoengine, mongoForm and set this in setting.py DEFAULT_FILE_STORAGE = 'mongoengine.django.storage.GridFSStorage' I need to upload a picture, and I wrote a form like this: from django.forms import ImageField from mongoforms import MongoForm from documents

Re: django + TinyMce

2012-08-21 Thread Владислав Иванов
Guys, Thanks!! I have converted my class and I did it! But displays the text along with the styles for some reason: Дипломная работа была выполнена в 2010 г. специалистами Учебного центра Рефермейкер по индивидуальному заказу.Общий объем дипломной работы на тему «Женская преступность» — 78 ст

new to django

2012-08-21 Thread maha
Hi,I am new to django. Right now I am going through the tutorial. I am stuck on the creating poll application. *Here are the settings.py ,* INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.co

Re: new to django

2012-08-21 Thread Anoop Thomas Mathew
What is the error you are getting? atm ___ Life is short, Live it hard. On 21 August 2012 12:57, maha wrote: > Hi,I am new to django. Right now I am going through the tutorial. I am > stuck on the creating poll application. > > *Here are the settings.py ,* > > INSTALLED_APPS = ( > 'djang

Re: new to django

2012-08-21 Thread Dhilip S
Hello, Got struct means you got any error or don't know what to do after that Just follow the tutorial, read out each and every line in the document. > > > On Tue, Aug 21, 2012 at 12:57 PM, maha wrote: > Hi,I am new to django. Right now I am going through the tutorial. I am > stuck on the cr

Re: new to django

2012-08-21 Thread Joris
On Tuesday, August 21, 2012 1:08:04 PM UTC+2, Dhilip wrote: > > Hello, > > Got struct means you got any error or don't know what to do after that > Just follow the tutorial, read out each and every line in the document. > > > also make sure you are following the tutorial related to the Dja

Re: new to django

2012-08-21 Thread Melvyn Sopacua
On 21-8-2012 9:27, maha wrote: > i got stuck, after i was running this command *python manage.py shell,* > (i.e) > while exploring the database in python shell. Did you forget the `python manage.py syncdb` part? -- Melvyn Sopacua -- You received this message because you are subscribed to t

Questions Tags Users Badges Unanswered Ask Question

2012-08-21 Thread boddireddy purnachander
Technologies used Python Django framework (from https://www.djangoproject.com/) HTML table filter sort (from http://tablefilter.free.fr/dwn.php) While all other accompanied '.css' and '.js' files in /static/css and /static/js work, only 'tfAdapter.sortabletable.js' does not. No error is seen (i

Re: ManyToManyField errors.

2012-08-21 Thread Nicolas Emiliani
On Mon, Aug 20, 2012 at 4:31 PM, MN TS wrote: > Hello > I'm new in Django using 1.4version. > So got some error. > > 'myapp.models.AdversiteImages'> has no ForeignKey to 'myapp.models.Adversite'> > > * > MODEL* > > class AdversiteImages(models.Model): > image = models.FileField(u'Photo' , >

From Django 1.1 to Django 1.3.1 - Goes Very Slow

2012-08-21 Thread ydjango
I have typical LAMP stack application. I use ORM very heavily. I recently migrated from django 1.1 to django 1.3.1. Application has become very slow even though I have doubled the hardware. Two major changes have been: 1) I have moved database (mysql) to different server 2) I have migrated djan

Re: From Django 1.1 to Django 1.3.1 - Goes Very Slow

2012-08-21 Thread Paul Backhouse
On Tue, 2012-08-21 at 07:30 -0700, ydjango wrote: > > I have typical LAMP stack application. I use ORM very heavily. I > recently migrated from django 1.1 to django 1.3.1. > Application has become very slow even though I have doubled the > hardware. > > Two major changes have been: > 1) I have m

Re: Updating a model instance with extra checks.

2012-08-21 Thread Kurtis Mullins
I remember running into similar situations in a different domain (collision detection in physics engines). It was a pain in the butt :) I'd say first, figure out what you want to do if the process does reach a point where there isn't sufficient funds to perform the transaction. Then take multiple s

Re: Questions Tags Users Badges Unanswered Ask Question

2012-08-21 Thread Kurtis Mullins
Is your tfAdapter.sortabletable.js file in one of your static directories? If so, are you using the proper URL to access it? For example, . If so, what do you see when you "View Source" through your browser on that page? If you click on the javascript link from the "View Source", does it still show

Having LiveServerTestCase use same database as tests

2012-08-21 Thread Phil Gyford
I'm writing integration tests using LiveServerTestCase/Selenium in v1.4.1. By default the process that's started by LiveServerTestCase uses a different database to the test database used by the tests. This is a pain because I can't use factories (I'm using FactoryBoy at the moment) to create data t

Re: Updating a model instance with extra checks.

2012-08-21 Thread Thomas Orozco
I think you could always send the signals yourself. Wrap that along in a model method, and I don't see any issue with using the manager! Le 21 août 2012 10:18, "Sebastien Flory" a écrit : > That was my idea too, but using this way, the pre_save / post_save signals > wont be triggered. > It seem

Re: From Django 1.1 to Django 1.3.1 - Goes Very Slow

2012-08-21 Thread ydjango
Thank you Paul. I will use those tools. I also plan to replace to some ORM queries by raw sql to avoid performance impact of cloning and multi db enhancements. On Tuesday, August 21, 2012 7:42:26 AM UTC-7, Paul Backhouse wrote: > > On Tue, 2012-08-21 at 07:30 -0700, ydjango wrote: > > > > I

Re: new to django

2012-08-21 Thread maha
.don know what to do after that.. > > > > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/m5g03N065jAJ. To post to this group, send email to django-use

CACHE_MIDDLEWARE_ANONYMOUS_ONLY does not work if user is not printed by view or template

2012-08-21 Thread Alexis Bellido
Hello, I am working on a Django 1.4 project and writing one simple application using per-site cache as described here: https://docs.djangoproject.com/en/dev/topics/cache/#the-per-site-cache I have correctly setup a local Memcached server and confirmed the pages are being cached. Then I set CA

Re: issues with file upload

2012-08-21 Thread 软刀
finished sorry, I clone the new source( for review) but use an old source on python environment 在 2012年8月21日星期二UTC+8下午6时36分46秒,软刀写道: > > > I now work with mongoengine, mongoForm > and set this in setting.py > DEFAULT_FILE_STORAGE = 'mongoengine.django.storage.GridFSStorage' > > I need to uploa

Re: new to django

2012-08-21 Thread Kurtis Mullins
python manage.py runserver Then open your browser and goto http://localhost:8000 On Tue, Aug 21, 2012 at 12:43 PM, maha wrote: > .don know what to do after that.. > > >> >> >> >> >> -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To view

Re: new to django

2012-08-21 Thread Enyert Viñas
u can just do python manage.py runserver. Then django will create a "server" at localhost:8000 or 127.0.0.1:8000 2012/8/21 Kurtis Mullins > python manage.py runserver > Then open your browser and goto http://localhost:8000 > > > On Tue, Aug 21, 2012 at 12:43 PM, maha wrote: > >> .don know what

Can somebody help me on how to handle this scenario?

2012-08-21 Thread Nirmal Sharma
--This is the model definition FEEDBACK_CHOICES = ( (1, 'FOR'), (-1, 'AGAINST'), (0, 'NEUTRAL'), ) class user (models.Model): user_name = models.CharField(max_length=150) class comments (models.Model): comment = models.CharField(max_length=1000)

Re: Can somebody help me on how to handle this scenario?

2012-08-21 Thread Kurtis Mullins
I'd offer to help but I think there may be quite a bit more you should understand about Django, before-hand. Have you gone through the Tutorial, yet? Also, just as a general style guideline to follow; class names are typically Pascal Case (http://c2.com/cgi/wiki?PascalCase) and the User class may b

Re: Can somebody help me on how to handle this scenario?

2012-08-21 Thread Kurtis Mullins
Sorry, I meant to say the "User class which would be better extended using a User Profile". Documentation: https://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users On Tue, Aug 21, 2012 at 5:03 PM, Kurtis Mullins wrote: > I'd offer to help but I think there may

I LOVE THIS COMMUNITY!

2012-08-21 Thread Mario Gudelj
I just want to tell you guys that you're awesome! I've never seen a community which helps noobs so much and with so few dickheads in it. Good on you! Mario -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

Re: Handling millions of rows + large bulk processing (now 700+ mil rows)

2012-08-21 Thread ApogeeGMail
I would VERY interested.. Thanks Richard On Jun 30, 2012, at 11:10 AM, Cal Leeming [Simplicity Media Ltd] wrote: > Hi all, > > As some of you know, I did a live webcast last year (July 2011) on our LLG > project, which explained how we overcome some of the problems associated with > large dat

Re: I LOVE THIS COMMUNITY!

2012-08-21 Thread Babatunde Akinyanmi
Amen to that On 8/21/12, Mario Gudelj wrote: > I just want to tell you guys that you're awesome! I've never seen a > community which helps noobs so much and with so few dickheads in it. Good > on you! > > Mario > > -- > You received this message because you are subscribed to the Google Groups > "

View loaded twice / Database entry saved twice

2012-08-21 Thread James Verran
Hi there, I'm trying to capture all url path data. (Except admin, and a couple other paths.) At the end of my urls.py file, I'm using r'^(.*)$'... On my associated view, I make a simple entry into a database - ie: Test(path=capturedpath).save() The problem: my database entry is saved twice! Or ra

Re: I LOVE THIS COMMUNITY!

2012-08-21 Thread Lachlan Musicman
+1 On Wed, Aug 22, 2012 at 10:49 AM, Babatunde Akinyanmi wrote: > Amen to that > > On 8/21/12, Mario Gudelj wrote: >> I just want to tell you guys that you're awesome! I've never seen a >> community which helps noobs so much and with so few dickheads in it. Good >> on you! >> >> Mario >> >> -- >

Re: skip fixtures loading on 'manage.py test myapp'

2012-08-21 Thread Karen Tracey
On Mon, Aug 20, 2012 at 12:40 PM, Anton Baklanov wrote: > and, if anyone is interested, here is the answer - > http://south.readthedocs.org/en/latest/settings.html#south-tests-migrate > > That link doesn't really explain why south would be loading fixtures that Django itself wouldn't ordinarily lo

How I do to centralize logins OpenID in django?

2012-08-21 Thread Mustapha Aoussar
Dear sirs, I have split my Django application into two sites with different databases. I use OpenID (python_openid 2.2.5) for authetication/registration but users of ''site A'' are different from ''site B''. How can I do to centralize logins between apps running on different databases? I have

Re: I LOVE THIS COMMUNITY!

2012-08-21 Thread Peith Vergil
i agree -- 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, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this gr

Re: Distinct Values in ModelChoiceField

2012-08-21 Thread Sithembewena Lloyd Dube
Hi Melvyn, I found your response to the OP interesting, yet I cannot quite follow it. Even if he sets a unique attribute (presumably Boolean/ Checkbox?), he would still need a mechanism to filter the result set at runtime? Please expound? On Mon, Aug 20, 2012 at 11:12 AM, Melvyn Sopacua wrote: >

Re: Distinct Values in ModelChoiceField

2012-08-21 Thread Melvyn Sopacua
On 22-8-2012 3:04, Sithembewena Lloyd Dube wrote: > I found your response to the OP interesting, yet I cannot quite follow it. > Even if he sets a unique attribute (presumably Boolean/ Checkbox?) Nope, this unique attribute: By d

django.db.utils.DatabaseError when resyncing django app models

2012-08-21 Thread Mhlanga Bothin
Hi, I am very new to Django, I have created multiple models in my app. I am using postgresql_psycopg2 as my data base. When I run ./manage validate it returns without errors, sqlall works fine and when I syncdb it works as expected, the issue occurs when I run syncdb a second time I get the fo

Re: django.db.utils.DatabaseError when resyncing django app models

2012-08-21 Thread Kurtis Mullins
It looks to me like you might have a CharField with a max_length that is greater than what your Database supports. That's my guess anyways :) On Tue, Aug 21, 2012 at 9:21 PM, Mhlanga Bothin wrote: > Hi, > > I am very new to Django, I have created multiple models in my app. I am > using postgresql

Re: django.db.utils.DatabaseError when resyncing django app models

2012-08-21 Thread Mhlanga Bothin
Great Thanks I will hunt around for it :) On 22/08/2012, at 11:56 AM, Kurtis Mullins wrote: > It looks to me like you might have a CharField with a max_length that is > greater than what your Database supports. That's my guess anyways :) > > On Tue, Aug 21, 2012 at 9:21 PM, Mhlanga Bothin > w

Re: How I do to centralize logins OpenID in django?

2012-08-21 Thread Kurtis Mullins
I've never tried this approach; but maybe you could use the multi-database feature of Django to share a database for the Authentication/Sessions components? (https://docs.djangoproject.com/en/dev/topics/db/multi-db/) On Tue, Aug 21, 2012 at 7:39 PM, Mustapha Aoussar < mustapha.aous...@gmail.com> w

Re: I LOVE THIS COMMUNITY!

2012-08-21 Thread JJ Zolper
I agree too! On Tuesday, August 21, 2012 7:38:45 PM UTC-4, Peith wrote: > > i agree -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/eqKeF9UQshwJ. To post

Re: django.db.utils.DatabaseError when resyncing django app models

2012-08-21 Thread Karen Tracey
The key part of the traceback is this: File "/usr/local/lib/python2.7/site-packages/django/core/management/sql.py", line 189, in emit_post_sync_signal interactive=interactive, db=db) File "/usr/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 172, in send response

Question about RSS Feeds and a Weblog

2012-08-21 Thread JJ Zolper
Hello, I'm considering the act of starting a weblog like the Django one here: https://www.djangoproject.com/weblog/ on my personal website. This might be a super noob question but does anyone know what that runs on? Is it indeed a "blog" underneath the hood? I've seen that Django has RSS feeds

Re: Question about RSS Feeds and a Weblog

2012-08-21 Thread Russell Keith-Magee
Django's own site is entirely custom code; you can view the code on Github http://github.com/django/djangoproject.com However, you don't need to go the custom route; there are plenty of blog apps ready to be plugged into your own project, depending on your exact needs: http://www.djangopackages.

Re: I LOVE THIS COMMUNITY!

2012-08-21 Thread Pervez Mulla
Yup.:) Really its very awesome community :) On Wed, Aug 22, 2012 at 9:19 AM, JJ Zolper wrote: > I agree too! > > > On Tuesday, August 21, 2012 7:38:45 PM UTC-4, Peith wrote: >> >> i agree > > -- > You received this message because you are subscribed to the Google Groups > "Django users"

Re: Can somebody help me on how to handle this scenario?

2012-08-21 Thread Nirmal Sharma
Hi, I read all the tutorials and i know the Django basics as well. I think you misunderstood what i asked. Dont get confused with the 'user' class i mentioned below with "User class which would be better extended using a User Profile" . Just to give an example i used the name 'user'. Let me re