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 application using Django 1.8 over the past couple 
> of months and we are going live with version 1.0 soon (one last closed beta 
> test is coming up). 
> So far we have deployed it on an Ubuntu VM (in Azure) using Apache / Nginx 
> and a local MySQL Server.
>
> I've already found some good tutorials on how to properly set it up (
> http://rogueleaderr.com/post/65157477648/the-idiomatic-guide-to-deploying-django-in#disqus_thread
>  
> ) however what I am mising now is how to handle updates to our code.
>
> For our development server we have a git hook that automatically deploys 
> new commits to the server. However that often requires manual interaction - 
> running manage.py makemigrations etc. Sometimes Django also does not pick 
> up our changed models and we have to manually fiddle with the Database in 
> order to get it back running. We even had times where we lost all our data 
> since it was easier to just start with a new database. 
>
> Obviously this can't happen once we are live and obviously we want 
> downtime to be as small as possible. So is there any guide on how to update 
> code of a live, deployed Django application?
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0f5f95e5-c75f-4028-ab48-0dca2c5660eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: KeyboardInterrupt on production

2014-09-06 Thread Rok Jaklič
Thanks for explanation. 

On Friday, September 5, 2014 7:33:07 PM UTC+2, François Schiettecatte wrote:
>
> What is probably happening lower down in the stack that the browser is 
> closing a connection to the server before all the content is sent back 
> causing a broken pipe error which is being reported as a KeyboardInterrupt 
> exception by django. 
>
> Cheers 
>
> François 
>
> On Sep 5, 2014, at 4:03 AM, Rok Jaklič <rja...@gmail.com > 
> wrote: 
>
> > Hi, 
> > 
> > on our production environment we get random KeyboardInterrupt exceptions 
> being thrown (Bad gateway in browser), but we do not know where to even 
> start to look. 
> > 
> > We went through our raised exceptions but everything seems to be ok 
> there... 
> > 
> > Usually we get this if we click on links fast on page. 
> > 
> > Any ideas? 
> > 
> > Kind reagards, 
> > 
> > Rok 
> > 
> > -- 
> > 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/83958041-0e17-4f3c-b4ba-1a079982e76a%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/3a43924f-2215-4a37-947d-b25e8469cf35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


KeyboardInterrupt on production

2014-09-05 Thread Rok Jaklič
Hi,

on our production environment we get random KeyboardInterrupt exceptions 
being thrown (Bad gateway in browser), but we do not know where to even 
start to look.

We went through our raised exceptions but everything seems to be ok there...

Usually we get this if we click on links fast on page.

Any ideas?

Kind reagards,

Rok

-- 
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/83958041-0e17-4f3c-b4ba-1a079982e76a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Custom auth backend and importing custom user model

2013-08-12 Thread Rok Jaklič
Hi,

I wrote custom auth backend, however when I try to import custom user model 
I get an error like:
ImportError: cannot import name "CustomUser" 

even though I have in custom_auth.py from users.models import CustomUser.

I found out that custom_auth.py is called before custom models.

Any ideas how could I solve this problem?

Kind regards,

Rok


-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Custom authentication backend

2013-07-19 Thread Rok Jaklič
Found an answer here:
http://stackoverflow.com/questions/10874675/why-does-django-need-a-database-for-custom-authentication-backends

On Thursday, July 18, 2013 1:12:04 PM UTC+2, Rok Jaklič wrote:
>
> Hi,
>
> if I write custom authentication backend, do I need to create user in 
> local database so that method get_user can find it?
>
> Can I avoid creating user in local database?
>
> Rok
>

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Custom authentication backend

2013-07-18 Thread Rok Jaklič
Hi,

if I write custom authentication backend, do I need to create user in local 
database so that method get_user can find it?

Can I avoid creating user in local database?

Rok

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.