Re: Django on CentOS

2015-11-09 Thread Matthias Runge
On 09/11/15 11:29, Robin Fourcade wrote: > Thanks for your answer James, > As this server is only the run this project, I can install another linux > distribution. > I'm able to install theses : > > *CentOS 6 minimal system (64 bits)* > Système de base openSUSE 13.1 (64 bits) > Système de base

Re: Team project via Git repo

2015-11-09 Thread Ralph Castain
The primary issue was that I naively placed all the code in the same location as the virtual environment. I subsequently wound up slurping the environment code into the repo, which broke as soon as it was transitioned to a new location. The “secret” was to put the code in a separate location

Re: Team project via Git repo

2015-11-09 Thread m1chael
What ended up solving your issue, Ralph? ~Mike On Mon, Nov 9, 2015 at 4:34 PM, Ralph Castain wrote: > My apologies for the long, long delay in finally responding. Your advice > worked like a charm!! > > Thanks a lot to all who responded. > Ralph > > >> On Oct 13, 2015, at

Re: Team project via Git repo

2015-11-09 Thread Ralph Castain
My apologies for the long, long delay in finally responding. Your advice worked like a charm!! Thanks a lot to all who responded. Ralph > On Oct 13, 2015, at 7:00 PM, Aaron C. de Bruyn wrote: > > Without knowing too much about your environment, I figured I'd tell > you

How do I add permissions in admin for proxy model?

2015-11-09 Thread frocco
I have class qry485Missing(Tracking): class Meta: proxy = True permissions = ( ("qry485Missing_display", "May display information"), ("qry485Missing_edit", "May edit information"), ) verbose_name = "485 Missing"

Re: Setting up PortgreSQL with Djano 1.8

2015-11-09 Thread James Schneider
> > > TIME_ZONE = 'UTC+03:00' > > > > > > *Third Step:* > (my_site)[dan@dworld my_site]$ python2 manage.py migrate > Traceback (most recent call last): > File "manage.py", line 10, in > execute_from_command_line(sys.argv) > File >

Setting up PortgreSQL with Djano 1.8

2015-11-09 Thread Ele. O.
Hello Everyone, I tried to insall PostgreSQL with Djngo 1.8 and when running "migrate" to ensure the database is connected and created successfully, i faced a an error regarding the settings and couldn't go further . Below you can fine the steps that was taken at the time of setting up the

Re: How can I limit records based on user group in admin?

2015-11-09 Thread frocco
I solved this using def get_queryset(self, request): qs = super(TrackingAdmin, self).get_queryset(request) return qs.filter(company__in=list(request.user.groups.all())) *Sorry for the duplicate post* On Monday, November 9, 2015 at 11:28:50 AM UTC-5, frocco wrote: > > Hi, > > I want

Re: how to filter request.user.groups.all()

2015-11-09 Thread frocco
I was stuck on the syntax. This seems to be working. return qs.filter(company__in=list(request.user.groups.all())) On Monday, November 9, 2015 at 1:46:19 PM UTC-5, frocco wrote: > > Hello, > > request.user.groups.all() returns: > > [, ] > > > z = request.user.groups.all() > > I am trying to

Re: Best practices for writing functional tests to exercise forms?

2015-11-09 Thread Tim Chase
On 2015-11-06 01:09, Carl Meyer wrote: > [1] https://pypi.python.org/pypi/WebTest > [2] https://pypi.python.org/pypi/django-webtest Just to follow up, django-webtest has been pretty much exactly what I was looking for. Thanks! -Tim -- You received this message because you are subscribed to

Re: duplicated queries

2015-11-09 Thread James Schneider
> That's works really thank you for your time, learned a very good thing > today, 1 week im on this X) . Already look a little to Prefetch() function > but haven't understand how to use it in my case^^ > Don't feel that bad. Prefetch() stumped me for a long time until I saw a post about it on

Re: how to filter request.user.groups.all()

2015-11-09 Thread James Schneider
On Mon, Nov 9, 2015 at 10:46 AM, frocco wrote: > Hello, > > request.user.groups.all() returns: > > [, ] > > > z = request.user.groups.all() > > I am trying to limit records based on: > > mytable.filter(company__in=z) > > > What am I doing wrong? > > >From the look of it,

Re: Django on CentOS

2015-11-09 Thread James Schneider
On Mon, Nov 9, 2015 at 2:29 AM, Robin Fourcade wrote: > Thanks for your answer James, > As this server is only the run this project, I can install another linux > distribution. > I'm able to install theses : > > *CentOS 6 minimal system (64 bits)* > Système de base

how to filter request.user.groups.all()

2015-11-09 Thread frocco
Hello, request.user.groups.all() returns: [, ] z = request.user.groups.all() I am trying to limit records based on: mytable.filter(company__in=z) What am I doing wrong? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: coding in template

2015-11-09 Thread Dariusz Mysior
Thank's i set it in PyCharm on encoding utf-8 like You said and it's work! W dniu sobota, 7 listopada 2015 21:44:25 UTC+1 użytkownik Dariusz Mysior napisał: > > I try use polish letters in my template index.html but I had an error > > > utf-8' codec can't decode byte 0xb3 in position 149:

Re: Ayuda con filtro

2015-11-09 Thread miguel angel lopez mendo
{% for cliente in queries %} Nombre del Cliente: {{ cliente.Nombre}} Medio por el cual llego: {{ cliente.get_medio_display}} {% endfor %} En el template que modificaria ? El lunes, 9 de noviembre de 2015, 11:36:29 (UTC-6), miguel angel lopez mendo escribió: > > > def

Re: Ayuda con filtro

2015-11-09 Thread miguel angel lopez mendo
Soy nuevo en este tema y no me queda lo deje como lo subiste El lunes, 9 de noviembre de 2015, 11:36:29 (UTC-6), miguel angel lopez mendo escribió: > > > def clientes(request): > clientes = Clientes.objects.order_by('Nombre') > clientes2 =

Re: Ayuda con filtro

2015-11-09 Thread Gustavo Andrés Angulo
Hola, puedes utilizar un for y guardar la salida en un query aunque por optimización los queries de django solo se ejecutan en el momento de usarlos entonces podrias crear un templetag para esto. def cliente(request): ... ... clientes = Clientes.objects.order_by('Nombre') queries = {}

Ayuda con filtro

2015-11-09 Thread miguel angel lopez mendo
def clientes(request): clientes = Clientes.objects.order_by('Nombre') clientes2 = Clientes.objects.order_by('Nombre').filter(medio='1') clientes3 = Clientes.objects.order_by('Nombre').filter(medio='2') clientes4 = Clientes.objects.order_by('Nombre').filter(medio='3') c =

Re: Search capability on Django 3.1.3 (Haystack)

2015-11-09 Thread Aaron C. de Bruyn
Without any specific information on the problems you are having, here is a link to the Haystack search tool: http://haystacksearch.org/ If you can provide us with more detail, we would be happy to help. -A On Sun, Nov 8, 2015 at 11:06 PM, nAncy sharma wrote: > Hi

Re: Write django log to different.

2015-11-09 Thread Stephen J. Butler
That's not going to work because all of this stuff... On Sun, Nov 8, 2015 at 9:40 PM, tolerious feng wrote: > TODAY_STRING = datetime.datetime.now().strftime("%F") > TODAY_LOG_DIR = os.path.dirname(__file__) + "/log/" + TODAY_STRING > # TODAY_LOG_DIR = "/log/" +

Re: duplicated queries

2015-11-09 Thread V1ce
That's works really thank you for your time, learned a very good thing today, 1 week im on this X) . Already look a little to Prefetch() function but haven't understand how to use it in my case^^ I have replaced my {% with currscat=categ.getscateg %} by {% with

How can I limit records based on user group in admin?

2015-11-09 Thread frocco
Hi, I want to deploy an admin app that only allows records with company=A to users in group A and allows records with company=B to users in group B Is this possible? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

django oauth and andriod authentication

2015-11-09 Thread Shekar Tippur
Hello, I am trying to get an android app authenticated via django oauth2. I am using https://github.com/wuman/android-oauth-client for generating the request Here is the generated uri

Aw: Re: Django-Restframework adding and accessing a user to a model / adding an owner?

2015-11-09 Thread lnzy35en
Hi Xavier,   You are an angel! Thank you very much, the link to the API helped so much   Best Regards, Mike   Gesendet: Sonntag, 08. November 2015 um 08:43 Uhr Von: "Xavier Ordoquy" An: django-users@googlegroups.com Betreff: Re: Django-Restframework adding and

Re: finding information on modules, imports, etc.

2015-11-09 Thread Gary Roach
Actually, I think I have been looking in the wrong place for my information. What I assumed was Django functions are actually Python functions. Most if the information I need is found in the Python web sites. Obviously, I'm a bit of a Nub all around. AFLE (Another xxx learning experience.)

Re: Write django log to different.

2015-11-09 Thread Serdar Dalgic
Instead of solving this problem on django side, I'd recommend using a tool such as logrotate for this problem http://www.rackspace.com/knowledge_center/article/understanding-logrotate-utility You can customise it to your needs, daily, weekly or per size basis. One problem with solving it on

Write django log to different.

2015-11-09 Thread tolerious feng
I want to write django log to different, especially I want to log daily log file, such as 2015-11-09-log.txt 2015-11-10-log.txt, this is my settings.py file: TODAY_STRING = datetime.datetime.now().strftime("%F") TODAY_LOG_DIR = os.path.dirname(__file__) + "/log/" + TODAY_STRING # TODAY_LOG_DIR

Re: Django on CentOS

2015-11-09 Thread Robin Fourcade
Thanks for your answer James, As this server is only the run this project, I can install another linux distribution. I'm able to install theses : *CentOS 6 minimal system (64 bits)* Système de base openSUSE 13.1 (64 bits) Système de base Debian 7 Wheezy (64 bits) CentOS 6 avec Parallels Plesk

Re: Django on CentOS

2015-11-09 Thread Robin Fourcade
Hi And thanks for your answer. Le lundi 9 novembre 2015 10:51:01 UTC+1, Gergely Polonkai a écrit : > > Hello, > > there’s a lot that is not clear for me in your included config: > > • Why are all those paths in WSGIPythonPath? > I'm not used to install django projects so I followed this

Re: Django on CentOS

2015-11-09 Thread James Schneider
On Sun, Nov 8, 2015 at 12:59 PM, Robin Fourcade wrote: > Hi, > Thanks for your answer ! > (I'd add that even if apache is running, if I run the server on the port > 8000, I can acces the django project on this port without any issue) > > That simply means that the Django

Re: Django on CentOS

2015-11-09 Thread Gergely Polonkai
Hello, there’s a lot that is not clear for me in your included config: • Why are all those paths in WSGIPythonPath? • Are there Python modules in those directories? • Do I get it right that your application is installed under /var/www (which is generally a bad idea)? • Is pizzaclub/settings.py

Re: Prefetch object with to_attr set to the same name as the field triggers rows deletions

2015-11-09 Thread Michele Ciccozzi
Hello Simon, Thank you very much for this very interesting follow-up: it's like everyday there's a new reason to keep digging in the source code! I'll see you there ;) All the best, Michele On Sat, Nov 7, 2015 at 11:35 AM, Simon Charette wrote: > Hi Michele, > > I don't

Re: Merging Codeigniter withe Django

2015-11-09 Thread Russell Keith-Magee
Hi Masum, On Sat, Nov 7, 2015 at 4:25 PM, Masum Hasan wrote: > Hi, > > I have a class project partially done with Django, but my lab partner has > done her part in Codeigniter. I was wondering if it is possible to merge > these two and complete the project? > Any thought

Re: Django on CentOS

2015-11-09 Thread Robin Fourcade
Hello, thanks for the answer. I've this code in my wsgi: import os, sys #Calculate the path based on the location of the WSGI script apache_configuration = os.path.dirname(__file__) project = os.path.dirname(apache_configuration) workspace = os.path.dirname(project) sys.path.append(workspace)

Re: duplicated queries

2015-11-09 Thread James Schneider
> > ### > # template code - I removed the blank lines and reduced the indentation > for readability in an email. > ### > > {% for categ in categs %} > {% with currscat=categ.souscategorie_set.all %} > {{categ.nom}} > {% if currscat %} # This line hit database > Sorry,