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

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

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

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? >

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:

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

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

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

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

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

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

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

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

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

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

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 │

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

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

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,

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

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

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

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

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")

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

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

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

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

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:

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

Re: django 1.8 and wsgi_mod

2015-04-28 Thread Abhaya Agarwal
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