ANN: eGenix PyRun - One file Python Runtime 2.2.1

2016-06-06 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix PyRun - One file Python Runtime Version 2.2.1 An easy-to-use single file relocatable Python run-time - available for Linux, Mac OS X and Unix

Loader Template without context (request), Use Case and Proposal

2016-06-06 Thread aRkadeFR
Hello all, I'd like to open a discussion on the Loader Template (django/template/loaders/app_directories.py) which is linked to the Template Engine (django/template/engine.py) about the context it has when determining the templates to load. ## Use Case In order to do multi-tenancy on our proje

Re: Django suit and Static files not working in Django 1.6

2016-06-06 Thread Ricardo Daniel Quiroga
The current version for django 1.6 is obsolete... please upgrade to 1.9 2016-06-01 15:34 GMT-03:00 Roger Lanoue jr : > Hello All. > > I learning my first Django experience and I am making some headway. I am > stuck on my test server and Django suit admin. > > I my goal is to get the new admin fro

Allow users to vote up, down or nothing

2016-06-06 Thread Robin Lery
Hello, I have made an app to create article. This is the model: class Article(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL) title = models.CharField(max_length=150) body = models.TextField() pub_date = models.DateTimeField(default=timezone.now) tags = models

Re: Loader Template without context (request), Use Case and Proposal

2016-06-06 Thread Tim Graham
Doesn't seem too likely to me as all user-facing rendering functions would have to accept (require?) the request argument. By the way, not sure if this post might have been meant for the django-developers mailing list? On Monday, June 6, 2016 at 6:02:26 AM UTC-4, aRkadeFR wrote: > > > Hello all

Re: Django inside Docker

2016-06-06 Thread Davi Diório Mendes
Hi, sorry the late response Ezequiel, this docker will run on an IBM PowerPC and there is no base image ready to ppc64 architecture. Soon this dockerfile will be ported to ppc64. Akhil, I use this snippet to run the image docker run -d --name ltc-client \ -v $(PROJ_HOME)/client:/home/cli

Re: Django inside Docker

2016-06-06 Thread Davi Diório Mendes
Ezequiel helped me at hangouts. at settings.py I had: TEMPLATES: [ { [...] 'DIRS': ['templates'] [...] }, ] and as Ezequiel said, is better to use: 'DIRS': [os.path.join(BASE_DIR, 'templates')] now everything is working, Thank you Ezequiel, and everyone t

Re: Allow users to vote up, down or nothing

2016-06-06 Thread Avraham Serour
Maybe a nullable boolean field On Jun 6, 2016 6:27 PM, "Robin Lery" wrote: > Hello, > I have made an app to create article. This is the model: > > class Article(models.Model): > user = models.ForeignKey(settings.AUTH_USER_MODEL) > title = models.CharField(max_length=150) > body = mode

django1.6 with uwsgi and nginx on RHEL 7

2016-06-06 Thread Larry Martell
I have successfully deployed django1.6 with uwsgi and nginx on RHEL6 but I cannot seem to get it working on RHEL7. I get Internal Server Error in the browser, and this in the uwsgi log: --- no python application found, check your startup logs for errors --- [pid: 10582|app: -1|req: -1/2] xx.xx.xx

Re: Allow users to vote up, down or nothing

2016-06-06 Thread ludovic coues
I will assume user can vote a specific article. I would go for another model, like that class VoteForArticle(models.Model): DOWN = 0 NEUTRAL = 1 UP = 2 VOTES = ((DOWN, "down"), (NEUTRAL, "neutral)", (UP, "up")) user = models.ForeignKey(settings.AUTH_USER_MODEL) article = mo

Re: django1.6 with uwsgi and nginx on RHEL 7

2016-06-06 Thread Larry Martell
I figured this out - the problem turned out to be that the RHEL 7 machine had django 1.6.0 whereas the RHEL 6 machine had 1.6.10. Once I installed 1.6.10 on the 7 machine all was well. On Mon, Jun 6, 2016 at 12:50 PM, Larry Martell wrote: > I have successfully deployed django1.6 with uwsgi and ng

Re: django1.6 with uwsgi and nginx on RHEL 7

2016-06-06 Thread Avraham Serour
you should use isolated virtual environments for each python project, don't install packages on the system wide python, see https://virtualenv.pypa.io/en/stable/ On Mon, Jun 6, 2016 at 11:45 PM, Larry Martell wrote: > I figured this out - the problem turned out to be that the RHEL 7 > machine h

Re: django1.6 with uwsgi and nginx on RHEL 7

2016-06-06 Thread Larry Martell
In general, yes, I agree. But in this cast the machine is dedicated to just running that one app. On Mon, Jun 6, 2016 at 4:54 PM, Avraham Serour wrote: > you should use isolated virtual environments for each python project, don't > install packages on the system wide python, see > https://virtual

How to set default ordering to Lower case?

2016-06-06 Thread Neto
It does not works: from django.db.models.functions import Lower class Person(models.Model): name = models.CharField(_('name'), max_length=100) class Meta: ordering = [Lower('name')] -- You received this message because you are subscribed to the Google Groups "Django user

Re: How to set default ordering to Lower case?

2016-06-06 Thread Ezequiel Bertti
You can create a migration file and create index by sql. https://docs.djangoproject.com/ja/1.9/ref/migration-operations/#django.db.migrations.operations.RunSQL On Mon, Jun 6, 2016 at 8:21 PM, Neto wrote: > It does not works: > > from django.db.models.functions import Lower > > > class Person(mo

Re: How to set default ordering to Lower case?

2016-06-06 Thread Simon Charette
Hi Neto, Ordering by expression (order_by(Lower('name')) is not supported yet but it's tracked as a feature request[1]. If we manage to allow transforms in `order_by()`[2] in the future you should be able to define a ['name__lower'] ordering in the future but until then you have to use a combin

Re: Passing hidden foreign key to form as initial value

2016-06-06 Thread Peter of the Norse
Because CharField is designed for text data. So the form field turns the course into a string and tries to save a string to the model. That doesn’t work. The only built-in field designed to work with foreign keys is ModelChoiceField. You could update it so that it doesn’t run a queryset and

Re: authenticate a user without databse

2016-06-06 Thread prabhat jha
hey bro thanx,but i am not using django authentication pattern. so @login required will not work in my condition. > > -- 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 emai