Django 1.8 format error

2015-11-10 Thread Jose Paul
I am getting following errors when I am tried DJango 1.8 test cases against 
DB2 .What can be the cause for this ?.
Can someone comment on this please .

==
FAIL: test_decimal_numbers (utils_tests.test_numberformat.TestNumberFormat)
--
Traceback (most recent call last):
  File 
"C:\Users\IBM_ADMIN\PythonWorkspace\DJangoTestCases\src\DJangoTestCases\tests\utils_tests\test_numberformat.py",
 
line 56, in test_decimal_numbers
self.assertEqual(nformat(Decimal('1234'), '.', grouping=2, 
thousand_sep=','), '1234')
AssertionError: '12,34' != '1234'

==
FAIL: test_format_number (utils_tests.test_numberformat.TestNumberFormat)
--
Traceback (most recent call last):
  File 
"C:\Users\IBM_ADMIN\PythonWorkspace\DJangoTestCases\src\DJangoTestCases\tests\utils_tests\test_numberformat.py",
 
line 14, in test_format_number
self.assertEqual(nformat(1234, '.', grouping=2, 
thousand_sep=','),'1234')
AssertionError: u'12,34' != '1234'

==
FAIL: test_format_string (utils_tests.test_numberformat.TestNumberFormat)
--
Traceback (most recent call last):
  File 
"C:\Users\IBM_ADMIN\PythonWorkspace\DJangoTestCases\src\DJangoTestCases\tests\utils_tests\test_numberformat.py",
 
line 23, in test_format_string
self.assertEqual(nformat('1234', '.', grouping=2, 
thousand_sep=','),'1234')
AssertionError: u'12,34' != '1234'

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2225b084-548d-4642-84af-afff4d3eab24%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django on CentOS

2015-11-10 Thread Timothy W. Cook
If you have the option use a different Linux distribution.  If you must use
CentOS this may help with getting Apache and Python (newer than 2.6)
working.
http://stackoverflow.com/questions/21158918/django-mod-wsgi-psycopg2-improperlyconfigured-error-loading-psycopg2-module


I see that since I had the original problem others have posted that there
are fixes for Python 3 and mod_wsgi.  It may work for you to use Python 3.x
???


On Tue, Nov 10, 2015 at 5:56 AM, Matthias Runge 
wrote:

> 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 Debian 7 Wheezy (64 bits)
> > CentOS 6 avec Parallels Plesk Panel 12 (64 bits)
> > openSUSE 13.1 avec Parallels Plesk Panel 12 (64 bits)
> > Système de base ubuntu 14.04 (64 bits)
> >
> > Do you think it's better to install one or another ?
> >
> > Actually, I already tried on Debian 7 and I followed some tutorial but I
> > wasn't able to run the server neither. So if you know a great tutorial
> > which shows how to install&run a django project on one of theses
> > distributions, it would be perfect! :)
> >
> > Thanks again !
> >
> > Robin.
>
> CentOS 6 is fine, as you saw your developer server already worked.
>
> Looking at your project, I can not find a file
> pizzaclub.settings,
> but pizza_club.settings
>
> (see the '_' ?)
>
> Matthias
>
> --
> 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...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5641A340.5080701%40matthias-runge.de
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 


Timothy Cook
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
MLHIM http://www.mlhim.org

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3WqG%2BmR6sRsBecZPYYd%2B%3DUaz2o3%2BhmjJBEPf%3DgT5Yi6BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Deployment script to accommodate up-gradation of 3rd party apps and (fake) migration of models

2015-11-10 Thread 42hrs . in


HI,


In fabfile.py, I use something similar to the following to install 
dependencies and to migrate the changes to the new model


run("pip install -r ../deployment/pip/deploy.txt")
> run("python manage.py migrate --settings=project.settings.prod")


When I upgrade the 3rd party apps which have migrations in the current 
version, but did not have in the previous one, my understanding is that I 
have to run ./manage.py migrate --fake .


What would be a good solution with which a single deployment script (with 
Fabric) could pull the code from GIT repo, install new dependencies, take 
care of migrations and *IF* there are 3rd party apps that started using 
migrations recently, then run fake migrations on those.


Any pointers would be highly appreciated.


PS: I have also asked this as a Question in StackOverflow 
,
 
if you'd like to take a look.

Thank you.

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/62e0cc7e-6fe9-4b2e-9fe1-faa3c42fea82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django on CentOS

2015-11-10 Thread Robin Fourcade
Thanks Matthias,

I set* os.environ.setdefault("DJANGO_SETTINGS_MODULE", 
"pizza_club.settings") in my wsgi.py*
Now I have *ImportError: Could not import settings 'pizza_club.settings' 
(Is it on sys.path?): No module named pizza_club.settings, referer: 
http://www.pizzaclub.fr/*

Is that what you meant ? Because the problem is still there. :/


--

Thanks Timothy,
I'll check the link you gave me. :)

Thanks again,

Robin

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5f9f331a-ad44-48cd-9068-8326212423d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How do I server my app in apache in subdirectory?

2015-11-10 Thread frocco
Hello,

In httpd.conf this works

WSGIScriptAlias / C:/MAMP/htdocs/django/vnatracking/vnatracking/wsgi.py

however if I change it to 

WSGIScriptAlias /mysite 
C:/MAMP/htdocs/django/vnatracking/vnatracking/wsgi.py

it fails

Instead of localhost, I want localhost/mysite

Thanks


-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/17150f3f-77e1-4c86-b5b7-939eb3dfde20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django-admin.py startproject mysite

2015-11-10 Thread Peter of the Norse
0.0.0.0 is not an actual IP address.  You can’t put it in your browser.  
Instead, you need to find your computer’s IP address and use that.  How you 
find it depends on your OS, but once you do, then you can visit 
http://192.168.0.5:8000/ (for example). 

> On Nov 4, 2015, at 5:50 PM, Muhammad Asamov  wrote:
> 
> HI 
> I was wodering whether someone can hepl me with startproject 
> 
> The thing is when I am running startproject from the server ip 127.0.0.1:8000 
> which was created automaticly i can see the result but if i give different 
> address:
> 0.0.0.0:8000 I can see nothing it is not showing anything 
> 
> Actually I was giving this address cause wanted to see mysite from another 
> computer 
> and don't know why it is not working
> 

Peter of the Norse
rahmc...@radio1190.org



-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4D4E4799-4A8F-48A8-A0EF-535BFFB8DFA0%40Radio1190.org.
For more options, visit https://groups.google.com/d/optout.


Re: Django on CentOS

2015-11-10 Thread James Schneider
I would strongly suggest abandoning trying to fix the import problem until
you either a) verify that you have recompiled mod_wsgi with the correct
Python version or b) switch to a distribution that uses a supported version
of Python by default.

At this point, you are wasting time and you may not even be able to fix it
without a supported version of Python being used by Apache/mod_wsgi. It's
like trying to fix a flat tire on a car and expecting it to be able to
drive when you know the engine is missing.

Also, if you have a virtualenv that has the correct Python version on that
system, you'll need to verify that mod_wsgi is using that Python
interpreter, but that won't work with your current version of mod_wsgi.

-James
On Nov 10, 2015 6:16 AM, "Robin Fourcade"  wrote:

> Thanks Matthias,
>
> I set* os.environ.setdefault("DJANGO_SETTINGS_MODULE",
> "pizza_club.settings") in my wsgi.py*
> Now I have *ImportError: Could not import settings 'pizza_club.settings'
> (Is it on sys.path?): No module named pizza_club.settings, referer:
> http://www.pizzaclub.fr/ *
>
> Is that what you meant ? Because the problem is still there. :/
>
>
> --
>
> Thanks Timothy,
> I'll check the link you gave me. :)
>
> Thanks again,
>
> Robin
>
> --
> 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...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5f9f331a-ad44-48cd-9068-8326212423d2%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciXaKCjD1XjQMo5xELVGWLNuyA2N2QfL0sajMTCqPD95YA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


simplify query

2015-11-10 Thread miguel angel lopez mendo
 a = Clientes.objects.filter( Nombre__startswith='A').order_by('Nombre')
 b = Clientes.objects.filter( Nombre__startswith='B').order_by('Nombre')
 c = Clientes.objects.filter( Nombre__startswith='C').order_by('Nombre')
 d = Clientes.objects.filter( Nombre__startswith='D').order_by('Nombre')
 e = Clientes.objects.filter( Nombre__startswith='E').order_by('Nombre')
 f = Clientes.objects.filter( Nombre__startswith='F').order_by('Nombre')
 g = Clientes.objects.filter( Nombre__startswith='G').order_by('Nombre')
 h = Clientes.objects.filter( Nombre__startswith='H').order_by('Nombre')
 i = Clientes.objects.filter( Nombre__startswith='I').order_by('Nombre')
 j = Clientes.objects.filter( Nombre__startswith='J').order_by('Nombre')
 k = Clientes.objects.filter( Nombre__startswith='K').order_by('Nombre')
 l = Clientes.objects.filter( Nombre__startswith='L').order_by('Nombre')
 m = Clientes.objects.filter( Nombre__startswith='M').order_by('Nombre')
 n = Clientes.objects.filter( Nombre__startswith='N').order_by('Nombre')
 o = Clientes.objects.filter( Nombre__startswith='O').order_by('Nombre')
 p = Clientes.objects.filter( Nombre__startswith='P').order_by('Nombre')

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/33797eb2-d9c0-424a-8bb0-18f2115d8f7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: simplify query

2015-11-10 Thread lukewm

Haven't run this code, but you could try something like:

```
import string

myletters = string.ascii_letters[:16]
objects = []
order = 'Nombre'
for letter in myletters:
filters = {'Nombre__startswith': letter}

objects.append(Clientes.objects.filter(**filters).order_by(order)

```

Hope that helps,
Luke

On 2015-11-10 17:06, miguel angel lopez mendo wrote:

a = Clientes.objects.filter( Nombre__startswith='A').order_by('Nombre')
 b = Clientes.objects.filter( 
Nombre__startswith='B').order_by('Nombre')
 c = Clientes.objects.filter( 
Nombre__startswith='C').order_by('Nombre')
 d = Clientes.objects.filter( 
Nombre__startswith='D').order_by('Nombre')
 e = Clientes.objects.filter( 
Nombre__startswith='E').order_by('Nombre')
 f = Clientes.objects.filter( 
Nombre__startswith='F').order_by('Nombre')
 g = Clientes.objects.filter( 
Nombre__startswith='G').order_by('Nombre')
 h = Clientes.objects.filter( 
Nombre__startswith='H').order_by('Nombre')
 i = Clientes.objects.filter( 
Nombre__startswith='I').order_by('Nombre')
 j = Clientes.objects.filter( 
Nombre__startswith='J').order_by('Nombre')
 k = Clientes.objects.filter( 
Nombre__startswith='K').order_by('Nombre')
 l = Clientes.objects.filter( 
Nombre__startswith='L').order_by('Nombre')
 m = Clientes.objects.filter( 
Nombre__startswith='M').order_by('Nombre')
 n = Clientes.objects.filter( 
Nombre__startswith='N').order_by('Nombre')
 o = Clientes.objects.filter( 
Nombre__startswith='O').order_by('Nombre')
 p = Clientes.objects.filter( 
Nombre__startswith='P').order_by('Nombre')


--
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cf2478d08409aba7e461763a0a1c7cae%40riseup.net.
For more options, visit https://groups.google.com/d/optout.


Re: simplify query

2015-11-10 Thread miguel angel lopez mendo




i have the next view but it does not work  



also have the model 







the error is the follow



El martes, 10 de noviembre de 2015, 10:14:02 (UTC-6), luk...@riseup.net 
escribió:
>
> Haven't run this code, but you could try something like: 
>
> ``` 
>  import string 
>
>  myletters = string.ascii_letters[:16] 
>  objects = [] 
>  order = 'Nombre' 
>  for letter in myletters: 
>  filters = {'Nombre__startswith': letter} 
>   
> objects.append(Clientes.objects.filter(**filters).order_by(order) 
> ``` 
>
> Hope that helps, 
> Luke 
>
> On 2015-11-10 17:06, miguel angel lopez mendo wrote: 
> > a = Clientes.objects.filter( Nombre__startswith='A').order_by('Nombre') 
> >  b = Clientes.objects.filter( 
> > Nombre__startswith='B').order_by('Nombre') 
> >  c = Clientes.objects.filter( 
> > Nombre__startswith='C').order_by('Nombre') 
> >  d = Clientes.objects.filter( 
> > Nombre__startswith='D').order_by('Nombre') 
> >  e = Clientes.objects.filter( 
> > Nombre__startswith='E').order_by('Nombre') 
> >  f = Clientes.objects.filter( 
> > Nombre__startswith='F').order_by('Nombre') 
> >  g = Clientes.objects.filter( 
> > Nombre__startswith='G').order_by('Nombre') 
> >  h = Clientes.objects.filter( 
> > Nombre__startswith='H').order_by('Nombre') 
> >  i = Clientes.objects.filter( 
> > Nombre__startswith='I').order_by('Nombre') 
> >  j = Clientes.objects.filter( 
> > Nombre__startswith='J').order_by('Nombre') 
> >  k = Clientes.objects.filter( 
> > Nombre__startswith='K').order_by('Nombre') 
> >  l = Clientes.objects.filter( 
> > Nombre__startswith='L').order_by('Nombre') 
> >  m = Clientes.objects.filter( 
> > Nombre__startswith='M').order_by('Nombre') 
> >  n = Clientes.objects.filter( 
> > Nombre__startswith='N').order_by('Nombre') 
> >  o = Clientes.objects.filter( 
> > Nombre__startswith='O').order_by('Nombre') 
> >  p = Clientes.objects.filter( 
> > Nombre__startswith='P').order_by('Nombre') 
>
>

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3d5d787d-1813-4912-873e-622b08058129%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: simplify query

2015-11-10 Thread lukewm
Check your indentation, it's off starting from the line below `import 
string`. My email

client kinda borked my indentation, so you need to take care.

On 2015-11-10 17:30, miguel angel lopez mendo wrote:



i have the next view but it does not work



also have the model







the error is the follow



El martes, 10 de noviembre de 2015, 10:14:02 (UTC-6), luk...@riseup.net
escribió:


Haven't run this code, but you could try something like:

```
 import string

 myletters = string.ascii_letters[:16]
 objects = []
 order = 'Nombre'
 for letter in myletters:
 filters = {'Nombre__startswith': letter}

objects.append(Clientes.objects.filter(**filters).order_by(order)
```

Hope that helps,
Luke

On 2015-11-10 17:06, miguel angel lopez mendo wrote:
> a = Clientes.objects.filter( Nombre__startswith='A').order_by('Nombre')
>  b = Clientes.objects.filter(
> Nombre__startswith='B').order_by('Nombre')
>  c = Clientes.objects.filter(
> Nombre__startswith='C').order_by('Nombre')
>  d = Clientes.objects.filter(
> Nombre__startswith='D').order_by('Nombre')
>  e = Clientes.objects.filter(
> Nombre__startswith='E').order_by('Nombre')
>  f = Clientes.objects.filter(
> Nombre__startswith='F').order_by('Nombre')
>  g = Clientes.objects.filter(
> Nombre__startswith='G').order_by('Nombre')
>  h = Clientes.objects.filter(
> Nombre__startswith='H').order_by('Nombre')
>  i = Clientes.objects.filter(
> Nombre__startswith='I').order_by('Nombre')
>  j = Clientes.objects.filter(
> Nombre__startswith='J').order_by('Nombre')
>  k = Clientes.objects.filter(
> Nombre__startswith='K').order_by('Nombre')
>  l = Clientes.objects.filter(
> Nombre__startswith='L').order_by('Nombre')
>  m = Clientes.objects.filter(
> Nombre__startswith='M').order_by('Nombre')
>  n = Clientes.objects.filter(
> Nombre__startswith='N').order_by('Nombre')
>  o = Clientes.objects.filter(
> Nombre__startswith='O').order_by('Nombre')
>  p = Clientes.objects.filter(
> Nombre__startswith='P').order_by('Nombre')




--
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7313f8b774c308c97b7f5a8c7095ae45%40riseup.net.
For more options, visit https://groups.google.com/d/optout.


Re: How do I add permissions in admin for proxy model?

2015-11-10 Thread frocco
Just an update.
This is now working in django 1.8.6

On Monday, November 9, 2015 at 3:31:35 PM UTC-5, frocco wrote:
>
> I have 
>
> class qry485Missing(Tracking):
> class Meta:
> proxy = True
> permissions = (
> ("qry485Missing_display", "May display information"),
> ("qry485Missing_edit", "May edit information"),
> )
> verbose_name = "485 Missing"
> verbose_name_plural = "485 Missing"
>
>
> This does not show up in admin to allow users access.
>
> I have to grant superuser status to see it.
>
>
> Thanks
>
>

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/92614be4-f54f-4e34-ab91-d98e7784e1ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: simplify query

2015-11-10 Thread miguel angel lopez mendo


ya lo acomode pero aun asi me manda este error



Te dejo mi template para que veas tambien 







{% for clientes in objects %}





Nombre del Cliente: {{ 
cliente.Nombre}}

Medio por el cual llego: {{ 
cliente.get_medio_display}} 



{% endfor %}



{% endblock %}

El martes, 10 de noviembre de 2015, 10:36:25 (UTC-6), luk...@riseup.net 
escribió:
>
> Check your indentation, it's off starting from the line below `import 
> string`. My email 
> client kinda borked my indentation, so you need to take care. 
>
> On 2015-11-10 17:30, miguel angel lopez mendo wrote: 
> > <
> https://lh3.googleusercontent.com/-y6iDerxsJQM/VkIbpx5j19I/Agw/OYdyYTRJgME/s1600/Captura%2Bde%2Bpantalla%2B2015-11-10%2Ba%2Blas%2B10.30.09%2Ba.m..png>
>  
>
> > 
> > i have the next view but it does not work 
> > 
> > <
> https://lh3.googleusercontent.com/-4PPNOaFeJOI/VkIa2AhLQbI/Agg/0VyNoj7bMvw/s1600/Captura%2Bde%2Bpantalla%2B2015-11-10%2Ba%2Blas%2B10.26.32%2Ba.m..png>
>  
>
> > 
> > also have the model 
> > 
> > 
> > <
> https://lh3.googleusercontent.com/-qCaTL7AhvTQ/VkIbR0E2jqI/Ago/82RRntPAfzM/s1600/Captura%2Bde%2Bpantalla%2B2015-11-10%2Ba%2Blas%2B10.28.43%2Ba.m..png>
>  
>
> > 
> > <
> https://lh3.googleusercontent.com/-y6iDerxsJQM/VkIbpx5j19I/Agw/OYdyYTRJgME/s1600/Captura%2Bde%2Bpantalla%2B2015-11-10%2Ba%2Blas%2B10.30.09%2Ba.m..png>
>  
>
> > 
> > 
> > the error is the follow 
> > 
> > 
> > 
> > El martes, 10 de noviembre de 2015, 10:14:02 (UTC-6), luk...@riseup.net 
> > escribió: 
> >> 
> >> Haven't run this code, but you could try something like: 
> >> 
> >> ``` 
> >>  import string 
> >> 
> >>  myletters = string.ascii_letters[:16] 
> >>  objects = [] 
> >>  order = 'Nombre' 
> >>  for letter in myletters: 
> >>  filters = {'Nombre__startswith': letter} 
> >> 
> >> objects.append(Clientes.objects.filter(**filters).order_by(order) 
> >> ``` 
> >> 
> >> Hope that helps, 
> >> Luke 
> >> 
> >> On 2015-11-10 17:06, miguel angel lopez mendo wrote: 
> >> > a = Clientes.objects.filter( 
> Nombre__startswith='A').order_by('Nombre') 
> >> >  b = Clientes.objects.filter( 
> >> > Nombre__startswith='B').order_by('Nombre') 
> >> >  c = Clientes.objects.filter( 
> >> > Nombre__startswith='C').order_by('Nombre') 
> >> >  d = Clientes.objects.filter( 
> >> > Nombre__startswith='D').order_by('Nombre') 
> >> >  e = Clientes.objects.filter( 
> >> > Nombre__startswith='E').order_by('Nombre') 
> >> >  f = Clientes.objects.filter( 
> >> > Nombre__startswith='F').order_by('Nombre') 
> >> >  g = Clientes.objects.filter( 
> >> > Nombre__startswith='G').order_by('Nombre') 
> >> >  h = Clientes.objects.filter( 
> >> > Nombre__startswith='H').order_by('Nombre') 
> >> >  i = Clientes.objects.filter( 
> >> > Nombre__startswith='I').order_by('Nombre') 
> >> >  j = Clientes.objects.filter( 
> >> > Nombre__startswith='J').order_by('Nombre') 
> >> >  k = Clientes.objects.filter( 
> >> > Nombre__startswith='K').order_by('Nombre') 
> >> >  l = Clientes.objects.filter( 
> >> > Nombre__startswith='L').order_by('Nombre') 
> >> >  m = Clientes.objects.filter( 
> >> > Nombre__startswith='M').order_by('Nombre') 
> >> >  n = Clientes.objects.filter( 
> >> > Nombre__startswith='N').order_by('Nombre') 
> >> >  o = Clientes.objects.filter( 
> >> > Nombre__startswith='O').order_by('Nombre') 
> >> >  p = Clientes.objects.filter( 
> >> > Nombre__startswith='P').order_by('Nombre') 
> >> 
> >> 
>
>

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/659bc80d-b2ad-4e3c-8dc1-d57ac603f255%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: simplify query

2015-11-10 Thread Luke M
Yo no se verdaderamente si estas 'trolling' ... pero bueno, si no, puedo
decirte exactamente lo que pasa - usas `objects.appened` en lugar de
`objects.append`, a ver:
https://docs.python.org/3/tutorial/datastructures.html#more-on-lists

Despues el 'for' loop, tienes una lista de listas que son objetos de
filtro que contiene los resultos de lo que has buscado.

Eso es algo differente en comparacion de lo que ya tuviste cuando
pasaste el `Clientes` objeto dentro el template.

On 10.11.2015 17:46, miguel angel lopez mendo wrote:
> ya lo acomode pero aun asi me manda este error
> 
> 
> 
> Te dejo mi template para que veas tambien 
> 
> 
> 
> 
> 
> 
> 
> {% for clientes in objects %}
> 
> 
> 
> 
> 
> Nombre del Cliente: {{
> cliente.Nombre}}
> 
> Medio por el cual llego: {{
> cliente.get_medio_display}} 
> 
> 
> 
> {% endfor %}
> 
> 
> 
> {% endblock %}
> 
> 
> El martes, 10 de noviembre de 2015, 10:36:25 (UTC-6), luk...@riseup.net
> escribió:
> 
> Check your indentation, it's off starting from the line below `import
> string`. My email
> client kinda borked my indentation, so you need to take care.
> 
> On 2015-11-10 17:30, miguel angel lopez mendo wrote:
> >
> 
>  
> >
> 
> >
> > i have the next view but it does not work
> >
> >
> 
>  
> >
> 
> >
> > also have the model
> >
> >
> >
> 
>  
> >
> 
> >
> >
> 
>  
> >
> 
> >
> >
> > the error is the follow
> >
> >
> >
> > El martes, 10 de noviembre de 2015, 10:14:02 (UTC-6),
> luk...@riseup.net
> > escribió:
> >>
> >> Haven't run this code, but you could try something like:
> >>
> >> ```
> >>  import string
> >>
> >>  myletters = string.ascii_letters[:16]
> >>  objects = []
> >>  order = 'Nombre'
> >>  for letter in myletters:
> >>  filters = {'Nombre__startswith': letter}
> >>
> >> objects.append(Clientes.objects.filter(**filters).order_by(order)
> >> ```
> >>
> >> Hope that helps,
> >> Luke
> >>
> >> On 2015-11-10 17:06, miguel angel lopez mendo wrote:
> >> > a = Clientes.objects.filter(
> Nombre__startswith='A').order_by('Nombre')
> >> >  b = Clientes.objects.filter(
> >> > Nombre__startswith='B').order_by('Nombre')
> >> >  c = Clientes.objects.filter(
> >> > Nombre__startswith='C').order_by('Nombre')
> >> >  d = Clientes.objects.filter(
> >> > Nombre__startswith='D').order_by('Nombre')
> >> >  e = Clientes.objects.filter(
> >> > Nombre__startswith='E').order_by('Nombre')
> >> >  f = Clientes.objects.filter(
> >> > Nombre__startswith='F').order_by('Nombre')
> >> >  g = Clientes.objects.filter(
> >> > Nombre__startswith='G').order_by('Nombre')
> >> >  h = Clientes.objects.filter(
> >> > Nombre__startswith='H').order_by('Nombre')
> >> >  i = Clientes.objects.filter(
> >> > Nombre__startswith='I').order_by('Nombre')
> >> >  j = Clientes.objects.filter(
> >> > Nombre__startswith='J').order_by('Nombre')
> >> >  k = Clientes.objects.filter(
> >> > Nombre__startswith='K').order_by('Nombre')
> >> >  l = Clientes.objects.filter(
> >> > Nombre__startswith='L').order_by('Nombre')
> >> >  m = Clientes.objects.filter(
> >> > Nombre__startswith='M').order_by('Nombre')
> >> >  n = Clientes.objects.filter(
> >> > Nombre__startswith='N').order_by('Nombre')
> >> >  o = Clientes.objects.filter(
> >> > Nombre__startswith='O

Re: Django on CentOS

2015-11-10 Thread Robin Fourcade
Thanks James,
I looked at many tutorials like:

https://www.digitalocean.com/community/tutorials/how-to-install-the-django-web-framework-on-centos-7
https://devops.profitbricks.com/tutorials/deploy-django-with-virtualenv-on-centos-6/

Neither of these are for python 3.7 or higher. :/
i would gladly use higher version of python but I can't find any tutorial 
about it. :/

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bcff03a3-b9a5-4c76-b216-647a369de536%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: simplify query

2015-11-10 Thread miguel angel lopez mendo
Jajaja para nada de hecho ya quedo lo deje asi para cualquiera que lo 
necesite:


---view--

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')
medios = Clientes.objects.order_by('tipo')
abecedario = string.ascii_letters[:26]
objects = []
order = 'Nombre'
for letra in abecedario:
filters = {'Nombre__startswith': letra}
objects.append({letra : 
Clientes.objects.filter(**filters).order_by(order) })
template = 'products/Clientes.html'
return render(request, template, locals())


template---




{% for letra in objects %}
{% for key, clientes in letra.items %}
   
 {{key}}
  
{% for cliente in clientes %}
  Nombre del Cliente: {{ cliente.Nombre }} {{ 
cliente.Apellido}}
  Medio por el cual llego: {{ 
cliente.medio}} 



{% endfor %}

  
{% endfor %}
{% endfor %}





Muchas gracias por tu tiempo 

El martes, 10 de noviembre de 2015, 11:25:17 (UTC-6), Luke M escribió:
>
> Yo no se verdaderamente si estas 'trolling' ... pero bueno, si no, puedo 
> decirte exactamente lo que pasa - usas `objects.appened` en lugar de 
> `objects.append`, a ver: 
> https://docs.python.org/3/tutorial/datastructures.html#more-on-lists 
>
> Despues el 'for' loop, tienes una lista de listas que son objetos de 
> filtro que contiene los resultos de lo que has buscado. 
>
> Eso es algo differente en comparacion de lo que ya tuviste cuando 
> pasaste el `Clientes` objeto dentro el template. 
>
> On 10.11.2015 17:46, miguel angel lopez mendo wrote: 
> > ya lo acomode pero aun asi me manda este error 
> > <
> https://lh3.googleusercontent.com/-7SmUF6IDdxo/VkIfOsntrPI/Ag8/ohvr7a1ZWWU/s1600/Captura%2Bde%2Bpantalla%2B2015-11-10%2Ba%2Blas%2B10.44.43%2Ba.m..png>
>  
>
> > 
> > 
> > Te dejo mi template para que veas tambien 
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> > {% for clientes in objects %} 
> > 
> >  
> > 
> >  
> > 
> > Nombre del Cliente: {{ 
> > cliente.Nombre}} 
> > 
> > Medio por el cual llego: {{ 
> > cliente.get_medio_display}} 
> > 
> >  
> > 
> > {% endfor %} 
> > 
> >  
> > 
> > {% endblock %} 
> > 
> > 
> > El martes, 10 de noviembre de 2015, 10:36:25 (UTC-6), luk...@riseup.net 
> > escribió: 
> > 
> > Check your indentation, it's off starting from the line below 
> `import 
> > string`. My email 
> > client kinda borked my indentation, so you need to take care. 
> > 
> > On 2015-11-10 17:30, miguel angel lopez mendo wrote: 
> > > 
> > <
> https://lh3.googleusercontent.com/-y6iDerxsJQM/VkIbpx5j19I/Agw/OYdyYTRJgME/s1600/Captura%2Bde%2Bpantalla%2B2015-11-10%2Ba%2Blas%2B10.30.09%2Ba.m..png
>  
> > <
> https://lh3.googleusercontent.com/-y6iDerxsJQM/VkIbpx5j19I/Agw/OYdyYTRJgME/s1600/Captura%2Bde%2Bpantalla%2B2015-11-10%2Ba%2Blas%2B10.30.09%2Ba.m..png>>
>  
>
> > 
> > > 
> > > i have the next view but it does not work 
> > > 
> > > 
> > <
> https://lh3.googleusercontent.com/-4PPNOaFeJOI/VkIa2AhLQbI/Agg/0VyNoj7bMvw/s1600/Captura%2Bde%2Bpantalla%2B2015-11-10%2Ba%2Blas%2B10.26.32%2Ba.m..png
>  
> > <
> https://lh3.googleusercontent.com/-4PPNOaFeJOI/VkIa2AhLQbI/Agg/0VyNoj7bMvw/s1600/Captura%2Bde%2Bpantalla%2B2015-11-10%2Ba%2Blas%2B10.26.32%2Ba.m..png>>
>  
>
> > 
> > > 
> > > also have the model 
> > > 
> > > 
> > > 
> > <
> https://lh3.googleusercontent.com/-qCaTL7AhvTQ/VkIbR0E2jqI/Ago/82RRntPAfzM/s1600/Captura%2Bde%2Bpantalla%2B2015-11-10%2Ba%2Blas%2B10.28.43%2Ba.m..png
>  
> > <
> https://lh3.googleusercontent.com/-qCaTL7AhvTQ/VkIbR0E2jqI/Ago/82RRntPAfzM/s1600/Captura%2Bde%2Bpantalla%2B2015-11-10%2Ba%2Blas%2B10.28.43%2Ba.m..png>>
>  
>
> > 
> > > 
> > > 
> > <
> https://lh3.googleusercontent.com/-y6iDerxsJQM/VkIbpx5j19I/Agw/OYdyYTRJgME/s1600/Captura%2Bde%2Bpantalla%2B2015-11-10%2Ba%2Blas%2B10.30.09%2Ba.m..png
>  
> > <
> https://lh3.googleusercontent.com/-y6iDerxsJQM/VkIbpx5j19I/Agw/OYdyYTRJgME/s1600/Captura%2Bde%2Bpantalla%2B2015-11-10%2Ba%2Blas%2B10.30.09%2Ba.m..png>>
>  
>
> > 
> > > 
> > > 
> > > the error is the follow 
> > > 
> > > 
> > > 
> > > El martes, 10 de noviembre de 2015, 10:14:02 (UTC-6), 
> > luk...@riseup.net 
> > > escribió: 
> > >> 
> > >> Haven't run this code, but you could try something like: 
> > >> 
> > >> ``` 
> > >>  import string 
> > >> 
> > >>  myletters = string.ascii_letters[:16] 
> > >>  objects = [] 
> > >>  order = 'Nombre' 
> > >>  for letter in myletters: 
> > >>  filters = {'Nombre__startswith': letter} 
> > >> 
> > >> obj

Re: How do I server my app in apache in subdirectory?

2015-11-10 Thread Fred Stluka

frocco,

I've done exactly that.  No problem.  How does it fail?  What it
should be doing is redirecting any URLs like /mysite to the
wsgi.py file so Django will handle them.  What error or bad
behavior do you see?

--Fred

Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.

On 11/10/15 9:39 AM, frocco wrote:

Hello,

In httpd.conf this works

WSGIScriptAlias / C:/MAMP/htdocs/django/vnatracking/vnatracking/wsgi.py

however if I change it to

WSGIScriptAlias /mysite 
C:/MAMP/htdocs/django/vnatracking/vnatracking/wsgi.py


it fails

Instead of localhost, I want localhost/mysite

Thanks


--
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...@googlegroups.com 
.
To post to this group, send email to django-users@googlegroups.com 
.

Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/17150f3f-77e1-4c86-b5b7-939eb3dfde20%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/564248FA.6050608%40bristle.com.
For more options, visit https://groups.google.com/d/optout.


Re: django-admin.py startproject mysite

2015-11-10 Thread Fred Stluka

Muhammad,

Use the command ifconfig (Linux, Mac) or ipconfig (Windows) to
see your local IP address.

--Fred

Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.

On 11/10/15 10:08 AM, Peter of the Norse wrote:

0.0.0.0 is not an actual IP address.  You can’t put it in your browser.  
Instead, you need to find your computer’s IP address and use that.  How you 
find it depends on your OS, but once you do, then you can visit 
http://192.168.0.5:8000/ (for example).


On Nov 4, 2015, at 5:50 PM, Muhammad Asamov  wrote:

HI
I was wodering whether someone can hepl me with startproject

The thing is when I am running startproject from the server ip 127.0.0.1:8000
which was created automaticly i can see the result but if i give different 
address:
0.0.0.0:8000 I can see nothing it is not showing anything

Actually I was giving this address cause wanted to see mysite from another 
computer
and don't know why it is not working


Peter of the Norse
rahmc...@radio1190.org





--
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5642495E.90603%40bristle.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I server my app in apache in subdirectory?

2015-11-10 Thread frocco
I get a 404 error

WSGIScriptAlias /mysite 
C:/MAMP/htdocs/django/vnatracking/vnatracking/wsgi.py


>

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f3f0dee5-7328-4834-8b38-d547bf75587f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Need example of how to use a select2 widget for a manytomanyfield in django.

2015-11-10 Thread Mark London
I want to use a select2 widget to a manytomanyfield in django.  There are 
several django-select2 modules, but the documentation on all of them is 
confusing.   Can someone point me to a simple example of how to use a 
select2 widget for a manytomanyfield?  Thanks. - Mark 


-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/86bf48b6-72b9-47e5-8912-28599a871f9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Dashboard packages?

2015-11-10 Thread Allison Ahn
Hi all, 

I'd like to get an idea of what dashboard packages Django developers prefer 
or are using instead of the out-of-box admin. 

Al. 

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/77b1a024-3b50-47bb-aa11-7f3fe8683153%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Dashboard packages?

2015-11-10 Thread Luis Zárate
take a look https://www.djangopackages.com/search/?q=dashboard

2015-11-10 20:47 GMT-06:00 Allison Ahn :

> Hi all,
>
> I'd like to get an idea of what dashboard packages Django developers
> prefer or are using instead of the out-of-box admin.
>
> Al.
>
> --
> 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...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/77b1a024-3b50-47bb-aa11-7f3fe8683153%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
"La utopía sirve para caminar" Fernando Birri

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyOfyX5OcXpGgSL_1R8L5k8AG8%2BTu2u0ywefB2Pq-RB4tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Need example of how to use a select2 widget for a manytomanyfield in django.

2015-11-10 Thread Mark London
I just discovered django-select2-forms.  It does exactly what I want, very 
simple to implement.

On Tuesday, November 10, 2015 at 5:08:46 PM UTC-5, Mark London wrote:
>
> I want to use a select2 widget to a manytomanyfield in django.  There are 
> several django-select2 modules, but the documentation on all of them is 
> confusing.   Can someone point me to a simple example of how to use a 
> select2 widget for a manytomanyfield?  Thanks. - Mark 
>
>
>

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/72a75a99-75ef-4a22-ac4b-1d9382bb2312%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Dashboard packages?

2015-11-10 Thread Allison Ahn
I am more expecting from developers' own experiences and inputs, but this 
will do for the time being. Thanks, luisza14

On Wednesday, November 11, 2015 at 2:24:27 PM UTC+11, luisza14 wrote:
>
> take a look https://www.djangopackages.com/search/?q=dashboard
>
> 2015-11-10 20:47 GMT-06:00 Allison Ahn >:
>
>> Hi all, 
>>
>> I'd like to get an idea of what dashboard packages Django developers 
>> prefer or are using instead of the out-of-box admin. 
>>
>> Al. 
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/77b1a024-3b50-47bb-aa11-7f3fe8683153%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> "La utopía sirve para caminar" Fernando Birri
>
>
>

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7d4747f8-9aa0-4a4f-b145-3b23e392489f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Dashboard packages?

2015-11-10 Thread Lachlan Musicman
I'll be honest - I was intimidated at first, but eventually, the shell.
Dango-extension's shell_plus is quite good as well.

cheers
L.

--
The most dangerous phrase in the language is, "We've always done it this
way."

- Grace Hopper

On 11 November 2015 at 15:36, Allison Ahn  wrote:

> I am more expecting from developers' own experiences and inputs, but this
> will do for the time being. Thanks, luisza14
>
> On Wednesday, November 11, 2015 at 2:24:27 PM UTC+11, luisza14 wrote:
>>
>> take a look https://www.djangopackages.com/search/?q=dashboard
>>
>> 2015-11-10 20:47 GMT-06:00 Allison Ahn :
>>
>>> Hi all,
>>>
>>> I'd like to get an idea of what dashboard packages Django developers
>>> prefer or are using instead of the out-of-box admin.
>>>
>>> Al.
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/77b1a024-3b50-47bb-aa11-7f3fe8683153%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> "La utopía sirve para caminar" Fernando Birri
>>
>>
>> --
> 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...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7d4747f8-9aa0-4a4f-b145-3b23e392489f%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGBeqiPOeDubyn-A6csAuTQbH5fuYVHgET9evL%2BpizKSW%3Dm-hg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


empty filter fields displaying entire queryset

2015-11-10 Thread Daniel Sears
I want to create a list view that searches a large dataset. But it seems 
that if I use a filterset with empty defaults, then my view displays my 
entire dataset.

If tried creating a get_queryset method in my view that detects whether my 
filter fields are empty, but this doesn't seem to have any effect:

from django_filters.views import FilterView
from .filters import ProductFilter

class ProductView(FilterView):
filterset_class = ProductFilter
template_name = 'product_filter.html'

def get_queryset(self):
qs = super(ProductView, self).get_queryset()
if '' not in self.request.GET.items():
return qs.none()
else:
return qs

I looked at and experimented with STRICTNESS, but it didn't seem to have 
any effect either. How can I create a view that refrains from displaying 
data until I give it valid filter fields?

Thanks.

-- 
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c10caaab-879b-44fe-ba35-4886b08d2ca9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.