Re: Using success_url with reverse() in class-based generic view

2011-09-21 Thread Xavier Ordoquy
Hi, You can also use get_success_url for that: class ContactView(generic.FormView): form_class = ContactForm def get_success_url(self): return reverse('contact-sent') Regards, Xavier Linovia. Le 21 sept. 2011 à 00:08, Daniel P a écrit : > Same problem. You'r not alone! > > t

Re: Programming logic in Classed Based FormView or in the Form Itself?

2011-09-22 Thread Xavier Ordoquy
Hi, Nothing prevents you to put your tests in the form_valid and render the same page with your errors. Regards, Xavier, Linovia. Le 22 sept. 2011 à 17:14, Kurtis a écrit : > Hey, > > I'm trying to figure out the best way to do this. I have a FormView > and an associated Form. In my Form, I t

Re: Accessing attributes on ManyToManyField table

2011-09-25 Thread Xavier Ordoquy
Hi, You'll need to acces it through the membership_set: person_instance.membership_set.date_joined Regards, Xavier, Linovia. Le 25 sept. 2011 à 17:22, mcjffld a écrit : > > In the documentation (which really is great) there is this example > > class Membership(models.Model): >person = m

Re: DB: working with databases

2011-09-25 Thread Xavier Ordoquy
Hi, Database will be better designed if you let django orm create them first and you add your tuning after. However, you can still work with non Django generated database. django-extensions application even provides an inspectdb that will guess most of your models from the database schema. Re

Re: can't get STATICFILES to work (Django dev version)

2011-09-25 Thread Xavier Ordoquy
Hi, > I have read and followed the docs on static files. > django.contrib.staticfiles is in INSTALLED_APPS > (by default), and I have set STATICFILES_DIRS to where my static files > are (/home/nara/media). (I have > tried with and without a slash at the end of this absolute file path). Static fi

Re: DB: working with databases

2011-09-25 Thread Xavier Ordoquy
Le 26 sept. 2011 à 01:48, Russell Keith-Magee a écrit : > On Mon, Sep 26, 2011 at 12:13 AM, Xavier Ordoquy wrote: >> Hi, >> Database will be better designed if you let django orm create them first and >> you add your tuning after. >> However, you can still wor

Re: can't get STATICFILES to work (Django dev version)

2011-09-26 Thread Xavier Ordoquy
does collect >> all >> static files. Unfortunately, running the server still does not serve >> my >> css files. >> >> I have spent too many cycles on this issue now. I will go back to my >> workaround of just placing css inline in the templates, and

Re: django 1.3 upgrade problem

2011-10-02 Thread Xavier Ordoquy
Hi, I'm a bit curious about the ModPythonRequest object which makes me think you are using mod_python. If this is the case, you should note that its support is deprecated: Support for mod_python has been deprecated, and will be removed in Django 1.5. If you are configuring a new deployment, you

Re: Easy question (I hope)

2011-10-07 Thread Xavier Ordoquy
Hi, Create a models directory and have an __init__.py file within. Put the models you want to import in that file and you are good to go. Regards, Xavier. Le 7 oct. 2011 à 16:39, bcrem a écrit : > Howdy, > > I come from a C/C++ background, getting into some django/python now. > I'm used to a o

Re: STATIC_ROOT confusion

2011-10-07 Thread Xavier Ordoquy
HI, You don't need STATIC_ROOT while using your dev server. If you have a look https://docs.djangoproject.com/en/1.3/howto/static-files/#basic-usage it isn't even mentionned in the basic usage section. Regards, Xavier. Le 8 oct. 2011 à 04:13, Roy Smith a écrit : > I'm mystified why django (un

Re: STATIC_ROOT confusion

2011-10-08 Thread Xavier Ordoquy
Le 8 oct. 2011 à 15:27, Markus Gattol a écrit : > Here's what I think is semantically good distinction: > > PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) (that's the dir > containing your settings.py, that dir is usually one dir below your > virtualenv, I simply name it "pr". You

Re: Class Views Questions

2011-10-08 Thread Xavier Ordoquy
Le 8 oct. 2011 à 16:12, CrabbyPete a écrit : > I am fooling around with django generic class views, and I was > wondering if its possible to actually build class views per item for > example I have the following class view. > > > class TeamView( View, TemplateResponseMixin ): >template_name

Re: STATIC_ROOT confusion

2011-10-08 Thread Xavier Ordoquy
Le 8 oct. 2011 à 17:23, Markus Gattol a écrit : > Yeah, read that post and I disagree. Introducing yet another name on the > filesystem (theme) certainly isn't helping people (this thread and many > others show there's enough confusion already). It makes more sense to have a > 1:1 mapping betw

Re: Second coming of Java?

2011-10-13 Thread Xavier Ordoquy
Le 13 oct. 2011 à 17:06, Maksymus007 a écrit : > > > On Thu, Oct 13, 2011 at 4:59 PM, Javier Guerra Giraldez > wrote: > On Thu, Oct 13, 2011 at 9:52 AM, Maksymus007 wrote: > > must works with some other solutions where choice of using SOAP over REST > > was made years ago. > > often because

Re: static files in django

2011-10-14 Thread Xavier Ordoquy
Hi, It looks like you don't have the static configured in your urls. Have a look here: https://docs.djangoproject.com/en/1.3/howto/static-files/#basic-usage Regards, Xavier. Le 14 oct. 2011 à 18:54, Pulkit Mehrotra a écrit : > hey i am having problem loading my static files in django 1.3 > >

Re: Serving up CSS files in development

2011-11-07 Thread Xavier Ordoquy
Hi, Where did you put your static files ? I noticed that your STATICFILES_DIRS is empty which means you don't have any static files on the project level. What the docs say about this: Your project will probably also have static assets that aren’t tied to a particular app. The STATICFILES_DIRS s

Re: How-to for static files?

2011-11-21 Thread Xavier Ordoquy
Hi, > What follows are my current settings. In settings.py, I have: > > STATIC_URL = '/static/' > INSTALLED_APPS = ('django.contrib.staticfiles',) In order to get their static files served, apps need to be listed in the INSTALLED_APPS list. As you don't mention it, you probably need to add mya

Re: Tutorial Part 3: loading index.html in browser

2012-11-24 Thread Xavier Ordoquy
to the index.html file that I created? You are probably looking at the file itself instead of the page rendered by the server. Is that the result you had while looking at http://localhost:8000/polls/ ? Regards, Xavier Ordoquy. > Thanks! > > {% if latest_poll_list %} > >

Re: error message on runserver locally

2012-12-15 Thread Xavier Ordoquy
Hi Phil, test is a python module. Your project name conflicts with it. You should use another name for your project. Regards, Xavier Ordoquy, Linovia. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: error message on runserver locally

2012-12-15 Thread Xavier Ordoquy
Have you tried to start them with the manage.py runserver instead of django-admin ? Regards, Xavier Ordoquy, Linovia. Le 15 déc. 2012 à 15:38, Phil a écrit : > Hi Xavier, I tried a project called "boom" too and same message, plus my > other 3 django projects I had working pr

Re: error message on runserver locally

2012-12-15 Thread Xavier Ordoquy
Sorry I should have been more explicit. You need to call the manage.py through the python interpreter: "python manage.py runserver" because your local directory isn't in your paths. Regards, Xavier Ordoquy, Linovia. Le 15 déc. 2012 à 16:14, Phil Brant a écrit : >

Re: error message on runserver locally

2012-12-15 Thread Xavier Ordoquy
Le 15 déc. 2012 à 16:37, Phil Brant a écrit : > Running that in python interpreter just throws an error "Invalid Syntax" Without stacktrace, there isn't much we can do. There might be something wrong in your settings file. Regards, Xavier Ordoquy, Linovia. -- You rec

Re: Layered Dropdown List

2012-12-24 Thread Xavier Ordoquy
> The user or admin can select only the states. > > I would appreciate any input I can get. > Thank you for reading my question and I hope to hear from you. > > Regards > You'll find how to do this with the MEDIA_CHOICES example here: https://docs.djangoproject.com/en/1.4

Re: django 1.4.3 to 1.4.4 upgrade fails - Bad magic number Import Error

2013-02-21 Thread Xavier Ordoquy
Hi, You should consider upgrading to 1.4.5 which fixes that issue. Best regards, Xavier Le 21 févr. 2013 à 09:00, Frank Bieniek a écrit : > Hi, > we are using jenkins to build our django stack, > we changed the django version from 1.4.3 to 1.4.4. > this results in a > > ImportError: Bad magi

Re: Re-usable app for REST API creation with Python 3 support?

2013-04-22 Thread Xavier Ordoquy
Hi Thomas, You should give a go to Django Rest Framework (http://django-rest-framework.org/) as it has been ported to Python3. Regards, Xavier Ordoquy, Linovia. Le 22 avr. 2013 à 12:08, Thomas Weholt a écrit : > I'm looking for a re-usable app for django that can help create a

Re: Django 1.5.1 and formsets with more than 1000 initials

2013-04-24 Thread Xavier Ordoquy
arger than 1000. You probably could open a ticket about that. Please note that a more flexible workaround would be: > >>> ArticleFormSet = formset_factory(ArticleForm, max_num=len(MyInitials), > >>> extra=0) Regards, Xavier Ordoquy, Linovia. Le 24 avr. 2013 à 21:42,

Re: South not picking up changes to model, app crashes

2013-05-17 Thread Xavier Ordoquy
lained here: http://south.readthedocs.org/en/0.7.6/tutorial/part1.html#changing-the-model Best regards, Xavier Ordoquy. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, sen

Re: 'FormSet' object has no attribute 'save'

2013-06-23 Thread Xavier Ordoquy
Hi, Looks like you've missed something in your code. Unfortunately without the formset creation / instance creation code, there isn't much we can do. Regards, Xavier. Le 23 juin 2013 à 17:05, Mário Idival a écrit : > Hi guys, > > I need of little help with formsets. I want save 3 instances o

Re: Can't decode french characters after switching to PostgrSQL from MySQL

2013-08-21 Thread Xavier Ordoquy
Hi, Le 22 août 2013 à 08:25, Radomir Wojcik a écrit : > Adding the unicode u to the 'string' as such u'string' fixes the issue but > now I have to add this u to every string that will potentially have a > character with a french accent in it? How come MySQL didn't need this? There > must be

Re: Can't decode french characters after switching to PostgrSQL from MySQL

2013-08-22 Thread Xavier Ordoquy
Hi Le 22 août 2013 à 09:52, Radomir Wojcik a écrit : > Are french characters UTF-8 Compliant? As I said, yes. Been using Django + Postgres with french texts and faced no issue so far. You also have a decent Django french user base which would have noticed that sort of issues. Back on our topi

Re: Can't decode french characters after switching to PostgrSQL from MySQL

2013-08-22 Thread Xavier Ordoquy
I'm using full utf8. Whenever I need to import data, I make sure they are utf8 encoded. an extract from a database dump: SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape

Re: New field in django

2013-09-08 Thread Xavier Ordoquy
Hi, The message is: "Table 'tcc_report' already exists" This means that you already created the tables with syncdb which bypassed south and you're trying to created them again with south. You'll be able to recover from this by: - ensuring your models are in line with your current DB schema - cre

Re: [Newbie] Self referencing models

2013-09-12 Thread Xavier Ordoquy
Hello Zoubeida, models.ForeignKey(self) works (see https://docs.djangoproject.com/en/1.5/ref/models/fields/#foreignkey about it). What sort of error did you get when trying it ? Regards, Xavier Ordoquy. Le 12 sept. 2013 à 09:44, Zoubeida a écrit : > Any help? > > Le samedi 8 nove

Re: ALLOWED_HOSTS and dynamic dyn site

2013-10-10 Thread Xavier Ordoquy
Hi michael, I've also noticed a couple of issues with it. Thanks to raven and sentry I noticed those requests were missing the hostname in their headers and decided I didn't care more. You might want to use them and see if it's the same for you. Best regards, Xavier, Linovia. Le 10 oct. 2013 à

Re: Official Django tutorial 3: Reverse for 'detail' with arguments '('',)' and keyword arguments '{}' not found.

2013-10-12 Thread Xavier Ordoquy
Hi, It looks like you are missing the poll in your context. {% url 'detail' poll.id %} will try to match an url named detail with the argument poll.id However Django says it can't find a reverse for 'detail' with arguments ('',) which means that you don't have a poll in your context (or the poll

Re: PostgreSQL OperationalError

2013-10-18 Thread Xavier Ordoquy
Hello, Your DATABASES settings aren't correct. fe_sendauth is about Postgresql complaining the login/password didn't match. Regards, Xavier, Linovia. Le 18 oct. 2013 à 10:28, Muhammed TÜFEKYAPAN a écrit : > Hello, > > > I just start to publish my app on web. Everything going well but I face

Re: PostgreSQL OperationalError

2013-10-18 Thread Xavier Ordoquy
x27;t. > > > 2013/10/18 Xavier Ordoquy > Hello, > > Your DATABASES settings aren't correct. > fe_sendauth is about Postgresql complaining the login/password didn't match. > > Regards, > Xavier, > Linovia. > > Le 18 oct. 2013 à 10:28, Muhammed TÜFE

Re: Japanese named File - FileUpload django admin throws error

2013-10-21 Thread Xavier Ordoquy
Hi, I've run into similar issues while saving files with non ascii file names. In my case, it turns out that supervisor was removing the environment variables leave Django left with a C locale (ie, ascii only filenames). It worked once I added - for example - LANG="en_US.UTF-8", LC_ALL="en_US.UT

Re: Python 3

2013-10-23 Thread Xavier Ordoquy
Hi Andréas, The thing with python3 is it dropped implicit conversion between binary and "textual" strings. That means that: - you now need to explicitly encode or decode if you need to switch the type of string you're using - any conversion issue will be risen even if you're just using plain asc

Re: RestFul with Class Based Views best practice

2013-10-29 Thread Xavier Ordoquy
Hi, You probably want to have a look at django rest framework. You use can will be easy with it, in particular if you use http://django-rest-framework.org/api-guide/viewsets.html#modelviewset Regards, Xavier. Le 29 oct. 2013 à 20:45, pywebdesign a écrit : > Hi, > > I am trying to find/develo

Re: pycharm change django project directory

2011-04-28 Thread Xavier Ordoquy
Hi, I also use pycharm. Go in the configuration / Django Support and fills the fields (including enable django support). Looks like it has not been reconized out of the box since the django project seems to be in your subdirectories and there seems to be more than one project. Regards, Xavier.

Re: How do I set permissions for manual install of 1.3 for ubuntu 11.04?

2011-05-02 Thread Xavier Ordoquy
Hi, Le 30 avr. 2011 à 12:16, jsierra a écrit : > I figured it out, i chmod -R 775 the django directory located in > /usr/local/lib/python2.7/dist-packages and was able to use the commands > without sudo. Whether or not that's a good idea, I don't know, but it's my > personal laptop anyway. Tha

Re: Strange problem with admin, ManyToMany and DEBUG=False

2011-05-02 Thread Xavier Ordoquy
Le 2 mai 2011 à 11:49, Nick a écrit : > Hi, > > I'm having a very strange problem with a site I've developed, which > only seems to happen when DEBUG=False and is now preventing my from > launching the site (unless I launch it in DEBUG mode, which I > obviously don't want to). The EXACT same cod

Re: [Django] Error (EXTERNAL IP): /add_comment/10/

2011-05-04 Thread Xavier Ordoquy
Le 4 mai 2011 à 13:44, Aragorn a écrit : > HI, > > I can not understand where is the error. when you insert a > blog comment I receive an email, but this' > the email I receive ! Hi, I noticed you have overridden the save method. Could you tell us more about what you are doing the that method

Re: Generiview that show mutiple class model

2011-05-04 Thread Xavier Ordoquy
Le 4 mai 2011 à 14:38, Pascal Moutia a écrit : > Hi, > I've been having a problem i'd like to show mutiple class from a model in a > generic view but I can't find a way to it, > Can some one tel me do I have to write my own view or is there any generic > view that can do this ? What do you m

Re: Generiview that show mutiple class model

2011-05-04 Thread Xavier Ordoquy
Le 4 mai 2011 à 14:56, Pascal Moutia a écrit : > First tank you Xavier for you respond let me get you more precisions: > this is my app models.py (normaly the models.py have more classes always with > a ForeignKey to Info): > > class Info (models.Model): >nom = models.CharField(max_length=1

Re: [Django] Error (EXTERNAL IP): /add_comment/10/

2011-05-04 Thread Xavier Ordoquy
one writes a > comment. (Sorry but I do not speak English). If I run with "python manage.py > runserver" the email arrives well, if run with apache wsgy the result is the > error ! > > 2011/5/4 Xavier Ordoquy > > Le 4 mai 2011 à 13:44, Aragorn a écrit : > > >

Re: How to draw line charts in Django?

2011-05-05 Thread Xavier Ordoquy
Le 5 mai 2011 à 12:05, Nge a écrit : > Hi KG! > > I already created a view and can extract data from database.But I have > a problem. I don't know how to send to template and how to create js/ > ajax. Can you share me sample? > > Thanks > Nge There are tons of javascript application that can d

Re: How to draw line charts in Django?

2011-05-05 Thread Xavier Ordoquy
Le 5 mai 2011 à 16:06, william ratcliff a écrit : > One other approach is that you can send the data to matplotlib (which is > python) and use that to create a .png which you then serve--it depends on > what your needs are. > > William Hi, matplotlib is incredibly hard to understand and doe

Re: Django administration page, created a Site -- now what?

2011-05-07 Thread Xavier Ordoquy
> Hello, > > I have created a new Site in my "Django administration" page. How can I use > it now? If I visit the URL that this newly created Site points to, I get a > URLconf error. So what do I need to add to my project's urls.py file? A > newbie here. Please help me on this. Thanks. Hi, I

Re: New Django Profiling application

2011-05-13 Thread Xavier Ordoquy
> On May 13, 9:34 pm, Brian Bouterse wrote: >> Go for it! >> >> I know the disqus team (told by dcramer at djangocon 2010) has a great >> profiling app, you should talk with them about this. The disqus folks said >> they were in the process of packaging it up to release similar to the high >> qu

Re: Slightly cryptic debug message

2011-05-26 Thread Xavier Ordoquy
Hi > Hi all , I have a question , On the the new versions of django (after > 1.2) a lot of syntax errors and other errors come as Templatesyntax > errors instead .. . Shouldn't django try to give more compatible debug > message. I haven't found much difference in the error messages. Could you be

Re: Slightly cryptic debug message

2011-05-26 Thread Xavier Ordoquy
> Well for example : > > """ > Exception Type: TemplateSyntaxError > Exception Value: > Caught NameError while rendering: global name 'approved' is not defined > > """ > > I don't understand if it is a NameError why should django say > TemplateSyntax error when exception value it s

Re: Django Development Environments

2011-06-05 Thread Xavier Ordoquy
Hi > Ubuntu 10.10 > PyCharm > VirtualEnv > Yolk > Pip OSX PyCharm virtualenv + pip and/or buildout django-command-extensions and django-debug-toolbar > For testing I generally just use the inbuilt dev server that Django > provides. TDD (unit tests) + BDD (freshen) > For production I'm currentl

Re: Django Development Environments

2011-06-07 Thread Xavier Ordoquy
Hi, > Xavier, could you point to any resources about using buildout with Django, > virtualenv and pip? I'm assuming you're using it to deploy things into > production, right? I usually use virtualenv / pip for early development as it requires almost no setup. I prefer using buildout once the

Re: New to Django, need some help with tutorial

2011-06-07 Thread Xavier Ordoquy
Le 7 juin 2011 à 07:59, Dori Rutkevitz a écrit : > Hi all, > > I am new to programming in general and recently decided to pick up Django. Im > reading bits of a book on Python, and im starting to stumble through the > Djangoproject.com tutorial. My problem might be embarrassingly simple, but i

Re: python + BDD (Behaviour)

2011-06-11 Thread Xavier Ordoquy
Le 11 juin 2011 à 21:27, Mark Curphey a écrit : > Similar question: I was looking to see if there is a Python equivalents to > Cucumber and Capybara ? > > On Jun 11, 2011, at 11:27 AM, Guilherme Silveira Elias wrote: Hi, You can use freshen or lettuce for that. Lettuce has some nice documenta

Re: django/python performance vs play/java

2011-07-05 Thread Xavier Ordoquy
Hi, Install Django debug toolbar and have a look at what's wrong with your application. My numbers are very different from yours. I just ran some tests and I am around 350 req/s with 4 sql queries. I'm a on dual core (4 virtual cores), using gunicorn/mysql with debug turned off, 4 workers proce

Re: django/python performance vs play/java

2011-07-05 Thread Xavier Ordoquy
Hi, Is there anyway you can upload the project to bitbucket or github ? Regards, Xavier. Le 6 juil. 2011 à 01:31, drakkan a écrit : > Hi, > > thanks for your comments, I installed django-debug toolbar and I can > confirm I'm doing similar queries from both django and play. The query > I do wit

Re: Serving static files weirdness

2011-07-07 Thread Xavier Ordoquy
Hi, If you want help, you'll need to provide more information. What django version, what env (wsgi, devserver), what's your admin media and so on. Regards, Xavier. Le 8 juil. 2011 à 04:40, neridaj a écrit : > I had my static files being served form media i.e., the tree looked > like this: > >

Re: Django admin - utf8 filename

2011-07-19 Thread Xavier Ordoquy
Le 19 juil. 2011 à 16:32, galgal a écrit : > How can I get rid of error when uploading files with utf8 name? > I can't find any solution:/ Hi, There's nothing to do except make sure your LANG is set to something such as en_US.UTF-8. If you are using apache, check you /etc/apache2/envvars Rega

Re: TestCase and fixtures

2011-01-12 Thread Xavier Ordoquy
Hi, Out of curiosity, do you run your tests in a multi database setting ? Regards, Xavier. Le 11 janv. 2011 à 23:36, Simone Dalla a écrit : > Hi! > I'm testing a part of my application with a TestCase class specifing the > 'fixtures' attributes like > > > -- > You received this message beca

Re: Need HELP urgently

2011-01-12 Thread Xavier Ordoquy
Hi, I am not sure the admin is designed for handling so many entries in a foreign key. When you try to display Priority, you'll have a combo box with 200.000 entries which will takes a lot of time to get computed especially if you want to display entries information in the string representation

Re: Problem with comments framework

2011-01-13 Thread Xavier Ordoquy
Hi, You may want to have a look at: http://docs.djangoproject.com/en/1.2/ref/contrib/comments/moderation/#django.contrib.comments.moderation.CommentModerator.email_notification Or define a template name comments/comment_user_notification.txt as stated by the exception :) Regards, Xavier. Le 13

Re: Django dev server issue

2011-01-14 Thread Xavier Ordoquy
Hi, I don't know much of windows, but couldn't it be some kind of network filtering, parental control or whatever that creates this behavior ? @daniels: your issue is different. Django dev server only serves one request at a time. It looks like your chrome does several request at the same time.

Django, Postgres and recovering from database constraints

2011-02-01 Thread Xavier Ordoquy
Hi all, I got a project which sometime outputs database integrity errors (key violates unique constraint). It is fine since I'm keeping an events table which may have several creation messages for the same object. Until now, I was just catching the exception and forgot about it. Today, I'm not

Re: Django, Postgres and recovering from database constraints

2011-02-01 Thread Xavier Ordoquy
Le 1 févr. 2011 à 15:59, bruno desthuilliers wrote : > On 1 fév, 15:24, Xavier Ordoquy wrote: >> Hi all, >> >> I got a project which sometime outputs database integrity errors (key >> violates unique constraint). >> It is fine since I'm keeping an events

Re: Django, Postgres and recovering from database constraints

2011-02-01 Thread Xavier Ordoquy
o.db import IntegrityError, transaction >> >> #Other Code >> ... >> #relevant code >> try: >> sid = transaction.savepoint() >> foo = FooModel(fooarg=fooarg, ...) >> foo.save() >> except IntegrityError: >> transaction.savepoint_rollback(sid) &

Re: Django, Postgres and recovering from database constraints

2011-02-02 Thread Xavier Ordoquy
lback) doesn't need extra setting ? This part doesn't say it requires an explicit transaction management, so I'd like to know whether the documentation would benefit a minor update or if it's a bug due to multi database. Xavier. Le 1 févr. 2011 à 20:15, Xavier Ordoquy a écr

Re: Django Project - handling call to the "root" url?

2011-02-02 Thread Xavier Ordoquy
Hi, > However, when I alter the root() function to: > > def root(request): > return render_to_response('admin/login.html', None) > > This causes a loop condition i.e. displays the page OK, but trying to login > just redisplays the page... any ideas how to make this work as intended? >

Re: Memcache configured, but not used !?

2011-02-03 Thread Xavier Ordoquy
Le 3 févr. 2011 à 12:55, Ivo Brodien a écrit : > I did the following to enable memcache: > > 1 ) install memcache and it is running with default values: > /usr/bin/memcached -m 64 -p 11211 -u nobody -l 127.0.0.1 > > 2) put a decorator over my view @cache_page(60 * 2) > > 3) enable cache panel

Re: Memcache configured, but not used !?

2011-02-03 Thread Xavier Ordoquy
> from django.core.cache import cache > print cache > > > In the shell it is using the locmem which I haven’t configured anywhere... > strange! I'm not sure it is. Can you make sure you are using django 1.3 ? in the shell do: import django print django.VERSION If it says 1, 2, whatever, your c

Re: Model Codng/Model Usage Pitfall?

2011-02-14 Thread Xavier Ordoquy
Hi You have several options depending on what you're ready to do. 1) Drop the database, recreate it and resync it (fine as long as you don't have data to keep) 2) Install django command extension (http://code.google.com/p/django-command-extensions/) and take sqldiff output to modify your DB 3)

Re: Having trouble synchronizing the database, can someone help?

2011-02-15 Thread Xavier Ordoquy
flush will only flush the data from the base. It doesn't modify the table structure as far as I remember. You can have a look at the thread "Model Codng/Model Usage Pitfall?" which was on the same topic yesteday. Regards, Xavier. Le 15 févr. 2011 à 09:01, Chen Xu a écrit : > thanks, flush does

Re: gantt charts or timeline graphics

2011-02-15 Thread Xavier Ordoquy
Hi, Doesn't reportlab already provide imaging facilities that you are looking for ? Regards, Xavier. Le 16 févr. 2011 à 00:33, refreegrata a écrit : > Hello list, I have a question. I need to generate some gantt chart or > time line image to represent every step of an element in a process. I >

Re: Messages framework is not showing messages in my templates

2011-02-18 Thread Xavier Ordoquy
Hi, It's been some time I haven't used the messages framework but don't you see your messages with some lags ? Like try to submit twice your form and see if you don't get the messages after the second post (and don't go in the admin between those requests). When forms are valid, I usually redire

Re: What's the difference between MEDIA_ROOT and STATIC_ROOT?

2011-02-23 Thread Xavier Ordoquy
Hi, As the documentation said, in the previous version, it was common to place both in the MEDIA_ROOT (unless you used 3rd party application to avoid that). So as long as the code has not been ported to 1.3, you'll probably see that again and often. Regards, Xavier. Le 23 févr. 2011 à 08:04, K

Re: Variable to pass in all views

2011-02-26 Thread Xavier Ordoquy
Hi, You should have a look at requestcontext: http://docs.djangoproject.com/en/1.2/ref/templates/api/#subclassing-context-requestcontext Regards, Xavier. Le 26 févr. 2011 à 06:37, Krish a écrit : > Is there any way that I can pass a variable to all views pages > (templates) without defining on

Re: Deploying django. Please specify the steps.

2011-03-11 Thread Xavier Ordoquy
Le 11 mars 2011 à 13:25, Kenneth Gonsalves a écrit : > On Fri, 2011-03-11 at 04:17 -0800, balu wrote: >> I tried to deploy django with the following. But I couldn't able >> succeed. Please let me know the exact steps in configuring apache >> server, configuring mod_wsgi. >> >> I had gone through

Re: ANN: Django 1.3 released

2011-03-23 Thread Xavier Ordoquy
Hi there I just checked with Chrome (10.0.648.151 / osx) and it worked with sha & md5. The issue seems to be on your side. Regards, Xavier. Le 23 mars 2011 à 12:01, Chris Matthews a écrit : > Thanks it was. > Chrome consistently downloaded it with only 799,034 bytes. I used Windows > Internet

Re: OT: Django broke my Dropbox

2011-03-28 Thread Xavier Ordoquy
> For fun, I checked out the official Subversion, Git, and Mercurial > repos this afternoon: > > svn: >22,986 directories > > git: >2,563 directories > > hg: >5,291 directories > > I don't know whether this displays an inefficiency of Subversion or > whether converting from Subversi

Re: Django Web Application Cost So Many memory

2011-03-30 Thread Xavier Ordoquy
Hi, > Because > if an instance cost 60M memory, when I deploy my project in prefork > web server with 100 instance, i will cost 6GB memory. I don't think > this is a normal state. I hardly see the need for 100 instances. Could you elaborate on that need ? Imagine those 100 instances are processin

Re: Django Web Application Cost So Many memory

2011-03-30 Thread Xavier Ordoquy
Le 30 mars 2011 à 15:41, 付毅 a écrit : > i don't think 100 instance means to 100 CPUs. I just want to use http_load to > test pressure to my web server. if i make the 100 cocurrent request per > second with 100 cocurrent connection. I will make 100 python process instance > when I deploy my web

Re: Django Web Application Cost So Many memory

2011-03-30 Thread Xavier Ordoquy
Hi, Sounds correct to me. Regards, Xavier. Le 30 mars 2011 à 17:48, 付毅 a écrit : > hi Xavier Ordoquy > So , you mean 60M per python process is in a normal status? I really encouter > this kind of website before > > On Wed, Mar 30, 2011 at 11:35 PM, Xavier Ordoquy wrote: >

Re: new subpage in django

2011-03-30 Thread Xavier Ordoquy
Le 30 mars 2011 à 21:16, jay K. a écrit : > Hello, > > How do you create a new subpage in django? > > thanks Hi, What do you mean or I'd rather ask, what are you trying to do ? Regards, Xavier. -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Django Web Application Cost So Many memory

2011-03-30 Thread Xavier Ordoquy
Le 31 mars 2011 à 07:57, 付毅 a écrit : > hi Graham: > i'm using the nginx+fcgi . And my startup command is below > > python manage.py runfcgi host=127.0.0.1 port=3033 method=prefork > pidfile=/var/run/fcgi.pid minspare=5 maxspare=30 maxchildren=60 > maxrequests=200 > > p.s I've invite you

Re: Hi multilingual charfields?

2011-03-31 Thread Xavier Ordoquy
Hi, Le 31 mars 2011 à 09:34, Mika Sjöman a écrit : > Hi > > The content of my models have fields that need to be translated in the django > admin in several languages. > > I found it to be a major hassle to get it working. Since django is having > internationalization built in, why does it no

Re: framework web comparison

2011-04-08 Thread Xavier Ordoquy
Hi there > Hello list. I must to do a document to compare the most populars web > frameworks (Django, Ruby, Zend, ...), in terms like performance, > utilities, documentation, etc. For this document, the opinions of this > list would be helpful. Isn't Ruby a language ? Regards, Xavier. -- You

Re: Is it possible to output a graph from Matplotlib into Django like this?

2011-04-11 Thread Xavier Ordoquy
Le 11 avr. 2011 à 12:21, nai a écrit : > This is the give example from Matplotlib for Django: > > def simple(request): >import random > >from matplotlib.backends.backend_agg import FigureCanvasAgg as > FigureCanvas >from matplotlib.figure import Figure >from matplotlib.dates imp

Re: segmentation fault

2015-01-13 Thread Xavier Ordoquy
d pid 11979 exit signal Segmentation > fault (11) > [Tue Jan 13 23:46:12 2015] [notice] child pid 11993 exit signal Segmentation > fault (11) > > how do i go about resolving this? You need to ensure that your Python/C libraries are up to date with your system. Regards, Xavier Ordo

Re: Error: No module named polls

2015-01-05 Thread Xavier Ordoquy
37, in import_module > __import__(name) > ImportError: No module named polls > > i don't know what to do can anyone help, please!!! > > sorry for my bad english… It looks like Python couldn’t find the « polls » directory. Maybe you didn’t create it or it is at the

Re: django tests

2013-11-22 Thread Xavier Ordoquy
understand what didn’t go well so that we could improve the documentation. Regards, Xavier Ordoquy, Linovia. > Not optional means that are not validated. If yes why? > I mean these are the compulsory fields, so why we should not give it. > I used all the compulsory fields but still I a

Re: django tests

2013-11-21 Thread Xavier Ordoquy
Hi, I doubt the error is the same although it might look similar. Please note that TestCase use setUp instead of setup. Regards, Xavier Ordoquy, Linovia. Le 22 nov. 2013 à 07:17, Harjot Mann a écrit : > On Fri, Nov 22, 2013 at 11:17 AM, Charly Román wrote: >> Your testcase's na

Re: django tests

2013-11-22 Thread Xavier Ordoquy
testing since they seem to be mandatory. Regards, Xavier Ordoquy, Linovia. Le 22 nov. 2013 à 09:26, Harjot Mann a écrit : > On Fri, Nov 22, 2013 at 1:47 PM, Xavier Ordoquy wrote: >> I feel like you are trying to get too fast into Django. >> It looks like you should take some ti

Re: Django Install Error: " SyntaxError: future feature unicode_literals is not defined "

2014-01-09 Thread Xavier Ordoquy
Hi, Given the error it looks like you weren’t using python 3.3 For the record, I’m running on osx (10.9), using python 3.3.3 I had no issue with this import. Regards, Xavier Ordoquy. Le 9 janv. 2014 à 19:04, Byron Price a écrit : > I have Python 3.3.2 running and I'm trying to

Re: when I pip-installed django-debug-toolbar, the latest version of Django was installed automatically.

2014-02-18 Thread Xavier Ordoquy
atever the version you'll want to install, it'll take the one on the /tmp and will not remove it by itself. The correct workaround is to clean /tmp and try a new installation. Regards, Xavier Ordoquy, Linovia -- You received this message because you are subscribed to

Re: Dynamic database routing in Django

2014-03-12 Thread Xavier Ordoquy
Hi Philip, I'm not sure your sharding will be possible in the way you describe it. There will be cases for which selecting the database will not be possible. For example, Customer.objects.get(name=) won't be able which DB you'll need to hit to get the result. Same goes for a new Customer. H

Re: Middleware being called twice for every request, help?

2014-03-19 Thread Xavier Ordoquy
Hi, Just remove the Django debug toolbar. It will call your middlewares to display the result. Regards, Xavier, Linovia. Le 19 mars 2014 à 18:00, Tyler Bettilyon a écrit : > Hello! > > I recently switched my Django environment from using Apache to Gunicorn. > After this switch we noticed tha

Re: Version number comparison and beta

2014-05-01 Thread Xavier Ordoquy
I saw this but this worked well for me. Regards, Xavier Ordoquy, Linovia. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegrou

Re: Django REST framework nested query.

2017-11-06 Thread Xavier Ordoquy
Hi, You are looking for nested serializers. Documentation explains how to deal with them at: http://www.django-rest-framework.org/api-guide/relations/#nested-relationships Regards, Xavier, Linovia. > Le 7 nov. 2

<    1   2   3   >