Re: Using another database while testing

2012-02-01 Thread Denis Darii
You can redefine your database connection by adding somewhere at the end of your settings.py something like: import sys if 'test' in sys.argv: DATABASES = ... hope this helps. On Wed, Feb 1, 2012 at 6:01 PM, xina towner wrote: > I have a problem, django can't create my database because a d

Re: problem with localization

2012-02-04 Thread Denis Darii
ECIMAL_SEPARATOR, 2) > > type of self.total_no_vat is unicode and I cannot do other operations > on this field. > Thanks, > Vittorino > > > On 4 Feb, 10:15, Denis Darii wrote: > > Hi Vittorino, this is happen because the model fields are automatically > > formatted by dj

Re: rich text editing

2012-02-04 Thread Denis Darii
Take a look at this app: https://github.com/pydanny/django-wysiwyg On Sat, Feb 4, 2012 at 2:44 PM, yonatan braude wrote: > I want to enable rich text editing to editor on the site. what is the best > way? > thanx > yonatan > > -- > You received this message because you are subscribed to the Googl

Re: Is there a simple way to write the site root as a variable clientside

2012-02-04 Thread Denis Darii
I'm not sure I fully understand your questions, but I think you need to know more about the stupend "sites" framework: https://docs.djangoproject.com/en/dev/ref/contrib/sites/ On Sat, Feb 4, 2012 at 5:13 PM, Jason <1jason.whatf...@gmail.com> wrote: > Hi there, > > Is there a simple way to write t

Re: dynamic permissions

2012-02-05 Thread Denis Darii
It seems that you are looking for a "per object permissions" system, so take a look at django-guardian: https://github.com/lukaszb/django-guardian On Sun, Feb 5, 2012 at 3:59 PM, Vittorino Parenti < vpare...@thundersystems.it> wrote: > i've a model with document'categories and a model with docume

Re: Making login Testing

2012-02-06 Thread Denis Darii
Yes Rubén you are right, also you can use directly self.client.login() method: ... def setUp(self):login = self.client.login(username='myusername', password='mypass') self.assertTrue(login) On Mon, Feb 6, 2012 at 12:46 PM, xina towner wrote: > Hi, I've a question, how can I make l

Re: Is there a way to prevent /static directory browsing?

2012-02-06 Thread Denis Darii
Under nginx you can set "autoindex" to "off" for "/static/" location: location /static/ { autoindex off; root /path/to/your/static/; } More info here: http://wiki.nginx.org/HttpAutoindexModule On Mon, Feb 6, 2012 at 3:53 PM, Robert Steckrot

Re: number input format

2012-02-07 Thread Denis Darii
from the django's global_settings: # Decimal separator symbol DECIMAL_SEPARATOR = '.' # Boolean that sets whether to add thousand separator when formatting numbers USE_THOUSAND_SEPARATOR = False # Number of digits that will be together, when spliting them by # THOUSAND_SEPARATOR. 0 means no grou

Re: Installing Django from GIT/Subversion - package dependency in virtual environment

2012-02-20 Thread Denis Darii
Do you mean django-trunk installation? If so, I use this in my requirements.txt: -e svn+http://code.djangoproject.com/svn/django/trunk/#egg=django-trunk or directly with pip: $ pip install -e svn+ http://code.djangoproject.com/svn/django/trunk/#egg=django-trunk Hope it helps. On Mon, Feb 20,

Re: Year dropdown in Django admin

2012-02-20 Thread Denis Darii
I was in the same situation as you and I found this solution... in your models.py: import datetime YEAR_CHOICES = []for r in range(1980, (datetime.datetime.now().year+1)):YEAR_CHOICES.append((r,r)) so, your field can now use YEAR_CHOICES: year = models.IntegerField(_('year'), max_length=4,

Re: Installing Django from GIT/Subversion - package dependency in virtual environment

2012-02-20 Thread Denis Darii
evelopment-version, > your method works perfectly so far. > > I understand that keep in sync with trunk/master is as easy as invoking > git pull (svn up) and then setup.py install in src/django directory in > virtualenv root? > > > Mateusz Marzantowicz > > > On Mon,

Re: Any Singaporean Django developers out there?

2012-02-26 Thread Denis Darii
Is there some demand for django programmers? On Sun, Feb 26, 2012 at 5:21 AM, Kolbe wrote: > It's like Django is nonexistent in Singapore! > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-use

Re: method for checking logged in user

2012-02-26 Thread Denis Darii
This is for you: https://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.models.User.is_authenticated On Sun, Feb 26, 2012 at 6:55 PM, rafiee.nima wrote: > Hi > I want to know is there any built in function to check if a user is > logged in > actually I want to check if a user fro

Re: internationalization makemessage don't work

2012-02-27 Thread Denis Darii
Hi Nicolas. Try to run makemessages script from the root directory of your Django app, so: $ cd /your/app/path/ $ mkdir locale $ django-admin.py makemessages -l en On Mon, Feb 27, 2012 at 10:54 PM, nicolas HERSOG wrote: > Yes, I have my app in INSTALLED_APPS and I also have added this key in m

Re: internationalization makemessage don't work

2012-02-27 Thread Denis Darii
ag {% load i18n > %} and all the strings i wanted to translate are between {%trans > "myStringToTranslate" %} > > Is the fact that my /template folder is not in the same path than m apps > may be a problem ? > > > On Mon, Feb 27, 2012 at 10:58 PM, Denis Darii wrote:

Re: Learning Django: DjangoProject Poll application

2012-02-29 Thread Denis Darii
try to use DjangoStack 1.4b1-0 instead of 1.3.1-1 On Wed, Feb 29, 2012 at 7:07 AM, WuWoot wrote: > https://docs.djangoproject.com/en/dev/intro/tutorial01/ > > I'm using the Djangostack (Python 2.7.2+; Django 1.3.1-1) from Bitnami > ran on Ubuntu 11.10 with PostgreSQL 9.1.2 > > Sorry for my newbi

Re: Django profile

2012-03-02 Thread Denis Darii
1. http://pinaxproject.com/ 2. http://django-userena.org/ On Fri, Mar 2, 2012 at 9:26 PM, Bolang wrote: > Can someone suggest me an application for adding user profile to django? > I have found > http://code.google.com/p/**django-profile/and > https://b

Re: Template filters and translations to russian language

2012-03-07 Thread Denis Darii
Try to change also the language of your browser, this because you have LANGUAGES = (('ru', 'Russian'), ('en_US', 'English')) and probably in your browser is set EN. Or force it to RU: from django.utils.translation import activate activate('ru') On Wed, Mar 7, 2012 at 12:20 PM, Tom Evans wrote

Re: Django hgwebdir

2012-03-07 Thread Denis Darii
using django? hmmm... you can browse your current repo via http on port 8000 by launching: $ hg se or: $ hg se -n "Your repo" On Wed, Mar 7, 2012 at 1:39 PM, siva <85s...@gmail.com> wrote: > > > Is it possible can we see hg repository using django ? > > -- > You received this message because

Re: django admin login

2012-03-14 Thread Denis Darii
Try to create your superuser again: ./manage.py createsuperuser On Wed, Mar 14, 2012 at 6:25 PM, vikalp sahni wrote: > You have to check your > > SESSION_COOKIE_DOMAIN in settings file if i.e pointing to "localhost" (if > not cookies will not properly set and hence login will not be allowed) >

Re: What directory do I install Django on Linux server

2012-03-14 Thread Denis Darii
Hello Alex. Yes, when you install django using *"pip install django*" or "*python setup.py install*" directly from the source, the code goes to the correct directory inside of the "current" sites-packages. To find out where your installed django code is placed you can simply run: $ python -c "im

Re: playing with random number

2012-03-25 Thread Denis Darii
Nikhil please only django related questions here. Write to python-users group for your problem but only after googling it... I'm pretty sure you will find lots and lots of related questions/solutions. Denis. On 25 March 2012 19:07, Nikhil Verma wrote: > Hi all > > I have a list say > > li = [13

Re: Simple question on queryset.

2012-03-27 Thread Denis Darii
I think the error "Memberships has no attribute all" is not related to your QuerySet. Try to look deeply into your code. BTW, your QuerySet must be: queryset = Memberships.objects.get(id=4) or better, if your id is also the primary key: queryset = Memberships.objects.get(pk=4) On 27 March 2012

Re: Problem with get_or_create

2012-04-23 Thread Denis Darii
Murilo, try to debug your "task" variable - must be an int. Also next time please provide full traceback of your error. On 23 April 2012 17:42, akaariai wrote: > On Apr 23, 4:26 pm, Murilo Vicentini > wrote: > > Hey guys, > > I'm having a bit of a problem using the get_or_create with a > > Many

Re: Django + ajax waiting page, can not redirect to result page

2011-12-16 Thread Denis Darii
You can view your js errors by pressing CTRL+SWIFT+J in Firefox but i highly recommend you to install Firebug addon which allow you to view also the received data from your ajax request. On Fri, Dec 16, 2011 at 5:24 AM, yun li wrote: > Since I am really know nothing about ajax, I am not sure if

Re: Creating websites like Amazon/Ebay using Django

2011-12-16 Thread Denis Darii
You can consider to use django-lfs: http://www.getlfs.com/ or satchmo: http://www.satchmoproject.com/ but without basic knowledge of django, it's going to be very hard for you. On Fri, Dec 16, 2011 at 8:06 AM, Cata wrote: > Hello everyone, > > I am basically working on creating a website on th

Re: Which IDE should I use for Django?

2011-12-19 Thread Denis Darii
*SublimeText2*, and here my configuration for it: http://wiki.ddenis.com/index.php?title=The_best_text_editor_is_Sublime_Text_2_or_it_doesn%27t_exist On Mon, Dec 19, 2011 at 12:34 PM, Masklinn wrote: > On 2011-12-19, at 11:34 , Alec Taylor wrote: > > I'm looking for a Django IDE which incorporat

Re: Writing apps for django

2011-12-24 Thread Denis Darii
Take a look at Django Conventions: http://ericholscher.com/projects/django-conventions/ Also this article could be useful for you: http://blog.zacharyvoase.com/2010/02/03/django-project-conventions/ Cheers, Denis. On Sat, Dec 24, 2011 at 10:38 AM, Lukasz wrote: > Hi all ! > > I'm looking for d

Re: Writing apps for django

2011-12-25 Thread Denis Darii
http://djangopackages.com/ is what you need. On Sun, Dec 25, 2011 at 2:04 PM, Lukasz wrote: > > On 24 déc, 18:18, Denis Darii wrote: > > Take a look at Django Conventions: > http://ericholscher.com/projects/django-conventions/ > > > > Also this article coul

Re: Django CMS and django-admin-tools are together?

2011-12-27 Thread Denis Darii
I have a project in which I use django-cms and django-admin-tools together in production and I hadn't had any problems using it until now. On Tue, Dec 27, 2011 at 9:27 AM, Maxim Boyarskiy wrote: > Hi Guys, > > One question here: Is it possible and justified to use django-admin- > tools over djang

Re: project help

2011-12-28 Thread Denis Darii
You can also consider to use pinax: http://pinaxproject.com/ or userena for accounts: http://django-userena.org/ Denis. On Tue, Dec 27, 2011 at 8:58 PM, Jesramz wrote: > Hello All, > > I would like to create a job search project a lot like monster or > indeed. > > Does anyone have any resources

Re: Django-admin disable plus sign

2011-12-30 Thread Denis Darii
You can rewrite the *has_add_permission* method of your admin class and return False for your user. More info here: https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin.has_add_permission On Fri, Dec 30, 2011 at 3:21 PM, torgia wrote: > If I have a model with a

Re: Django-admin disable plus sign

2011-12-30 Thread Denis Darii
Also take a look at this ticket: https://code.djangoproject.com/ticket/9071 On Fri, Dec 30, 2011 at 3:38 PM, Denis Darii wrote: > You can rewrite the *has_add_permission* method of your admin class and > return False for your user. > More info here: > https://docs.djangoproject.co

Re: Django dev/deploy environment for distributed agile teams

2011-12-31 Thread Denis Darii
Hi Ashkan, You can take a look at our project: django-fagungis = DJANGO + FAbric + GUnicorn + NGInx + Supervisor deployment Here: https://bitbucket.org/DNX/django-fagungis/ We use it for the same purpose as you described. If you have some questions, suggestions or ideas about and for the project f

Re: Error: No module named debug_toolbar

2012-01-03 Thread Denis Darii
Try to force the installation inside your env: (Pinax-env) P:\Projects\Pinax>pip install* --ignore-installed * django-debug_toolbar On Tue, Jan 3, 2012 at 12:31 PM, Alec Taylor wrote: > Unfortunately I keep getting this error, no mater what I do. > > Here's what I've attempted: http://pastebin.

Re: Error: No module named debug_toolbar

2012-01-04 Thread Denis Darii
t;manage.py syncdb" And as the first attempt, try to run the "manage.py syncdb" with your environment python executable, placed in (Pinax-env)/bin/python On Wed, Jan 4, 2012 at 2:20 AM, Alec Taylor wrote: > Thanks Denis, but unfortunately that didn't work. > &g

Re: Removing Save functionality from Admin

2012-01-12 Thread Denis Darii
You can rewrite the *has_add_permission* method of your admin class and return False. More info here: https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin. has_add_permission On Thu, Jan 12, 2012 at 5:51 PM, Swaroop Shankar V wrote: > Hi All, > I guess the ques

Re: tutorial 2 admin site problem

2012-01-18 Thread Denis Darii
You can replace: url(r'^admin/', include(admin.site.urls)), > with: url(r'^/', include(admin.site.urls)), > in your *urls.py* if you really want to have the admin at /. But are you aware of what this implies? On Wed, Jan 18, 2012 at 12:31 PM, Krondaj wrote: > Hi, > > I have just started tutori

Re: How to find the word 'python' in string 'pythonpythonpythonpyth'?

2014-11-05 Thread Denis Darii
Vitaly feel free to look on https://www.python.org/ for a solution to your issue and please keep only django related questions in this "Django users" group. Thank you. Denis. On 5 November 2014 12:41, Віталій Лисенко wrote: > Sorry. I asked the question incorrectly. > Example. > I line 'pythonpy