Re: Migrating old users into custom user model

2015-08-25 Thread Carl Meyer
Hi Ben, On 08/25/2015 05:14 PM, Ben Wattie wrote: > Thanks for your reply. > If I figure it out I would surely submit doc, but it's more likely that > I will just come up with a workaround. Fair enough :-) > Starting a project with a custom user model every time just to avoid > this doesn't feel

Re: Turn off migrations completely in Django 1.7

2015-08-26 Thread Carl Meyer
Hi Grzegorz, > On Aug 26, 2015, at 2:25 AM, Grzegorz Stalmierski > wrote: > > W dniu 25.08.2015 o 19:04, Marcin Nowak pisze: >> >> I would like to provide solid patch as a pull request, but I'm afraid that >> it will be rejected due to some kind of spirit, politics or something else. >> >>

Re: Turn off migrations completely in Django 1.7

2015-08-26 Thread Carl Meyer
On 08/26/2015 08:15 AM, Carl Meyer wrote: > I agree, and I already suggested a new feature (`managed=False` at the > AppConfig level) for which I think a solid patch would most likely be > accepted. This new feature would be capable of handling the "don't > migrate anythin

Re: Django 1.7 migrations: Adding one field to User`s model

2015-08-26 Thread Carl Meyer
On 08/26/2015 12:18 PM, Marcin Nowak wrote: > > On 26 August 2015 at 20:09, Hugo Osvaldo Barrera > wrote: > > Oh, so the field you're adding in monkey patching contrib.auth.User? > IMHO, the design problem isn't django, but rather monkey-patching > models itse

Re: Django for data management in a no-UI application?

2015-09-08 Thread Carl Meyer
On 09/08/2015 04:06 PM, jsa...@nvidia.com wrote: > I have been planning to develop a standard web application using Django. > Due to a change in direction, the development plan has been changed to: > > 1. Develop a suite of no-GUI applications that run in a command line > window on a server.

Re: Oracle XMLType and AES_Encrypt() field

2015-09-12 Thread Carl Meyer
Hi Dan, On 09/11/2015 09:39 PM, Dan Davis wrote: ... > For both my EncryptedTextField and XMLTypeField, I want to to alter the > SQL that will be generated to query, insert, and update the field so > that XMLType field will be converted to a CLOB or text value with > .getClobValue() function. Si

Re: Oracle XMLType and AES_Encrypt() field

2015-09-15 Thread Carl Meyer
On 09/15/2015 12:44 PM, Dan Davis wrote: > I'm wondering how I would get python to run an interactive shell similar > to what I'd get from running ./manage.py shell. Why not just run `./manage.py shell`? In general, `DJANGO_SETTINGS_MODULE=myproject.settings python` is effectively equivalent to `

Re: Invalid HTTP_HOST, can someone explain why I am getting this?

2015-09-21 Thread Carl Meyer
On 09/21/2015 04:22 PM, François Schiettecatte wrote: > Not likely, all that is happening is that you are getting requests > where the ‘Host:’ HTTP header is not set or set to something other > than what is accepted by your site. Most likely a buggy client. I get > that all the time, I just ignore

Re: How to run all tests in INSTALLED_APPS with the new test runner 1.6?

2015-10-07 Thread Carl Meyer
On 10/07/2015 06:57 AM, jordi.gutierrez.herm...@ecometrica.org wrote: > Okay, I'll try grabbing the old test runner from git, thanks. That should work fine. You should be aware, though, that specifically in the case of the django.contrib app tests, we make no promise that they will pass under you

Re: Using South in Django 1.7+

2015-10-08 Thread Carl Meyer
Hi Remco, On 10/08/2015 04:26 AM, Remco Gerlich wrote: [snip] > Can South run on Django 1.7+ at all? Nope. At least not last I tried, and I don't think anyone has done anything on it since. It looked like it would need some major updating, since South integrates closely with the database backends

Re: duplicated selenium test fails

2015-10-20 Thread Carl Meyer
Hi Ulrich, On 10/19/2015 03:03 AM, Ulrich Laube wrote: > It boils down to this: > > I have a selenium test in a django project against the admin page. All > green. > If I duplicate the test class via copy and paste + renaming, then one is > green and one is red, despite containing the same code.

Re: duplicated selenium test fails

2015-10-21 Thread Carl Meyer
On 10/21/2015 02:55 AM, Ulrich Laube wrote: > Am 21.10.2015 um 00:18 schrieb Carl Meyer: >> On 10/19/2015 03:03 AM, Ulrich Laube wrote: >>> It boils down to this: >>> [...] >>> Is it a known problem? >> >> Not really a problem - you just need

Re: How to create a global management command?

2015-10-27 Thread Carl Meyer
Hi, On 10/27/2015 03:40 PM, bwv549 wrote: > I have some commands I'd like to include in the manage command (i.e., > like 'coverage'). How to make a global command? (I've written many > commands for apps, but wonder how to make one that isn't tied to any app). You can't. Management commands are

Re: include template which extends something else

2015-10-28 Thread Carl Meyer
Hi Sven, On 10/28/2015 09:50 AM, Sven Wanner wrote: > Thanks for your quick reply. Yes, this is also what I found, so I was > quite shure that my code will never work. What I try to do is to render > a list of database objects. But not only on one page but on different > pages and with slightly di

Re: include template which extends something else

2015-10-28 Thread Carl Meyer
On 10/28/2015 10:11 AM, Sven Wanner wrote: > Ok, it's a pitty, but you're totally right. Using if in my template > should be also fine. Not of that elegance I planned ;) , but will > definitely work, too. I'm not sure what you mean. I thought I just explained how you can use `extends` in an inclu

Re: include template which extends something else

2015-10-28 Thread Carl Meyer
On 10/28/2015 10:25 AM, Sven Wanner wrote: > Yes, sorry I was confused... No I don't get what you mean. I think thats > exactly what I tried to do. > > I have kind of a main.html doing that: > > {% block my-wall %} > > > {% for obj in objects %} > > {% include 'wall_item.h

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

2015-11-05 Thread Carl Meyer
Hi Tim, On 11/04/2015 05:36 PM, Tim Chase wrote: > Beginning a new project, I'd like to include functional testing in > addition to my unit tests. What are recommended best practices for > exercising form-classes? I was hoping to do something like > > c = django.test.Client() > results = c.

Re: following 302s in WebTest form.submit() (was Best practices for writing functional tests to exercise forms?

2015-11-13 Thread Carl Meyer
Hi Tim, On 11/13/2015 10:06 AM, Tim Chase wrote: > On 2015-11-09 12:41, Tim Chase wrote: >> On 2015-11-06 01:09, Carl Meyer wrote: >>> [1] https://pypi.python.org/pypi/WebTest >>> [2] https://pypi.python.org/pypi/django-webtest >> >> Just to follow up, djan

Re: Reducing redundancy in tests, logged-in vs. not-logged-in

2015-11-16 Thread Carl Meyer
> user is anonymous (and thus the test should fail) or logged in with > appropriate rights (and thus the test should pass). > > For context, this is being run within Django-WebTest as recommended > to me by Carl Meyer in case it has features I haven't yet encountered > that w

Re: List of available Jinja2 global symbols

2015-11-23 Thread Carl Meyer
On 11/22/2015 06:21 PM, Patrick Spencer wrote: > I see what you mean about not being about to have a global list of > symbols because everything is subject to change. But it would be nice to > have a default list of symbols available depending on the default > initial setup. Yes, the default addit

Re: Django imports models for apps that aren't enabled?

2016-01-05 Thread Carl Meyer
Hi Stodge, On 01/05/2016 08:57 AM, Stodge wrote: > I'm using Django 1.6.9. When the dev server (and hence Apache) starts, > is Django supposed to import models for apps that exist on disk, but > aren't enabled in the settings? I'm seeing this behaviour and I wasn't > expecting it. Thanks Django s

Re: Unintuitive behaviour of management commands with multiple databases

2016-02-02 Thread Carl Meyer
Hi Vinay, On 02/02/2016 08:11 AM, 'Vinay Sajip' via Django users wrote: > I've set up a simple project using with two databases, foo and bar in > settings.py: > > | > DATABASES ={ > 'foo':{ > 'ENGINE':'django.db.backends.sqlite3', > 'NAME':os.path.join(BASE_DIR,'foo.sqlite'),

Re: Unintuitive behaviour of management commands with multiple databases

2016-02-02 Thread Carl Meyer
Hi Vinay, On 02/02/2016 09:52 AM, 'Vinay Sajip' via Django users wrote: > > On Tuesday, February 2, 2016 at 3:27:10 PM UTC, Carl Meyer wrote: > > Nothing in your code ever "overrides" settings.DATABASES['default']. > > > Dear Carl, >

Re: Unintuitive behaviour of management commands with multiple databases

2016-02-02 Thread Carl Meyer
Hi Vinay, On 02/02/2016 10:56 AM, 'Vinay Sajip' via Django users wrote: > On Tuesday, February 2, 2016 at 5:08:40 PM UTC, Carl Meyer wrote: > > You can't (well, you might be able to by poking around in the internals > of the django.db.connections object, but

Re: Unintuitive behaviour of management commands with multiple databases

2016-02-02 Thread Carl Meyer
Hi Vinay, On 02/02/2016 12:14 PM, 'Vinay Sajip' via Django users wrote: > I'm not arguing for any particular different routing scheme to be > included - only for management commands to be able to be written to > respect --data arguments passed to them, and which can easily treat the > passed value

Re: Django project structure

2016-02-04 Thread Carl Meyer
Hi André, On 02/04/2016 02:05 PM, André Meyer-Vitali wrote: > There's quite some confusion here about the best way to structure a > Django project. > > I'm developing a photography related web site with a news section (based > on the poll tutorial) and a contest app (among others). The contest ap

Re: Django project structure

2016-02-04 Thread Carl Meyer
Hi André, On 02/04/2016 02:47 PM, André Meyer-Vitali wrote: > How would I modify my contest app so that it knows about multiple > contests? Database models (and queries), templates, forms, urls need to > be adapted, I guess. Is it sufficient to add an ID to the models such > that a specific month'

<    1   2   3