Re: Best way to switch from mysql to postgres?

2016-05-11 Thread Gergely Polonkai
Hello, this depends on a lot of factors, like the anatomy of your models and signals. I have a model which is is not administered, but every time I create a user, a new row is added by a signal. This way, loading such a dump is impossible without some modifications to these signals. All in all, i

Re: Best way to switch from mysql to postgres?

2016-05-11 Thread John Griebel
What is the error you are getting? -- 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 t

Django model form pre-populating fields with my NT Login value

2016-05-11 Thread Robert Prince
My first experience using django, python and bootstrap to build an application - I am struggling a bit. The application is in development and does not have a login screen yet. My issue in this instance, I have a model form which creates and updates eight field values to define and store databas

Best way to switch from mysql to postgres?

2016-05-11 Thread anton
hi, I have a django (1.8.13) project running on windows 7 64 bit + python 2.7.10 (32bit). Actually it runs with mysql (precise: mariadb) and I tried the following: 1. commandline:> manage.py dumpdata -o dumpdata.json 2. then I switch the engine to postgres in my django settings file (the empt

Re: Why don't I see my category ForeignKey field in related Model

2016-05-11 Thread Bill Freeman
This is a many to many relation. One contact can have multiple relations, according to your text, but clearly, more than one contact can be family, etc. And if, instead, each contact can have only one relation, then the ForeignKey goes in the Resource (contact) model, not the Relationship (catego

Re: pass link value in argument for view

2016-05-11 Thread quentin ladrier
sorry for the delay . I obtain this kind of error message: NoReverseMatch at /my_views/my_arg/ . Reverse for 'xxx' with arguments '(my_arg,)' and keyword arguments '{}' not found. 1 pattern(s) tried: ['my_views/(?P\d+)$'] Le lundi 9 mai 2016 17:03:56 UTC+2, C. Kirby a écrit : > > Please provid

Re: How to atomically create and lock an object?

2016-05-11 Thread Simon Charette
Hi Carsten, Did you try using select_for_update() with get_or_create()[1] in an atomic()[2] context? @transation.atomic def demonstrate_the_problem(): d = date.today() t = TestModel.objects.select_for_update().get_or_create( jahr=d.year, monat=d.month ) # ... long `some_v

How to atomically create and lock an object?

2016-05-11 Thread Carsten Fuchs
Dear Django group, please consider this code: from datetime import date from django.db import models class TestModel(models.Model): jahr = models.SmallIntegerField() monat = models.SmallIntegerField() some_value = models.SmallIntegerField() class M

Why don't I see my category ForeignKey field in related Model

2016-05-11 Thread Bruce Whealton
Hello all, I think that my problem here is Django specific and not necessarily a reflection on my understanding of relational databases (hopefully). I did post about this previously and thought I had figured out what to do. I have a Django app that stores information on Contacts.

Re: ubuntu+nginx+django urlpatterns 404 not found

2016-05-11 Thread minom du
this is apache config ServerAdmin webmaster@localhost DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /static /home/minom/project/school/static Require all granted WSGIScriptAlias / /ho

south schemamigration merge two tables into one

2016-05-11 Thread schaf . mh
Hi All, this is my first schemamigration and it is done on Django 1.6 with south. I have a model class 'book' which derives from 'media' and extends it. Now I decided that this splitting is not needed. Therefore I decided to merge the data from 'media' into 'book' My idea was to keep the table 'b