Re: 1.8, django-extensions, ipython notebook no models?

2015-04-28 Thread Lachlan Musicman
I have added

NOTEBOOK_ARGUMENTS = [
'--ip=0.0.0.0',
'--port=8989',
]

to my base.py

and the notebook launches on port 8989 as expected, so the settings are
being read properly. Hmmm.

--
let's build quiet armies friends, let's march on their glass towers...let's
build fallen cathedrals and make impractical plans

- GYBE

On 29 April 2015 at 11:21, Lachlan Musicman  wrote:

> Running
>
> $ ./manage.py shell_plus --ipython
>
> works fine - all models are imported
>
> L.
>
> --
> let's build quiet armies friends, let's march on their glass
> towers...let's build fallen cathedrals and make impractical plans
>
> - GYBE
>
> On 29 April 2015 at 11:15, Lachlan Musicman  wrote:
>
>> Hi,
>>
>> Using Django 1.8, django-extensions 1.5.2, ipython 3.1.0 in a virtualenv
>>
>> I can't get access to my models at all?
>>
>> All of the following fail:
>>
>> d = Document()
>>
>> from models import *
>> from app.models import *
>> from proj.app.models import *
>>
>> i am loading from within venv with
>>
>> $ ./manage.py shell_plus --notebook
>>
>> My settings are:
>>
>> IPYTHON_ARGUMENTS = [
>> '--ext', 'django_extensions.management.notebook_extension',
>> '--debug',
>> ]
>>
>>
>> My dir layout is:
>>
>> .
>> ├── fraser
>> │   ├── __init__.py
>> │   ├── settings
>> │   │   ├── base.py
>> │   │   ├── dev.py
>> │   │   └── __init__.py
>> │   ├── urls.py
>> │   └── wsgi.py
>> ├── manage.py
>> ├── texts
>> │   ├── admin.py
>> │   ├── __init__.py
>> │   ├── models.py
>> │   ├── tests.py
>> │   └── views.py
>> └── utils
>> └── archive_import.ipynb
>>
>> Any tips greatly appreciated.
>>
>> cheers
>> L.
>>
>>
>> --
>> let's build quiet armies friends, let's march on their glass
>> towers...let's build fallen cathedrals and make impractical plans
>>
>> - GYBE
>>
>
>

-- 
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/CAGBeqiO7xQeY7ieJvVarYBiS%3DAa8j5dU9aeki-3b0URjAGji%2BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: 1.8, django-extensions, ipython notebook no models?

2015-04-28 Thread Lachlan Musicman
Running

$ ./manage.py shell_plus --ipython

works fine - all models are imported

L.

--
let's build quiet armies friends, let's march on their glass towers...let's
build fallen cathedrals and make impractical plans

- GYBE

On 29 April 2015 at 11:15, Lachlan Musicman  wrote:

> Hi,
>
> Using Django 1.8, django-extensions 1.5.2, ipython 3.1.0 in a virtualenv
>
> I can't get access to my models at all?
>
> All of the following fail:
>
> d = Document()
>
> from models import *
> from app.models import *
> from proj.app.models import *
>
> i am loading from within venv with
>
> $ ./manage.py shell_plus --notebook
>
> My settings are:
>
> IPYTHON_ARGUMENTS = [
> '--ext', 'django_extensions.management.notebook_extension',
> '--debug',
> ]
>
>
> My dir layout is:
>
> .
> ├── fraser
> │   ├── __init__.py
> │   ├── settings
> │   │   ├── base.py
> │   │   ├── dev.py
> │   │   └── __init__.py
> │   ├── urls.py
> │   └── wsgi.py
> ├── manage.py
> ├── texts
> │   ├── admin.py
> │   ├── __init__.py
> │   ├── models.py
> │   ├── tests.py
> │   └── views.py
> └── utils
> └── archive_import.ipynb
>
> Any tips greatly appreciated.
>
> cheers
> L.
>
>
> --
> let's build quiet armies friends, let's march on their glass
> towers...let's build fallen cathedrals and make impractical plans
>
> - GYBE
>

-- 
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/CAGBeqiNN9vm4j3zYSBOMXAZObq6u_71VYRf6LkhC3n04aLqtWw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


1.8, django-extensions, ipython notebook no models?

2015-04-28 Thread Lachlan Musicman
Hi,

Using Django 1.8, django-extensions 1.5.2, ipython 3.1.0 in a virtualenv

I can't get access to my models at all?

All of the following fail:

d = Document()

from models import *
from app.models import *
from proj.app.models import *

i am loading from within venv with

$ ./manage.py shell_plus --notebook

My settings are:

IPYTHON_ARGUMENTS = [
'--ext', 'django_extensions.management.notebook_extension',
'--debug',
]


My dir layout is:

.
├── fraser
│   ├── __init__.py
│   ├── settings
│   │   ├── base.py
│   │   ├── dev.py
│   │   └── __init__.py
│   ├── urls.py
│   └── wsgi.py
├── manage.py
├── texts
│   ├── admin.py
│   ├── __init__.py
│   ├── models.py
│   ├── tests.py
│   └── views.py
└── utils
└── archive_import.ipynb

Any tips greatly appreciated.

cheers
L.


--
let's build quiet armies friends, let's march on their glass towers...let's
build fallen cathedrals and make impractical plans

- GYBE

-- 
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/CAGBeqiMbkr2Z0bEJMBdeGheM-n0R1ocWbqXWBye7WpwbTO1Ceg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: MercadoPago Applications

2015-04-28 Thread Neto
Franciso, faça sua pergunta no Django Brasil, pode ser mais fácil conseguir 
uma resposta https://groups.google.com/forum/#!forum/django-brasil

Em terça-feira, 28 de abril de 2015 14:16:26 UTC-3, Francisco Roldan 
escreveu:
>
> Buenas tardes, alguien integró MercadoPago Applications a Django?
> Yo tengo implementado MercadoPago en algunos proyectos para recibir pagos, 
> pero ahora en un proyecto necesito que los usuarios puedan recibir pagos de 
> otros usuarios y que el sitio se quede con una comisión, para ello 
> supuestamente está MercadoPago MarketPlace, alguien lo utilizó?
>
> Gracias
>

-- 
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/ff48e2bb-6c59-4ab0-b880-995811856618%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pyodbc: Works in Plain Python, Django 1.8 Shell Throws Error

2015-04-28 Thread Matthew Woodward
Thanks for the response! Turns out that it was actually a bug in pyodbc
that's already been fixed:
https://github.com/mkleehammer/pyodbc/issues/38

Working for me now, or at least the import is. :-) Running into another
issue that'll hopefully be fixed soon:
https://github.com/mkleehammer/pyodbc/issues/40
https://github.com/mkleehammer/pyodbc/issues/41

Thanks again for the input!

On Tue, Apr 28, 2015 at 3:54 PM Ederson Mota Pereira 
wrote:

> Hi Matt,
>
> I have been through something similar some days ago.
>
> Reverting to the 3.0.7 pyodbc version worked for me.
>
> If you are using pip, maybe you will need to use --allow-external and
> --allow-unverified flags. Be warned of the security issues of doing
> something like this.
>
> Att,
>
> On Mon, Apr 27, 2015 at 1:38 PM, Matt Woodward 
> wrote:
>
>> Running into a bit of an odd problem I hope someone can help with.
>>
>> Envrionment:
>> * Ubuntu Server 14.04, 64-bit (Vagrant box)
>> * Python 3.4
>> * Django 1.8
>> * pyodbc 3.0.8
>>
>> pyodbc installs fine. When I do python3 and then import pyodbc, that
>> works fine.
>>
>> When I do python3 manage.py shell and then import pyodbc, however, I get
>> this:
>> http://pastebin.com/cNDrmvcb
>>
>> Got a bit of help in IRC with someone suggested to turn on pdb trace on
>> the run_shell command, which I did, but then I just get this:
>> *** SystemError: initialization of pyodbc raised unreported exception
>>
>> I just can't figure out why it'd work in a plain python interpreter but
>> not in the Django shell, and I'm not sure how to diagnose or troubleshoot
>> further.
>>
>> Appreciate any tips or suggestions anyone might have. 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/949d8be7-8ca2-499d-90eb-aa621498b038%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/Krnd1cN7YX0/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAAJxEYskHp3SLs8AWZ5p1Zge0mQHhFtUOBQ-5TShfhU-DNrVYQ%40mail.gmail.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/CAETQs1%3DmyB0jpMqmLnP1xWzOTs7fjxbX%2BQ2W%2B-W_eBfc-EZFeA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: pyodbc: Works in Plain Python, Django 1.8 Shell Throws Error

2015-04-28 Thread Ederson Mota Pereira
Hi Matt,

I have been through something similar some days ago.

Reverting to the 3.0.7 pyodbc version worked for me.

If you are using pip, maybe you will need to use --allow-external and
--allow-unverified flags. Be warned of the security issues of doing
something like this.

Att,

On Mon, Apr 27, 2015 at 1:38 PM, Matt Woodward 
wrote:

> Running into a bit of an odd problem I hope someone can help with.
>
> Envrionment:
> * Ubuntu Server 14.04, 64-bit (Vagrant box)
> * Python 3.4
> * Django 1.8
> * pyodbc 3.0.8
>
> pyodbc installs fine. When I do python3 and then import pyodbc, that works
> fine.
>
> When I do python3 manage.py shell and then import pyodbc, however, I get
> this:
> http://pastebin.com/cNDrmvcb
>
> Got a bit of help in IRC with someone suggested to turn on pdb trace on
> the run_shell command, which I did, but then I just get this:
> *** SystemError: initialization of pyodbc raised unreported exception
>
> I just can't figure out why it'd work in a plain python interpreter but
> not in the Django shell, and I'm not sure how to diagnose or troubleshoot
> further.
>
> Appreciate any tips or suggestions anyone might have. 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/949d8be7-8ca2-499d-90eb-aa621498b038%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/CAAJxEYskHp3SLs8AWZ5p1Zge0mQHhFtUOBQ-5TShfhU-DNrVYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to rename crfstoken

2015-04-28 Thread Russell Keith-Magee
Hi Vermus,

Yes, the form value is currently hard coded.

I can't think of any particular reason that this shouldn't be configurable
though. If you're looking to get into Django development, it would be a
fairly easy feature to contribute - there isn't that much code required to
implement the change, and the docs and tests will be pretty straightforward.

Yours,
Russ Magee %-)

On Tue, Apr 28, 2015 at 5:27 PM, Vermus  wrote:

>
> ok, i renamed cookie name,
> but what about rename input name "csrfmiddlewaretoken" of {% csrf_token %}
> ?
>
> as i see it is harcoded?
>
> http://stackoverflow.com/questions/27087626/rename-csrfmiddlewaretoken
>
>
> вторник, 28 апреля 2015 г., 11:28:36 UTC+3 пользователь Vermus написал:
>>
>>
>> Oh, I missed this setting, stupid (i think, it is new for me, i'm using
>> django since 1.0)
>> 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/52f0c198-fb37-4389-9da8-34ce18cb6625%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/CAJxq84-NvvNd%3Dji-eE5L_C0Owz0MGrjCvu8Ox_X0q0%3DoiBxRFQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Context manager to pick which database to use?

2015-04-28 Thread Peter Coles
Thanks for the reply Simon. Yeah, I’m using `using` for now, just thought 
it’d be nice to somehow wrap the logic, especially if it could magically 
pass through to underlying function calls. I am experimenting with having a 
`readonly` manager that just adds a `.using('readonly')`, dunno how 
~djangonic~ that is.

Cheers,
Peter

On Tuesday, April 28, 2015 at 3:58:15 PM UTC-4, Simon Charette wrote:
>
> Hi Peter,
>
> I think you could use database routers to declare the default behavior and 
> rely on the using() queryset method 
> 
>  
> for the exceptional case?
>
> I'm afraid the introduction of a context manager would require the 
> addition of a thread-local global state that a database router could rely 
> on.
>
> Simon
>
> Le mardi 28 avril 2015 15:26:48 UTC-4, Peter Coles a écrit :
>>
>> When using multiple databases, I would love for a simple way to declare 
>> which database should be used during execution of django ORM calls. Perhaps 
>> this could even use a context manager and look something like this:
>>
>> # declare that all calls within this context should default to using 
>> 'readonly' db instead of 'default'
>> with database('readonly'):
>> things = models.MyThing.objects.all()
>>
>>
>> # inside this function call the 'readonly' db would be used too 
>> (unless overridden by `.using(...)`)
>> more_things = some_lib.some_function(things)
>>
>> In my app I have a write database and a read-only replica. The read-only 
>> replica might have a delay, so I don’t want to use it in normal live 
>> requests, but I would like certain dashboards to use it. For this reason I 
>> assume that the database router 
>>  
>> approach doesn't properly apply?
>>
>> Does something like this exist? If not, any thoughts on if it might be 
>> useful and where I might consider poking around in the ORM?
>>
>

-- 
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/fdcec8f6-4b00-43c0-8584-77ba68c9d61c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Context manager to pick which database to use?

2015-04-28 Thread Simon Charette
Hi Peter,

I think you could use database routers to declare the default behavior and 
rely on the using() queryset method 

 
for the exceptional case?

I'm afraid the introduction of a context manager would require the addition 
of a thread-local global state that a database router could rely on.

Simon

Le mardi 28 avril 2015 15:26:48 UTC-4, Peter Coles a écrit :
>
> When using multiple databases, I would love for a simple way to declare 
> which database should be used during execution of django ORM calls. Perhaps 
> this could even use a context manager and look something like this:
>
> # declare that all calls within this context should default to using 
> 'readonly' db instead of 'default'
> with database('readonly'):
> things = models.MyThing.objects.all()
>
>
> # inside this function call the 'readonly' db would be used too 
> (unless overridden by `.using(...)`)
> more_things = some_lib.some_function(things)
>
> In my app I have a write database and a read-only replica. The read-only 
> replica might have a delay, so I don’t want to use it in normal live 
> requests, but I would like certain dashboards to use it. For this reason I 
> assume that the database router 
>  
> approach doesn't properly apply?
>
> Does something like this exist? If not, any thoughts on if it might be 
> useful and where I might consider poking around in the ORM?
>

-- 
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/37dcc257-7515-40a0-98c6-c88b13cebcc8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Context manager to pick which database to use?

2015-04-28 Thread Peter Coles
Or maybe more versatile would be a context manager that accepts a database 
router. Something like the following?

with database_router(my_router):
   …



On Tuesday, April 28, 2015 at 3:26:48 PM UTC-4, Peter Coles wrote:
>
> When using multiple databases, I would love for a simple way to declare 
> which database should be used during execution of django ORM calls. Perhaps 
> this could even use a context manager and look something like this:
>
> # declare that all calls within this context should default to using 
> 'readonly' db instead of 'default'
> with database('readonly'):
> things = models.MyThing.objects.all()
>
>
> # inside this function call the 'readonly' db would be used too 
> (unless overridden by `.using(...)`)
> more_things = some_lib.some_function(things)
>
> In my app I have a write database and a read-only replica. The read-only 
> replica might have a delay, so I don’t want to use it in normal live 
> requests, but I would like certain dashboards to use it. For this reason I 
> assume that the database router 
>  
> approach doesn't properly apply?
>
> Does something like this exist? If not, any thoughts on if it might be 
> useful and where I might consider poking around in the ORM?
>

-- 
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/05bf8620-35be-49cf-b10c-6bb00d0923ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Context manager to pick which database to use?

2015-04-28 Thread Peter Coles
When using multiple databases, I would love for a simple way to declare 
which database should be used during execution of django ORM calls. Perhaps 
this could even use a context manager and look something like this:

# declare that all calls within this context should default to using 
'readonly' db instead of 'default'
with database('readonly'):
things = models.MyThing.objects.all()


# inside this function call the 'readonly' db would be used too (unless 
overridden by `.using(...)`)
more_things = some_lib.some_function(things)

In my app I have a write database and a read-only replica. The read-only 
replica might have a delay, so I don’t want to use it in normal live 
requests, but I would like certain dashboards to use it. For this reason I 
assume that the database router 
 
approach doesn't properly apply?

Does something like this exist? If not, any thoughts on if it might be 
useful and where I might consider poking around in the ORM?

-- 
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/29ff5aae-044b-472c-9939-280bc480bc9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: MercadoPago Applications

2015-04-28 Thread Rafael E. Ferrero
Francisco, lamento no poder ayudarte (por otra parte somos casi vecinos, yo
vivo en San Francisco Cba.)
Te aconsejo que reformules la pregunta traduciéndola al inglés porque acá
casi todos (por no decir todos) hablan inglés.

Saludos !!

--
Rafael E. Ferrero

2015-04-28 13:47 GMT-03:00 Francisco Roldan :

> Buenas tardes, alguien integró MercadoPago Applications a Django?
> Yo tengo implementado MercadoPago en algunos proyectos para recibir pagos,
> pero ahora en un proyecto necesito que los usuarios puedan recibir pagos de
> otros usuarios y que el sitio se quede con una comisión, para ello
> supuestamente está MercadoPago MarketPlace, alguien lo utilizó?
>
> Gracias
>
> --
> 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/a0e7a350-0e91-454a-a597-e26781cf1ac2%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/CAJJc_8XEHWHW%3D%3DBDGO%3D_58fXt_y9KcRa%2B0H7w7%2BcTA3%3Di%3D85Eg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


MercadoPago Applications

2015-04-28 Thread Francisco Roldan
Buenas tardes, alguien integró MercadoPago Applications a Django?
Yo tengo implementado MercadoPago en algunos proyectos para recibir pagos, 
pero ahora en un proyecto necesito que los usuarios puedan recibir pagos de 
otros usuarios y que el sitio se quede con una comisión, para ello 
supuestamente está MercadoPago MarketPlace, alguien lo utilizó?

Gracias

-- 
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/a0e7a350-0e91-454a-a597-e26781cf1ac2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How do I use database views in django

2015-04-28 Thread David Levy
How do I use database views in django, many falão that view must be mapped 
same table, but it should certainly give problems using the migration.

What is the best alternative to be used in this situation? heard in django-
datatable-view is an alternative?

-- 
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/1dd72a65-83fe-4a5a-b63d-c2dee8bd889f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django 1.8 and wsgi_mod

2015-04-28 Thread dk


I check the apache httpd log  and do get this

[Tue Apr 28 10:33:49.982311 2015] [:error] [pid 18060] [client 
10.35.0.91:61408] from django.apps import apps
[Tue Apr 28 10:33:49.982336 2015] [:error] [pid 18060] [client 
10.35.0.91:61408] ImportError: No module named apps
[Tue Apr 28 10:33:52.595973 2015] [:error] [pid 18061] [client 
10.35.0.91:61410] mod_wsgi (pid=18061): 
Target WSGI script '/code/projects/my_web/wsgi/my.wsgi' cannot be loaded as 
Python module.
[Tue Apr 28 10:33:52.596033 2015] [:error] [pid 18061] [client 
10.35.0.91:61410] mod_wsgi (pid=18061):
Exception occurred processing WSGI script 
'/code/projects/my_web/wsgi/my.wsgi'.

I think is the No module named apps is causing this =(



this is the folder structure.
├── my_web
│   ├── core (i rename this so i know where all the original django files 
are)
│   │   ├── __init__.py
│   │   ├── settings.py
│   │   ├── urls.py
│   │   ├── urls.pyc
│   │   ├── wsgi.py
│   ├── db.sqlite3
│   ├── __init__.py
│   ├── manage.py
│   ├── mes (this is my only app i did)
│   │   ├── admin.py
│   │   ├── __init__.py
│   │   ├── migrations
│   │   ├── models.py
│   │   ├── templates
│   │   │   └── mes
│   │   ├── urls.py
│   │   ├── views.py
│   ├── static
│   │   ├── images
│   │   ├── style
│   │   │   └── style.css
│   ├── templates
│   │   ├── main_page.html
│   │   └── main_template.html
│   └── wsgi
│   ├── idrac.wsgi (here is the wsgi)
│   ├── __init__.py
│   └── readme.txt
└── __init__.py


and this is how i activated the app
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'mes',
)

everything works fine if i do it from manage.py runserver

-- 
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/eb93da19-cf70-4005-9137-207e6cd2ab9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django 1.8 and wsgi_mod

2015-04-28 Thread dk

my folder structure is like this

├── my_web
│   ├── core (i rename this so i know where all the original django files 
are)
│   │   ├── __init__.py
│   │   ├── settings.py
│   │   ├── urls.py
│   │   ├── urls.pyc
│   │   ├── wsgi.py
│   ├── db.sqlite3
│   ├── __init__.py
│   ├── manage.py
│   ├── mes (this is my only app i did)
│   │   ├── admin.py
│   │   ├── __init__.py
│   │   ├── migrations
│   │   ├── models.py
│   │   ├── templates
│   │   │   └── mes
│   │   ├── urls.py
│   │   ├── views.py
│   ├── static
│   │   ├── images
│   │   ├── style
│   │   │   └── style.css
│   ├── templates
│   │   ├── main_page.html
│   │   └── main_template.html
│   └── wsgi
│   ├── idrac.wsgi (here is the wsgi)
│   ├── __init__.py
│   └── readme.txt
└── __init__.py





On Tuesday, April 28, 2015 at 10:41:25 AM UTC-5, dk wrote:

>
> I check the apache httpd log  and do get this
>
> [Tue Apr 28 10:33:49.982311 2015] [:error] [pid 18060] [client 
> 10.35.0.91:61408] from django.apps import apps
> [Tue Apr 28 10:33:49.982336 2015] [:error] [pid 18060] [client 
> 10.35.0.91:61408] ImportError: No module named apps
>
> [Tue Apr 28 10:33:52.595973 2015] [:error] [pid 18061] [client 
> 10.35.0.91:61410] mod_wsgi (pid=18061): 
> Target WSGI script '/code/projects/my_web/wsgi/my.wsgi' cannot be loaded 
> as Python module.
> [Tue Apr 28 10:33:52.596033 2015] [:error] [pid 18061] [client 
> 10.35.0.91:61410] mod_wsgi (pid=18061):
> Exception occurred processing WSGI script 
> '/code/projects/my_web/wsgi/my.wsgi'.
>
> I think is the No module named apps is causing this =(
>
> On Tuesday, April 28, 2015 at 1:28:04 AM UTC-5, Abhaya wrote:
>
>> This looks fine. Are there any errors in the web server logs?
>>
>> Regards,
>> Abhaya
>>
>> On Mon, Apr 27, 2015 at 10:23 PM, dk  wrote:
>>
>>> we decided to test django 1.8,  using python manage.py runserver works 
>>> great.  but now the production wsgi stop working, 
>>> I remember there was a change between version 1.6 and 1.7.  
>>> this is my code.   Did it something change?
>>>
>>> import os
>>> import sys
>>> sys.path.append("/code/projects/my_web")
>>> sys.path.append("/code/projects/my_web/core") # path to the project
>>> os.environ["DJANGO_SETTINGS_MODULE"]= "core.settings"
>>>
>>>
>>> *from django.core.wsgi import get_wsgi_applicationapplication = 
>>> get_wsgi_application()*
>>>
>>> #this is the way for django 1.6
>>> #import django.core.handlers.wsgi
>>> #application = django.core.handlers.wsgi.WSGIHandler()
>>>
>>> thanks guys.
>>>
>>> -- 
>>> 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/2d130a53-d9e4-404e-bf79-ba4f1df492dc%40googlegroups.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> -
>> blog: http://abhaga.blogspot.com
>> Twitter: http://twitter.com/abhaga
>> -
>>  
>

-- 
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/86fde726-c224-470e-b011-cde4e6beca48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django 1.8 and wsgi_mod

2015-04-28 Thread dk

I check the apache httpd log  and do get this

[Tue Apr 28 10:33:49.982311 2015] [:error] [pid 18060] [client 
10.35.0.91:61408] from django.apps import apps
[Tue Apr 28 10:33:49.982336 2015] [:error] [pid 18060] [client 
10.35.0.91:61408] ImportError: No module named apps

[Tue Apr 28 10:33:52.595973 2015] [:error] [pid 18061] [client 
10.35.0.91:61410] mod_wsgi (pid=18061): 
Target WSGI script '/code/projects/my_web/wsgi/my.wsgi' cannot be loaded as 
Python module.
[Tue Apr 28 10:33:52.596033 2015] [:error] [pid 18061] [client 
10.35.0.91:61410] mod_wsgi (pid=18061):
Exception occurred processing WSGI script 
'/code/projects/my_web/wsgi/my.wsgi'.

I think is the No module named apps is causing this =(

On Tuesday, April 28, 2015 at 1:28:04 AM UTC-5, Abhaya wrote:

> This looks fine. Are there any errors in the web server logs?
>
> Regards,
> Abhaya
>
> On Mon, Apr 27, 2015 at 10:23 PM, dk > 
> wrote:
>
>> we decided to test django 1.8,  using python manage.py runserver works 
>> great.  but now the production wsgi stop working, 
>> I remember there was a change between version 1.6 and 1.7.  
>> this is my code.   Did it something change?
>>
>> import os
>> import sys
>> sys.path.append("/code/projects/my_web")
>> sys.path.append("/code/projects/my_web/core") # path to the project
>> os.environ["DJANGO_SETTINGS_MODULE"]= "core.settings"
>>
>>
>> *from django.core.wsgi import get_wsgi_applicationapplication = 
>> get_wsgi_application()*
>>
>> #this is the way for django 1.6
>> #import django.core.handlers.wsgi
>> #application = django.core.handlers.wsgi.WSGIHandler()
>>
>> thanks guys.
>>
>> -- 
>> 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/2d130a53-d9e4-404e-bf79-ba4f1df492dc%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> -
> blog: http://abhaga.blogspot.com
> Twitter: http://twitter.com/abhaga
> -
>  

-- 
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/34e206be-20a4-47e5-aa75-f4fdcfb09a17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: forcing user model to return first_name last_name if exists

2015-04-28 Thread Carl Meyer
On 04/28/2015 09:10 AM, Ilya Kazakevich wrote:
> I have many places in my app where user (from user model) is displayed:
> templates, forms, fliters, tables etc.
> It is displayed as username everywhere.
> 
> I want it to be displayed as first_name/last_name.
> 
> I can do that with monkey patching:
> 
> @receiver(request_started)
> def patch(*args, **kwargs):
> get_user_model().__str__ = my_smart_str_func
> 
> I use "request_started" to make sure all models are loaded. (BTW, does
> there is something like "models loaded" signal?).

Not a signal; the proper place for code like this in Django 1.7+ is in
an AppConfig.ready() method.

> How ever, I feel it a little bit hacky. There should be more pythonic
> way to do that. Am I miss something?

Of course, the best way to do this is a custom User model so you don't
have to monkeypatch at all. Sadly, switching to a custom User model is
difficult if the project didn't start with one.

Carl

-- 
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/553FA98A.4060301%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


forcing user model to return first_name last_name if exists

2015-04-28 Thread Ilya Kazakevich
Hello,

I have many places in my app where user (from user model) is displayed: 
templates, forms, fliters, tables etc.
It is displayed as username everywhere.

I want it to be displayed as first_name/last_name.

I can do that with monkey patching:

@receiver(request_started)
def patch(*args, **kwargs):
get_user_model().__str__ = my_smart_str_func

I use "request_started" to make sure all models are loaded. (BTW, does 
there is something like "models loaded" signal?).

How ever, I feel it a little bit hacky. There should be more pythonic way 
to do that. Am I miss something?

-- 
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/b483b4a8-ee4a-4cdb-ad81-769fabf4b0ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to find a view in a complex web application

2015-04-28 Thread Andrew Farrell
If you are asking this question as a developer who wants to know what view
to use to affect a page when you know the url, I recommend you install The
Silver Searcher , which lets you run

$ ag 'some arbitrary text you might find on a page'

and it will quickly show you every place that text occurs in the entire
directory tree where you run the command. This will show you what template
is being rendered. Then, you can take the name of that template and do
something like.

$ ag 'orders/unfulfilled.html'

and you will see which view is rendering that template.

On Tue, Apr 28, 2015 at 9:04 AM, Derek  wrote:

> A quick "brain storm"...
>
> One idea could be to keep all the metadata for your views - their full
> name; abbreviated name; aliases (alternate names); URL; keywords; and
> categories etc. in a single table.  You could then use this table to
> generate *multiple* possible ways for a user to "find" the view they need.
>
> For example - you could present a list of categories (and sub-categories,
> and sub-sub-categories) which could be presented in a expandable list
> (jQuery-style).
>
> You could create a tag-cloud and allow a user to 'expand' a single tag
> into related-views.
>
> You could allow a user to create their own tags for searching and display
> (in a many-to-many table linked to user).
>
> You could allow a user to "favourite" some of the views and allow the user
> to easily see (list/sort/search) those.
>
> And, of course, a simple search button could be created to allow an
> 'incremental' display (auto-complete Google-style) of all possible matches
> from all fields in your table...
>
> I am sure there are other ways you could think of to generate navigation
> options, including fancy graphic ones!
>
> You would have to 'admin' this table of course, but the data in it could
> be changed dynamically (e.g. adding more categories and aliases) without
> affecting the logic of your app.
>
> [Hey - this could even make a cool app on its own!]
>
> Hope these ideas help  my project is a just a boring menu-driven one.
>
> Derek
>
>
> On Tuesday, 28 April 2015 11:27:47 UTC+2, guettli wrote:
>>
>> We have a complex intranet application.
>>
>> It has many view.
>>
>> The problem: How to find the view a user wants to use?
>>
>> A huge sitemap HTML does not help.
>>
>> Is there a way to search the matching view?
>>
>> Maybe even with auto complete?
>>
>>
>>  --
> 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/7509b96e-5445-4a2d-b584-4440e76975ca%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%2By5TLaeQaShO7cqYs%2BGu3rKX7%2Byr8-WWoXxunDFrbapBkC4Ug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to find a view in a complex web application

2015-04-28 Thread Derek
A quick "brain storm"...

One idea could be to keep all the metadata for your views - their full 
name; abbreviated name; aliases (alternate names); URL; keywords; and 
categories etc. in a single table.  You could then use this table to 
generate *multiple* possible ways for a user to "find" the view they need.

For example - you could present a list of categories (and sub-categories, 
and sub-sub-categories) which could be presented in a expandable list 
(jQuery-style).

You could create a tag-cloud and allow a user to 'expand' a single tag into 
related-views.

You could allow a user to create their own tags for searching and display 
(in a many-to-many table linked to user).

You could allow a user to "favourite" some of the views and allow the user 
to easily see (list/sort/search) those.

And, of course, a simple search button could be created to allow an 
'incremental' display (auto-complete Google-style) of all possible matches 
from all fields in your table...

I am sure there are other ways you could think of to generate navigation 
options, including fancy graphic ones!

You would have to 'admin' this table of course, but the data in it could be 
changed dynamically (e.g. adding more categories and aliases) without 
affecting the logic of your app.

[Hey - this could even make a cool app on its own!]

Hope these ideas help  my project is a just a boring menu-driven one.

Derek


On Tuesday, 28 April 2015 11:27:47 UTC+2, guettli wrote:
>
> We have a complex intranet application.
>
> It has many view.
>
> The problem: How to find the view a user wants to use?
>
> A huge sitemap HTML does not help.
>
> Is there a way to search the matching view?
>
> Maybe even with auto complete?
>
>
>

-- 
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/7509b96e-5445-4a2d-b584-4440e76975ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Reading Dynamic Checkbox in Django

2015-04-28 Thread Ken Nguyen
Hi Folks,

First time posting on here so if I violate any laws, please forgive me.  I 
also posted the same question 
on 
StackOverflow but didn't get any answers so I'm hoping this place will get 
more attention.

I'm having a hard time reading whether the checkbox is checked or not.  I 
created a formset with just the first_name and last_name since my initial 
page is only asking for those 2 information.  Once entered and validated, 
the next page will show a checkbox next to the duplicate names.

Here are the things that I've tried:

   - Changed the checkbox's name to iterate with the for-loop for 
   uniqueness.  (Regardless if I check the box or not, the results are always 
   the same {'overwrite': False}.)
   - Added the Boolean value with the first_name & last_name formset 
   (Result - 'ManagementForm data is missing or has been tampered with')

I think the problem lies with obtaining the 'POST' data.  Any help is much 
appreciated.


*Step 1*




*Step 2*



*Step 3* *- Output Expectation*

John Doe Location A 1 ("1" is checked)

James Smith Location A 0 ("0" is not checked)


*forms.py*

from django import forms
from django.forms.formsets import BaseFormSet


class UserInfo (forms.Form):

first_name = forms.CharField (max_length = 20, required = False)
last_name = forms.CharField (max_length = 20, required = False)
overwrite = forms.BooleanField (required = False)


class BaseUserInfoFormSet (BaseFormSet):

def clean (self):
if any (self.errors):
return

firstnames = []
lastnames = []
errors = []

for form in self.forms:
firstname = form.cleaned_data.get ('first_name')
lastname = form.cleaned_data.get ('last_name')

if ((firstname in firstnames) or (lastname in lastnames)) and 
len (errors) < 2:
errors.append ('First and/or last name must be unique')
if ((firstname == '') or (lastname == '')) and len (errors) < 2:
errors.append ('First and/or last name cannot be blanked')

firstnames.append (firstname)
lastnames.append (lastname)

if errors:
raise forms.ValidationError (errors)

return self.cleaned_data


#class DuplicateForm (forms.Form):
#overwrite = forms.BooleanField (required = False)

*views.py*

from django.shortcuts import render, render_to_response
from django.forms.formsets import formset_factory
from userinfo.forms import UserInfo
from userinfo.forms import BaseUserInfoFormSet
from userinfo.addName import webform


# Create your views here.
def addname (request):
UserInfoSet = formset_factory (UserInfo, formset = BaseUserInfoFormSet, 
extra = 2, max_num = 3)
if request.method == 'POST':
formset = UserInfoSet (request.POST)

if formset.is_valid ():
location = request.POST ['site']
names = formset.cleaned_data

request.session ['location'] = location
request.session ['names'] = names

for name in names:
firstname = name.get ('first_name')
lastname = name.get ('last_name')

if firstname and lastname:
webform (firstname, lastname, location)

context = {'names': names, 'location': location}
return render (request, 'userinfo/response.html', context)

else:
formset = UserInfoSet ()

context = {
'formset': formset,
'first_name_0': request.POST.get ('form-0-first_name', ''),
'last_name_0': request.POST.get ('form-0-last_name', ''),
'first_name_1': request.POST.get ('form-1-first_name', ''),
'last_name_1': request.POST.get ('form-1-last_name', ''),
}

return render (request, 'userinfo/addname.html', context)


def response (request):
location = request.session ['location']
names = request.session ['names']

UserInfoSet = formset_factory (UserInfo, formset = BaseUserInfoFormSet, 
extra = 2, max_num = 3)
if request.method == 'POST':
formset = UserInfoSet (request.POST)

if formset.is_valid ():
data = formset.cleaned_data
for duplicate in data:
overwrite = duplicate.get ('overwrite')

#if request.method == 'POST':
#form = DuplicateForm (request.POST)

#if form.is_valid ():
#data = form.cleaned_data

#for duplicate in data:
#overwrite = duplicate.get ('overwrite')


context = {'names': names, 'location': location, 'data': data}
return render (request, 'userinfo/results.html', context)

return render_to_response ('No valid data.')


*addname.html*





Add Name


 

UnicodeError while searching in haystack/whoosh index

2015-04-28 Thread Florian Schweikert
Hi,

I'm working on an django-cms 3.0.13/py2.7 page atm and came across an
weird behaviour using haystack with whoosh.

When using rebuild_index everything works fine.
But using update_index afterwards leads to an UnicodeDecodeError when
searching for a page with umlauts.
Error thrown in "whoosh/reading.py | expand_prefix"

Assuming I interpret the rebuild and update command code correct,
rebuild just calls update after clean. So why does it work with rebuild
but not with update?

I'm using an adapted version of search_indexes.py example of the
django-cms project.[1]

Any ideas/solutions?

Many thanks,
Florian

[1] http://fpaste.org/216170/30221364/

-- 
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/553F738A.8080204%40ist-total.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Using Anaconda with Apache on Windows?

2015-04-28 Thread Derek
I have previously created an installation for my Django project to run on
Linux, using mod_wsgi and Apache.  For these deployments, there is a
section in the django.wsgi script which initiates the virtualenv:

activate_env=os.path.expanduser("/path/to/venv/bin/activate_this.py")
execfile(activate_env, dict(__file__=activate_env))

Now I am using the Anaconda distribution to create an equivalent setup
running under Windows, but am not sure what combination/sequence of
instructions is needed to emulate the above section (because Anaconda has
its own approach to creating a virtual environment)?

Any help with this would be appreciated, as I am not a regular Windows or
Anaconda user.

Thanks
Derek

-- 
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/CAF1Wu3OKi%3D%3DseFaVN4BX4%2BvOdL2%3D0T6myjYLmDP1T4u2PN3-Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to find a view in a complex web application

2015-04-28 Thread aRkadeFR

I dont quite get your request.

Where is your starting point to search the user view?
When you say "a user wants to use", where does it
come from? A template view? A view_name maybe?
A URL?

On 04/28/2015 11:27 AM, guettli wrote:

We have a complex intranet application.

It has many view.

The problem: How to find the view a user wants to use?

A huge sitemap HTML does not help.

Is there a way to search the matching view?

Maybe even with auto complete?


--
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/b933d0e6-dcb4-4be2-90c3-aeb943924cdd%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/553F56F5.1020208%40arkade.info.
For more options, visit https://groups.google.com/d/optout.


How to find a view in a complex web application

2015-04-28 Thread guettli
We have a complex intranet application.

It has many view.

The problem: How to find the view a user wants to use?

A huge sitemap HTML does not help.

Is there a way to search the matching view?

Maybe even with auto complete?


-- 
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/b933d0e6-dcb4-4be2-90c3-aeb943924cdd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to rename crfstoken

2015-04-28 Thread Vermus

ok, i renamed cookie name,
but what about rename input name "csrfmiddlewaretoken" of {% csrf_token %}?

as i see it is harcoded?

http://stackoverflow.com/questions/27087626/rename-csrfmiddlewaretoken


вторник, 28 апреля 2015 г., 11:28:36 UTC+3 пользователь Vermus написал:
>
>
> Oh, I missed this setting, stupid (i think, it is new for me, i'm using 
> django since 1.0)
> 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/52f0c198-fb37-4389-9da8-34ce18cb6625%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to rename crfstoken

2015-04-28 Thread Vermus

Oh, I missed this setting, stupid (i think, it is new for me, i'm using 
django since 1.0)
thank you!


вторник, 28 апреля 2015 г., 10:51:11 UTC+3 пользователь Russell Keith-Magee 
написал:
>
> Hi Vermus,
>
> Calling this a security "breach" is a bit inaccurate; but I certainly 
> agree that it is good practice to make the framework undetectable from the 
> client side.
>
> That's why there's a setting that does exactly what you suggest:
>
> https://docs.djangoproject.com/en/1.8/ref/settings/#csrf-cookie-name
>
> Yours,
> Russ Magee %-)
>
>
>
>

-- 
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/1f957667-00f1-424d-a5d2-92c1fe20989c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to rename crfstoken

2015-04-28 Thread Russell Keith-Magee
Hi Vermus,

Calling this a security "breach" is a bit inaccurate; but I certainly agree
that it is good practice to make the framework undetectable from the client
side.

That's why there's a setting that does exactly what you suggest:

https://docs.djangoproject.com/en/1.8/ref/settings/#csrf-cookie-name

Yours,
Russ Magee %-)


On Tue, Apr 28, 2015 at 3:27 PM, Vermus  wrote:

> Hi, i found, that my site is detected by
> http://trends.builtwith.com/framework/Django-CSRF by crfstoken header.
> I think, it's security breach, when users know what framework is used on
> server side.
> There must have such web server tuning, that no one can detect framework
> and server side programming language.
>
> --
> 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/768a1d03-e749-428a-8094-4a2d2f27e873%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/CAJxq84_eWoKaAwpYWeGkMa%3DZMFNAh3Qxe0REqBtydDRPYRpBmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


How to rename crfstoken

2015-04-28 Thread Vermus
Hi, i found, that my site is detected 
by http://trends.builtwith.com/framework/Django-CSRF by crfstoken header.
I think, it's security breach, when users know what framework is used on 
server side.
There must have such web server tuning, that no one can detect framework 
and server side programming language.

-- 
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/768a1d03-e749-428a-8094-4a2d2f27e873%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.