Re: Bizarre URL behaviour after deploying

2017-08-30 Thread Bernd Wechner
Mohammad, > you have to use app_name in url.py in each app I think you have misunderstood or misread my issue below. Clearly I do not have to use app_name in url.py, because I don't and it works fine. The problem is the complete inverse, namely I have not asked for the app_name to appear in

Re: Bizarre URL behaviour after deploying

2017-08-30 Thread Bernd Wechner
Daniel, Yes, I have deployed, that is the problem in a sense. URLs are clean in dev and suddenly contain an app_name when deployed. Not sure what you mean by configuration? The Django settings are here: https://github.com/bernd-wechner/CoGs/blob/master/CoGs/settings.py The rest of the

Re: Deploying Oracle database to production enviroment

2017-08-30 Thread Alceu Rodrigues de Freitas Junior
Heh... why make things easier when we can complicate?  Instead of bringing your problem to you, you could push back on to them: ask them to have a "stage" schema (where you do have permission to change) they would just export later to the production environment. If they want audit, the database

Deploying Oracle database to production enviroment

2017-08-30 Thread Eduardo Velazquez
Hi, I've been working with django within the place I work and in order to deploy the django app we're developing we need to migrate the database to a production enviroment. The database backend we are using is Oracle, and the users permission created for that are just for select, insert, etc,

Re: How do you interact with the Django test database outside of tests?

2017-08-30 Thread Kurt Wheeler
I've figured it out! I was running my end-to-end tests in a class which inherited from TestCase. This cause all the database calls for that entire class to be run within a transaction, so I couldn't see the changes because the transaction was never allowed to finish. By switching the base class

Database router with read replica

2017-08-30 Thread Matt Pegler
I'm hoping for some advice on how to utilize read replica databases with Django. I searched the django-users archive but didn't find much discussion about this. I also can't find many blog posts or discussion elsewhere. Do people have experience or general advice on using read replicas with

Re: Django deployement Apache

2017-08-30 Thread sarfaraz ahmed
Thanks Antonis, I reached your website googling undoubtedly this is well explained. I have been able to deploy but here is my problem STATIC_URL = '/static/' MEDIA_URL = '/media/' STATICFILES_DIRS = [os.path.join(BASE_DIR, "static"),os.path.join(BASE_DIR,"static","admin")] STATIC_ROOT =

get json sent to channels in view

2017-08-30 Thread Samuel Muiruri
I have this javascript code that send data to channels // Note that the path doesn't matter for routing; any WebSocket // connection gets bumped over to WebSocket consumers socket = new WebSocket("ws://" + window.location.host + "/chat/"); socket.onmessage = function(e) { alert(e.data); }

Re: Doubts about static files

2017-08-30 Thread mohammad k
STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'firstdjango', 'static'), ) STATIC_ROOT = '/Users/mk/Desktop/api/New folder/' : When you run collectstatic files moves files from static files from static folder to desktop. add this settings to the settings.py On Wed, Aug

Re: Doubts about static files

2017-08-30 Thread mohammad k
move the static folder beside the settings.py On Wed, Aug 30, 2017 at 6:32 PM, mohammad k wrote: > STATIC_URL = '/static/' > STATICFILES_DIRS = ( > os.path.join(BASE_DIR, 'firstdjango', 'static'), > ) > STATIC_ROOT = '/Users/mk/Desktop/api/New folder/' : When you run >

Re: Doubts about static files

2017-08-30 Thread 'Kristofer Pettijohn' via Django users
Point Apache at static_root. Django apps you install may also include static files, and "collectstatic" gathers all of those together and puts them in one place (under STATIC_ROOT). From: "sarfaraz ahmed" To: "Django users" Sent:

Doubts about static files

2017-08-30 Thread sarfaraz ahmed
Hello Team, I have doubts about static files. I read articles on Django but it does not clearly states that atleast I got confused. STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")] this is my STATICFILES_DIRS settings which points out to static folder under my project. Also, I can add

Re: Bizarre URL behaviour after deploying

2017-08-30 Thread mohammad k
you have Different app in your project yes ? you have to use app_name in url.py in each app On Wed, Aug 30, 2017 at 4:11 PM, Bernd Wechner wrote: > This has bamboozled me some. And the best thing I've found on-line doesn't > seem to apply: > >

Re: Bizarre URL behaviour after deploying

2017-08-30 Thread mohammad k
i can't do that sorry man Tell me more clearly, so I may help you better On Wed, Aug 30, 2017 at 5:16 PM, Daniel Roseman wrote: > On Wednesday, 30 August 2017 12:42:01 UTC+1, Bernd Wechner wrote: >> >> This has bamboozled me some. And the best thing I've found on-line >>

Re: Bizarre URL behaviour after deploying

2017-08-30 Thread mohammad k
and in url.py beside settings.py use code like that : url('^polls/',include('polls.urls')), On Wed, Aug 30, 2017 at 4:29 PM, mohammad k wrote: > from django.conf.urls import url > from . import views > > app_name = 'polls' > urlpatterns = [ > url(r'^$',

Re: Bizarre URL behaviour after deploying

2017-08-30 Thread mohammad k
like that : app_name = 'polls' in polls folder and in url.py On Wed, Aug 30, 2017 at 4:26 PM, mohammad k wrote: > you have Different app in your project yes ? > you have to use app_name in url.py in each app > > On Wed, Aug 30, 2017 at 4:11 PM, Bernd Wechner

Re: Bizarre URL behaviour after deploying

2017-08-30 Thread Daniel Roseman
On Wednesday, 30 August 2017 12:42:01 UTC+1, Bernd Wechner wrote: > > This has bamboozled me some. And the best thing I've found on-line doesn't > seem to apply: > > > https://stackoverflow.com/questions/26944908/django-url-mapping-how-to-remove-app-name-from-url-paths > > Let me summarise.

Bizarre URL behaviour after deploying

2017-08-30 Thread Bernd Wechner
This has bamboozled me some. And the best thing I've found on-line doesn't seem to apply: https://stackoverflow.com/questions/26944908/django-url-mapping-how-to-remove-app-name-from-url-paths Let me summarise. I have a site that I've been building and testing with djangos development server

Re: Django Translation

2017-08-30 Thread mohammad k
read django-translatin-manager docs On Wed, Aug 30, 2017 at 11:50 AM, wrote: > Hi, > > I have a django application developed with static files from AngularJS. I > need to translate the site to French and give option to users to select > language. I have used

Django Translation

2017-08-30 Thread dineshkcube
Hi, I have a django application developed with static files from AngularJS. I need to translate the site to French and give option to users to select language. I have used django-translatin-manager for loading translation entries using admin panel. But I don't know how to setup active language

Re: HTTP Error 403 - Forbidden occurs

2017-08-30 Thread Antonis Christofides
Hi, Sometimes the Apache log file (something like /var/log/apache2/error.log, but it may be /var/log/apache2/yourdomain-error.log) has an additional error message that may help you track down the problem. Regards, Antonis Antonis Christofides http://djangodeployment.com On 2017-08-30 10:10,

Re: send email using django

2017-08-30 Thread Antonis Christofides
Hello, I've found it hard to make the free Gmail account work as a smarthost. I think Google doesn't like it and doesn't support it, so even if you get it to work, next month it may break. I'm using a paid email account at runbox.com, but I believe there is a huge number of alternatives. For

Re: Encapsulating Complex Business Logic in a Migraiton

2017-08-30 Thread Antonis Christofides
Hello, Another option that might or might not work would be to violate the rule and do refer to "current" models during the migration to version X, but thereafter reset your migrations and only support migration to X+1 from X, not from earlier versions. This would need detailed release notes

Re: Django deployement Apache

2017-08-30 Thread Antonis Christofides
Hello Sarfaraz, You could try "How Django static files work in production " to get some understanding of the correct way to do it. Regards, Antonis Antonis Christofides http://djangodeployment.com On

Re: send email using django

2017-08-30 Thread Andréas Kühne
Hi, First make sure that the settings for google smtp server sending are correct. See https://stackoverflow.com/questions/32301868/django-sending-email-with-google-smtp for an example. There you can also see a setting called "Allow access to less secure apps". This is an issue even when using

send email using django

2017-08-30 Thread vishnu bhand
I'm trying to send email using django ,but i giving some authentiaction problem to gmail account ... -- 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

HTTP Error 403 - Forbidden occurs

2017-08-30 Thread deepak gupta
I have Django App Using Django 1.9, Apache 2.4.6 Hosted on HTTPS Certificate is : Multi Domain Certificate: *.customer.mydomain.com I am facing the Issue of HTTP Error 403 - Forbidden , The Web server is configured to not list contents of this directory or you do not have enough permission to