Re: Problem installing fixtures

2016-02-11 Thread Carlos Leite
Are you moving the content of your old database to a new one ? Sorry, if I answer the obvious, but when you move, it seems that the IDs of your content type has change. And the DATABASE point you an error "violates foreign key constraint" auth permission has a generic relation were a

How to let users to block private messages in Django-postman?

2016-02-11 Thread Lukas B.
Hi all, I have instlled django-postman but it works great. However I'd like to allow users to opt for not receiving any private messages. I'm wondering how the easiest way to do so? I've looked at the docs but could not

Re: manage.py --keepdb VS DataMigration as Initial Data

2016-02-11 Thread Carlos Leite
Exactly . thanks. I'm happy i'm not alone ;) ... and did nothing wrong. .. I was thinking what could be done in the core to solve... The easyiest way, is keeping flushing data at the end of the tests, but run data inserts in migrations when the tests starts, even when --keepdb is present ...

Re: __unicode__ rather than __str__ in Part 2 of 'Writing you first Django app"?

2016-02-11 Thread Simon Charette
Hi John, The tutorial is oriented towards Python 3 users where the `str` type is the equivalent of the Python 2 `unicode` hence why defining `__str__` is suggested. You'll notice that all models example suggest decorating model classes with the `python_2_unicode_compatible` decorator if you

__unicode__ rather than __str__ in Part 2 of 'Writing you first Django app"?

2016-02-11 Thread JHeasly
In "Writing your first Django app, part 2" (https://docs.djangoproject.com/en/1.9/intro/tutorial02/), it's outlines adding a __str__() method to your models. But if you've got a unicode string that's called in the admin, you're going to get a big, unfriendly UnicodeEncodeError error when you

Re: manage.py --keepdb VS DataMigration as Initial Data

2016-02-11 Thread Tim Graham
You might be running into the same problem reported in https://code.djangoproject.com/ticket/25251#comment:3 On Thursday, February 11, 2016 at 1:16:20 PM UTC-5, Carlos Leite wrote: > > Hi there, > > I'm running a Django==1.8 app > I read in the docs [1], to consider doing a data migration to

manage.py --keepdb VS DataMigration as Initial Data

2016-02-11 Thread Carlos Leite
Hi there, I'm running a Django==1.8 app I read in the docs [1], to consider doing a data migration to load initial data on db, since initial fixture is consider deprecated since 1.7. Well, to keep my app up-to-date I choose to load "initial data" trough a data migration. My problem, SEEMS to

Re: Django Multiple User Login

2016-02-11 Thread Avraham Serour
maybe you can create your own session model that is related to multiple users On Thu, Feb 11, 2016 at 5:33 PM, Andreas Kuhne wrote: > You can't? > > Not without logging out the previous user. > > The session itself is used to contain a reference to the current user.

Re: Django Multiple User Login

2016-02-11 Thread Andreas Kuhne
You can't? Not without logging out the previous user. The session itself is used to contain a reference to the current user. You can only have one session to a certain domain (for example www.example.com and app.example.com are 2 different domains). The only way for the other user to login is to

Re: Django Multiple User Login

2016-02-11 Thread jorrit787
I'm just being curious here but in what scenario would you have multiple people logging in at the same time using the same computer/browser? On Thursday, February 11, 2016 at 1:30:21 PM UTC+1, Aakash Tewari wrote: > > Hello > > > Here is new one I guess. > > We have 3 types of users say A, B,

Re: Front End and Back End separation

2016-02-11 Thread Dheerendra Rathor
For validation, I tend to write very lousy validations in JS. Serializers handle most of the validations in BE itself. If you want to depend on JSON, then you can write JSON schema validation in BE and use the same schema validation in JS. We tend to write BE such that it remains compatible with

Re: use django logging from outside

2016-02-11 Thread Det S. Pillner
On Saturday, January 23, 2016 at 11:38:31 AM UTC+1, James Schneider wrote: > > > On Jan 20, 2016 2:35 AM, "Det S. Pillner" > wrote: > > > > Hi all, > > > > I work on a django project. I use very heavy logging in this project. > Some parts of code needs to start over a

Django Multiple User Login

2016-02-11 Thread Aakash Tewari
Hello Here is new one I guess. We have 3 types of users say A, B, C. All have 3 different login pages on same domain. We have extended User model by OneToOne relationship like this class AModel(models.Model): users = models.OneToOneField(User, on_delete=models.CASCADE) is_A =

Django Freelancers Durban

2016-02-11 Thread mohammed sohail Ebrahim
*Seeking a Python/Django Developer to complete an existing project.* Your C.V will be required as well as a display of some of your work if possible. *Remuneration is market related. Depending on performance, a fulltime position can be negotiated.* Email: mohammedsohail.ebra...@gmail.com --

Re: How to update a live / deployed Django project?

2016-02-11 Thread Rok Jaklič
We are using two git branches, one for development and master. When dev branch is good enough, we merge it to master and then we have a script which does git pull and restarts uwsgi. Rok On Wednesday, February 10, 2016 at 9:50:22 AM UTC+1, Tobias Dacoir wrote: > > We've build a small web

Re: Front End and Back End separation

2016-02-11 Thread Radek Svarz
Thanks for supporting my gut feeling :) - ad validation - do you somehow propagate the validation rules to the FE app? Or do you need to rewrite some of them in JS? - ad app versioning - how do you give the impulse towards FE app that it needs to reload itself in order to be

Re: How to update a live / deployed Django project?

2016-02-11 Thread Tobias Dacoir
Thanks for all the great input. I'll definetely look into salt too (only worked with puppet so far) but for now I guess fabric will be fine. We are using Python 2.7 everywhere anyway. Like I said, right now we plan to host it on a single physical machine that we get from the university (it's