Re: Please Can Some one Help me To get my static files load my default CSS files

2016-08-08 Thread Timothy Steele
On Monday, August 8, 2016 at 1:16:57 AM UTC+1, Timothy Steele wrote:
>
> Please any time i try to load my Django admin panel the default CSS files 
> does not load and even i have to refresh several time before i can  the css 
> file will load, and even if i log in still the interface become different, 
> it does not load the CSS files. I believe this is coming form the static 
> files which i have not loaded but i did what ever i could and it did not 
> work for me so i need  a help please.
> Please below is an attach file of screen shots i took 
>
> Any way i am still a beginner
>
 

>
> THANKS
>

-- 
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/cdac4962-9f93-4314-b2e4-b059156cc3d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Please Can Some one Help me To get my static files load my default CSS files

2016-08-08 Thread Timothy Steele


On Monday, August 8, 2016 at 1:16:57 AM UTC+1, Timothy Steele wrote:
>
> Please any time i try to load my Django admin panel the default CSS files 
> does not load and even i have to refresh several time before i can  the css 
> file will load, and even if i log in still the interface become different, 
> it does not load the CSS files. I believe this is coming form the static 
> files which i have not loaded but i did what ever i could and it did not 
> work for me so i need  a help please.
> Please below is an attach file of screen shots i took 
>
> Any way i am still a beginner
>
> THANKS
>

(any way this is the best group i have join so far thanks to all of you)

PLEASE MY FRIENDS I BEG 
can you give me a step by step process to do this 
thanks very mach

 

-- 
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/7f5ae2e5-11f7-429b-b4a3-78a8d36ef787%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Please another problem

2016-08-08 Thread Timothy Steele
i have my sever running and every thing is work but at the bottom of the 
pannel
it give this error pasted below Please help me to solve this my friends 
Performing system checks...

System check identified no issues (0 silenced).
August 08, 2016 - 08:39:33
Django version 1.10, using settings 'conference.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[08/Aug/2016 08:39:36] "GET / HTTP/1.1" 200 1767

*(THE ERROR STATE FROM HEAR)*

Not Found: /favicon.ico
[08/Aug/2016 08:39:36] "GET /favicon.ico HTTP/1.1" 404 1940
Not Found: /favicon.ico
[08/Aug/2016 08:39:37] "GET /favicon.ico HTTP/1.1" 404 1940
[08/Aug/2016 08:39:42] "GET /admin/ HTTP/1.1" 200 4797
[08/Aug/2016 08:39:53] "GET /admin/app/speaker/ HTTP/1.1" 200 4173
[08/Aug/2016 08:39:53] "GET /admin/jsi18n/ HTTP/1.1" 200 3189
[08/Aug/2016 08:39:55] "GET /admin/ HTTP/1.1" 200 4797
[08/Aug/2016 08:39:59] "GET /admin/app/ HTTP/1.1" 200 2960
[08/Aug/2016 08:39:59] "GET /static/admin/css/base.css HTTP/1.1" 304 0
[08/Aug/2016 08:39:59] "GET /static/admin/css/dashboard.css HTTP/1.1" 304 0
[08/Aug/2016 08:39:59] "GET /static/admin/css/fonts.css HTTP/1.1" 304 0
[08/Aug/2016 08:39:59] "GET /static/admin/img/icon-addlink.svg HTTP/1.1" 
304 0
[08/Aug/2016 08:39:59] "GET /static/admin/img/icon-changelink.svg HTTP/1.1" 
304 0
[08/Aug/2016 08:40:02] "GET /admin/ HTTP/1.1" 200 4797

-- 
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/bc139b06-c21d-4290-915f-4149ee3549a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Multiple Currencies Implementation

2016-08-08 Thread Mike Dewhirst

On 8/08/2016 4:31 PM, Ali khan wrote:

Thank you mike for your kind reply but question was more related to how
to setup moneyfield using what available modules. Use case is that a
payment processor should be able to determine exchange value for
instance if price is listed in Asian currency and someone wants to make
payment in USD then payment processor should provide same equal amount
to localized currency.

Hope I was able to explain.
Please specify what reusable apps support following:
1. Different currencies in a format that payment api can understand it.
2. Should be connected to some online exchange rate site to get updated
price.


So you want your page to display a price calculated in the customer's 
regional currency upon loading the browser page and perhaps 
recalculating that price upon page refresh?


Behind the scenes, will you set the actual fixed price in your own 
favourite currency?


So you need an API through which your preferred exchange rate site will 
provide an up-to-date pair with which to recalculate the selling price 
in the other currency. You will of course have to factor in any banking 
costs to you for receiving foreign currency and converting to your 
preferred currency on the day it is received (not the day the purchase 
was made).


You also need to consider the changing laws around the world related to 
overseas transactions if the sums involved are substantial.


I don't know of any apps/APIs which do this. But I haven't looked. There 
may be some.


Mike



Thank you for your interest to address this question and looking forward
for your response.

Regards,
Ali

On Sun, Aug 7, 2016 at 3:01 PM, Babatunde Akinyanmi
mailto:tundeba...@gmail.com>> wrote:

Hello Khan,
Your payment processor will specify in its API how it determines
currency. This is not a django problem. I'm sure the answer to your
question lies in the documentation of Stripe and Braintree


On 7 Aug 2016 18:46, "A.Khan" mailto:alipathan123...@gmail.com>> wrote:

Hi I am new to Django and I need to implement multiple currency
options based on user's preference. What I don't understand that
let's say I am in Pakistan and I've used in my template simply

PKR {{ object.price }} .

Now I need to understand how would a payment processor will
determine what currency I am using for example if I am using
above tag and someone needs to pay me with localized currency
equaling to my currency amount using Credit Cart or whatever.

Secondly I need to implement multiple currencies that user can
select currency option for payment. Can you please tell me the
simplest way possible to achieve it.

This is not a necessity at this point but just in case I need to
implement a use case that Django provides localized currency
automatically if website accessed from a particular location
what do I need to do.

I need to implement Braintree and Stripe with Paypal and Credit
cards both for testing on two different projects. As I said I am
a beginner so not sure if its a qualified question.
Please advise.

Thanks.

--
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/51b5e211-0b03-4423-b1c2-2b42aaa92ba8%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 https://groups.google.com/group/django-users
.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/CA%2BWjgXMBCeVRi0wTSxnv7-ZHcAMCdx8c9cvFNVFQe3dxiP1qjQ%40mail.gmail.com



Re: Please another problem

2016-08-08 Thread Andreas Kuhne
Hi Timothy,

There aren't any errors in the trace you are showing. There is a missing
file however (404 error), that is the favicon.ico, which browsers try to
fetch from the root URL if nothing is set in your html header. To resolve
that, all you have to do is add a link to a favicon file. Check the
http://stackoverflow.com/questions/23849377/html-5-favicon-support for an
example.

Remember that you will need to add the {% static "favicon.ico" %} to make
sure that the request is using staticfiles.

Regards,

Andréas



2016-08-08 11:07 GMT+02:00 Timothy Steele :

> i have my sever running and every thing is work but at the bottom of the
> pannel
> it give this error pasted below Please help me to solve this my friends
> Performing system checks...
>
> System check identified no issues (0 silenced).
> August 08, 2016 - 08:39:33
> Django version 1.10, using settings 'conference.settings'
> Starting development server at http://127.0.0.1:8000/
> Quit the server with CTRL-BREAK.
> [08/Aug/2016 08:39:36] "GET / HTTP/1.1" 200 1767
>
> *(THE ERROR STATE FROM HEAR)*
>
> Not Found: /favicon.ico
> [08/Aug/2016 08:39:36] "GET /favicon.ico HTTP/1.1" 404 1940
> Not Found: /favicon.ico
> [08/Aug/2016 08:39:37] "GET /favicon.ico HTTP/1.1" 404 1940
> [08/Aug/2016 08:39:42] "GET /admin/ HTTP/1.1" 200 4797
> [08/Aug/2016 08:39:53] "GET /admin/app/speaker/ HTTP/1.1" 200 4173
> [08/Aug/2016 08:39:53] "GET /admin/jsi18n/ HTTP/1.1" 200 3189
> [08/Aug/2016 08:39:55] "GET /admin/ HTTP/1.1" 200 4797
> [08/Aug/2016 08:39:59] "GET /admin/app/ HTTP/1.1" 200 2960
> [08/Aug/2016 08:39:59] "GET /static/admin/css/base.css HTTP/1.1" 304 0
> [08/Aug/2016 08:39:59] "GET /static/admin/css/dashboard.css HTTP/1.1" 304
> 0
> [08/Aug/2016 08:39:59] "GET /static/admin/css/fonts.css HTTP/1.1" 304 0
> [08/Aug/2016 08:39:59] "GET /static/admin/img/icon-addlink.svg HTTP/1.1"
> 304 0
> [08/Aug/2016 08:39:59] "GET /static/admin/img/icon-changelink.svg
> HTTP/1.1" 304 0
> [08/Aug/2016 08:40:02] "GET /admin/ HTTP/1.1" 200 4797
>
> --
> 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/bc139b06-c21d-4290-915f-4149ee3549a8%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALXYUb%3DGmrwqqtOpd%3DVwN1-Hte0N0HrC1kckAscuZWdK04Zp9g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using non-ASCII app name via Apache server

2016-08-08 Thread Göran Uddeborg
M Hashmi:
> List down your "civ.apps.CivConfig" also restart Gunicorn, and reload Nginx. 

I'm not sure exactly what you mean by "list down".  Do you want me to
comment it out?

In any case, to make an even more clean test case, I replaced my
Django site with one I built from scratch.  I.e. I started by doing

   python3-django-admin startproject dynsite dyn

And then the same steps as in my original message.  (I'm not running
Gunicorn or Nginx, I'm using Apache following the instructions on
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/modwsgi/
So httpd was what I restarted.)

I attach the complete file tree after these steps.  I still get the
same backtrace as before.  I believe I've made the site visible from
the outside, so you should see the same if you point a browser to
http://www.uddeborg.se/dyn/app%C3%A5%C3%A4%C3%B6/

-- 
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/22440.20419.305454.59808%40gargle.gargle.HOWL.
For more options, visit https://groups.google.com/d/optout.


dyn.tar.gz
Description: Test site contents


How o run shell command in Django ?

2016-08-08 Thread Asad ur Rehman
I want to run *fs_cli -x *command in django . Can anybody help me ?
How can i create function in django to execute this command ?

-- 
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/0f9ea28d-37c9-40f2-b67a-b566c3691998%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How o run shell command in Django ?

2016-08-08 Thread Matthias Müller
Hi Asad,

run system calls in django means run system calls in python. Python has a
library called "os".

https://docs.python.org/3/library/os.html

See 16.1.6 process management

HTH
-- 
Viele Grüße / Best Regards
Matthias Müller


2016-08-08 11:33 GMT+02:00 Asad ur Rehman :

> I want to run *fs_cli -x *command in django . Can anybody help me ?
> How can i create function in django to execute this command ?
>
> --
> 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/0f9ea28d-37c9-40f2-b67a-b566c3691998%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAA2xsHRA6_eY8Q2Fgq_J9SQArfjdc-fus4njeRpu0GWks2YaCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How o run shell command in Django ?

2016-08-08 Thread Erik Cederstrand
I've had a lot of success interacting with the command-line by using the 'sh' 
module: http://amoffat.github.io/sh/ It's extremely simple but allows a lot of 
advanced features when you need them.

I'm not on a system where fs_cli is avaliable, but you should be able to just 
do:

from sh import fs_cli
result = fs_cli('-x')


And put that somewhere useful in your Django code, e.g. in a view or a 
management command.


Erik

> Den 8. aug. 2016 kl. 11.33 skrev Asad ur Rehman :
> 
> I want to run fs_cli -x command in django . Can anybody help me ?
> How can i create function in django to execute this command ?
> 
> -- 
> 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/0f9ea28d-37c9-40f2-b67a-b566c3691998%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/114B7906-583D-4E5A-9348-05A34A961DF6%40cederstrand.dk.
For more options, visit https://groups.google.com/d/optout.


Re: Django migrations taking all the memory on Django 1.9

2016-08-08 Thread andrea crotti
Since we also use --keepdb I thought we could simply avoid running all the 
migrations, and maybe dynamically even skip all the apps that were not 
changed at all. 

So I just tried something silly like this:


NO_MIGRATIONS = os.environ.get('NO_MIGRATIONS', 'false').lower() in 
('true', '1')
if NO_MIGRATIONS:
for app in INSTALLED_APPS:
if app not in MIGRATION_MODULES:
MIGRATION_MODULES[app] = None


But I get this error:

django.db.migrations.exceptions.NodeNotFoundError: Migration 
something.0001_initial dependencies reference nonexistent parent node 
('something_else', u'0001_initial')

So I guess it's not as simple (and maybe that ticket is what that's about, 
but sadly it's not even merged in master now from my understanding).

PS. so to clarify our tests do rely on migrations (and there are some data 
migrations too) but since we normally use --keepdb anyway we definitively 
not need to run only a few migrations at a time max (and even then 
sometimes it takes ages and uses all the RAM).

On Saturday, August 6, 2016 at 4:03:50 PM UTC+1, Tim Graham wrote:
>
> As long as your tests don't rely on any data migrations, you can set 
> MIGRATIONS_MODULES['app'] = None for all apps in a test settings file as 
> described in 
> https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-MIGRATION_MODULES
>  
> to disable migrations while testing. There's a ticket to make that a bit 
> easier: https://code.djangoproject.com/ticket/25388
>
> On Saturday, August 6, 2016 at 6:07:04 AM UTC-4, andrea crotti wrote:
>>
>>
>> Ok great thanks for the answer Markus.
>> And yes I can try to help, it's quite a big issue for us..
>> Anything else we can do to improve the situation in the meanwhile?
>>
>> In general I was wondering why do we need to handle all the "baggage" of 
>> supporting backward migrations and doing things 100% properly while running 
>> migrations just for tests.
>>
>> I think that in general if there was just a way to render all the SQL 
>> that needs to be run statically for tests it would be great.
>>
>> On Friday, August 5, 2016 at 11:07:56 AM UTC+1, andrea crotti wrote:
>>>
>>> We have a very big Django project with > 100 apps and > 300 models.
>>> We had some massive issues with Django 1.8 and migrations, which would 
>>> take forever and just take all the computer memory after a while.
>>>
>>> Now with Django 1.9 things improved, however we are again back with some 
>>> extremely bad performances and massive memory usages (up to 8GB of RAM for 
>>> example), sometimes just to run ONE single migration.
>>>
>>> It's not even entirely deterministic though sometimes killing the 
>>> process and doing it again just works.
>>>
>>> I'm attaching the profile graph (done wtith gprof2dot) from running 
>>> "./manage migrate" and one thing that clearly looks bad is that *render* 
>>> for example is called 44355 times, which is definitively not normal.
>>>
>>> Any idea about about what we can do about this and what could be the 
>>> problem?
>>> I have the impression that it's related with the amount of models and 
>>> how they are interconnected, and mabye some caching would avoid all this 
>>> extra computation.
>>>
>>> Noone else has similar issues?
>>> Thanks
>>>
>>

-- 
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/9d7a4ea9-1683-4bc3-9ab4-54b82e0ae027%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Please another problem

2016-08-08 Thread Timothy Steele


On Monday, August 8, 2016 at 10:07:30 AM UTC+1, Timothy Steele wrote:
>
> i have my sever running and every thing is work but at the bottom of the 
> pannel
> it give this error pasted below Please help me to solve this my friends 
> Performing system checks...
>
> System check identified no issues (0 silenced).
> August 08, 2016 - 08:39:33
> Django version 1.10, using settings 'conference.settings'
> Starting development server at http://127.0.0.1:8000/
> Quit the server with CTRL-BREAK.
> [08/Aug/2016 08:39:36] "GET / HTTP/1.1" 200 1767
>
> *(THE ERROR STATE FROM HEAR)*
>
> Not Found: /favicon.ico
> [08/Aug/2016 08:39:36] "GET /favicon.ico HTTP/1.1" 404 1940
> Not Found: /favicon.ico
> [08/Aug/2016 08:39:37] "GET /favicon.ico HTTP/1.1" 404 1940
> [08/Aug/2016 08:39:42] "GET /admin/ HTTP/1.1" 200 4797
> [08/Aug/2016 08:39:53] "GET /admin/app/speaker/ HTTP/1.1" 200 4173
> [08/Aug/2016 08:39:53] "GET /admin/jsi18n/ HTTP/1.1" 200 3189
> [08/Aug/2016 08:39:55] "GET /admin/ HTTP/1.1" 200 4797
> [08/Aug/2016 08:39:59] "GET /admin/app/ HTTP/1.1" 200 2960
> [08/Aug/2016 08:39:59] "GET /static/admin/css/base.css HTTP/1.1" 304 0
> [08/Aug/2016 08:39:59] "GET /static/admin/css/dashboard.css HTTP/1.1" 304 0
> [08/Aug/2016 08:39:59] "GET /static/admin/css/fonts.css HTTP/1.1" 304 0
> [08/Aug/2016 08:39:59] "GET /static/admin/img/icon-addlink.svg HTTP/1.1" 
> 304 0
> [08/Aug/2016 08:39:59] "GET /static/admin/img/icon-changelink.svg 
> HTTP/1.1" 304 0
> [08/Aug/2016 08:40:02] "GET /admin/ HTTP/1.1" 200 4797
>
*THANK YOU VERY MACH I REALLY LIKE THE RESPONSE YOU HAVE GIVEN *
*AND I SAY BRAVO FOR THAT, THIS IS THE TYPE OF GROUP I ALWAYS LIKE TO JOIN *
*THANK YOU AGAIN AND AGAIN  *   (Andreas Kuhne May God Give you more 
knowledge)

-- 
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/2dd740cd-5f62-4354-abd8-bf8799f68f55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How o run shell command in Django ?

2016-08-08 Thread M Hashmi
There are better ways to cut short your time to execute or even schedule
tasks or commands.

It won't take you more than an hour to understand Django-celery for
scheduling tasks. You need to create a bash script and it should include
all the steps in case you need virtualenv loaded while command runs. This
way you can schedule tasks for multiple django projects on same machine.

mybashscript.sh:

cd /var/www/website/
source myenv/bin/activate
/var/www/website/manage.py $1 --settings$2

Then in your contrab for cronjobs you can set it up like:

MAILTO=youradminacco...@yourwebsite.com
SETTINGSMODULE=yourwebsite.settings_production
5 * * * * /var/www/yourwebsite/mybashscript.sh fs_cli -x $SETTINGSMODULE >>
/dev/null

Each time your script runs you will get notified by email about the
schedule process.

Otherwise if you still want to get it executed by the python script. I
would suggest you to create a script.py at place of your settings.py and
import timezone. Then you can write the way or when you want to get it
executed by shell. You can search the best and simplest scheduling script
that fits your need.

Hope answer was helpful.

Regards,
Mudassar

On Mon, Aug 8, 2016 at 2:33 AM, Asad ur Rehman 
wrote:

> I want to run *fs_cli -x *command in django . Can anybody help me ?
> How can i create function in django to execute this command ?
>
> --
> 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/0f9ea28d-37c9-40f2-b67a-b566c3691998%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANoUts4VqBRe8wo9VF%3DyBRupDVoh7vF9SLyjem5F_HXeDcdJJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using non-ASCII app name via Apache server

2016-08-08 Thread M Hashmi
I am sorry bad assumption on my side. I saw your full traceback and all it
says that in your project urls.py and it cannot resolve following url.

url(r'^appåäö/', include('appåäö.urls')),

Its picking up the this url but no app related to this urls exists. Either
you need to check if this app is listed in your INSTALLED_APP section or
even if it is installed at all in your project.

In simplest theory your url is not communicating your app 'appåäö'. Rest of
the settings are fine.

Reply me back I am waiting. Apologies if my assumption caused your time.

Regards,
Mudassar

On Mon, Aug 8, 2016 at 2:24 AM, Göran Uddeborg  wrote:

> M Hashmi:
> > List down your "civ.apps.CivConfig" also restart Gunicorn, and reload
> Nginx.
>
> I'm not sure exactly what you mean by "list down".  Do you want me to
> comment it out?
>
> In any case, to make an even more clean test case, I replaced my
> Django site with one I built from scratch.  I.e. I started by doing
>
>python3-django-admin startproject dynsite dyn
>
> And then the same steps as in my original message.  (I'm not running
> Gunicorn or Nginx, I'm using Apache following the instructions on
> https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/modwsgi/
> So httpd was what I restarted.)
>
> I attach the complete file tree after these steps.  I still get the
> same backtrace as before.  I believe I've made the site visible from
> the outside, so you should see the same if you point a browser to
> http://www.uddeborg.se/dyn/app%C3%A5%C3%A4%C3%B6/
>
> --
> 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/22440.20419.305454.59808%40gargle.gargle.HOWL.
> 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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANoUts7DFhwAucuVC4KghYHze-B8i8-k2tsg8mRwpq-dBa-eSA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Please Can Some one Help me To get my static files load my default CSS files

2016-08-08 Thread M Hashmi
You need to set your static in settings.py and I am giving you simplest
idea you can implement with no issues.

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static', 'static-only')
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'static', 'media')
STATICFILES_DIRS = [
   os.path.join(BASE_DIR, 'static', 'static'),
]

Now in your project source folder create a new folder named 'static' which
will refer to values in blue.
In your 'static' in blue folder create subfolders with names 'media',
static-only', 'templates' and 'static' again. So hierarchy should look like
this:

static
static
media
static-only
templates

In your settings.py in "TEMPLATE" section find simalr line like below and
change it as I did.

'DIRS': [os.path.join(BASE_DIR, 'static', 'templates')],

Now go to your terminal (command shell) and run following command.
./manage.py collectstatic

It will ask you are you sure you want to do this. Type "yes" and press
enter.

.manage.py runserver and refresh your page.

You will get all the css loaded.

Furthermore you can create three new folders in your /static/static/.

static
static
 |
 ---css
 |
 ---js
 |
 ---images
media
static-only
templates

In your static/static folder you can keep the project template related
css/js/images. All your html based code will go to /static/templates
folder. Read the link below thorough and in case of issues you can post
another question or to same thread.

https://docs.djangoproject.com/en/1.10/howto/static-files/

Regards,
Mudassar

On Mon, Aug 8, 2016 at 1:58 AM, Timothy Steele 
wrote:

>
>
> On Monday, August 8, 2016 at 1:16:57 AM UTC+1, Timothy Steele wrote:
>>
>> Please any time i try to load my Django admin panel the default CSS files
>> does not load and even i have to refresh several time before i can  the css
>> file will load, and even if i log in still the interface become different,
>> it does not load the CSS files. I believe this is coming form the static
>> files which i have not loaded but i did what ever i could and it did not
>> work for me so i need  a help please.
>> Please below is an attach file of screen shots i took
>>
>> Any way i am still a beginner
>>
>> THANKS
>>
>
> (any way this is the best group i have join so far thanks to all of you)
>
> PLEASE MY FRIENDS I BEG
> can you give me a step by step process to do this
> thanks very mach
>
>
>
> --
> 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/7f5ae2e5-11f7-429b-b4a3-78a8d36ef787%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANoUts6uCR1H5tAZaZ8x%2BfwNiZkh_zSe9qJoL00_ss9reget_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How o run shell command in Django ?

2016-08-08 Thread Asad ur Rehman
#Mattias muller there is error while i am import sh ... How to sort it ?


On Monday, August 8, 2016 at 2:33:12 PM UTC+5, Asad ur Rehman wrote:
>
> I want to run *fs_cli -x *command in django . Can anybody help me ?
> How can i create function in django to execute this command ?
>

-- 
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/2876eb58-4244-4630-992e-d32ceba5a6f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How o run shell command in Django ?

2016-08-08 Thread Asad ur Rehman
 from sh import fs_cli 
this is also not working ...




On Monday, August 8, 2016 at 2:33:12 PM UTC+5, Asad ur Rehman wrote:
>
> I want to run *fs_cli -x *command in django . Can anybody help me ?
> How can i create function in django to execute this command ?
>

-- 
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/17d5d75e-12a3-4dfd-843f-22ad7cab1dce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using non-ASCII app name via Apache server

2016-08-08 Thread Göran Uddeborg
M Hashmi:
> Reply me back I am waiting. Apologies if my assumption caused your time. 

No need to apologize!  You are trying to help me.  I'm grateful.

In doing my simplified test case, I forgot to add the new app to
INSTALLED_APP.  Thanks for the pointer!

But after fixing that, I get an "Internal Server Error" instead, and
the log files contains the traceback below.  Some of the time stamps
are in local time (UTC+2) and some are in UTC.  I guess that is just
some idiosyncrasy of Apache httpd and mod_wsgi.

The test server, "./manage.py runserver" still works fine.

(I also attach the updated site tree.  There is just a small change,
but the entire site is so small so I thought it was ok.)

[Mon Aug 08 12:49:59.214434 2016] [core:notice] [pid 12016] SELinux policy 
enabled; httpd running as context system_u:system_r:httpd_t:SystemLow
[Mon Aug 08 12:49:59.215009 2016] [ssl:info] [pid 12016] AH01887: Init: 
Initializing (virtual) servers for SSL
[Mon Aug 08 12:49:59.215550 2016] [ssl:info] [pid 12016] AH01876: 
mod_ssl/2.4.23 compiled against Server: Apache/2.4.23, Library: OpenSSL/1.0.2h
[Mon Aug 08 12:49:59.216226 2016] [suexec:notice] [pid 12016] AH01232: suEXEC 
mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Aug 08 12:49:59.252466 2016] [auth_digest:notice] [pid 12016] AH01757: 
generating secret for digest authentication ...
[Mon Aug 08 12:49:59.252819 2016] [socache_shmcb:info] [pid 12016] AH00830: 
Shared memory socache initialised
[Mon Aug 08 12:49:59.252826 2016] [ssl:info] [pid 12016] AH01887: Init: 
Initializing (virtual) servers for SSL
[Mon Aug 08 12:49:59.253247 2016] [ssl:info] [pid 12016] AH01876: 
mod_ssl/2.4.23 compiled against Server: Apache/2.4.23, Library: OpenSSL/1.0.2h
[Mon Aug 08 12:49:59.253272 2016] [http2:info] [pid 12016] AH03090: mod_http2 
(v1.5.11, feats=CHPRIO+SHA256, nghttp2 1.7.1), initializing...
[Mon Aug 08 12:49:59.254005 2016] [lbmethod_heartbeat:notice] [pid 12016] 
AH02282: No slotmem from mod_heartmonitor
[Mon Aug 08 12:49:59.279641 2016] [wsgi:info] [pid 12021] mod_wsgi (pid=12021): 
Initializing Python.
[Mon Aug 08 12:49:59.281769 2016] [mpm_prefork:notice] [pid 12016] AH00163: 
Apache/2.4.23 (Fedora) OpenSSL/1.0.2h-fips PHP/5.6.23 mod_wsgi/4.4.8 
Python/3.5.1 configured -- resuming normal operations
[Mon Aug 08 12:49:59.281802 2016] [mpm_prefork:info] [pid 12016] AH00164: 
Server built: Jul 18 2016 15:38:14
[Mon Aug 08 12:49:59.281815 2016] [core:notice] [pid 12016] AH00094: Command 
line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Aug 08 12:49:59.282035 2016] [wsgi:info] [pid 12020] mod_wsgi (pid=12020): 
Initializing Python.
[Mon Aug 08 12:49:59.284088 2016] [wsgi:info] [pid 12027] mod_wsgi (pid=12027): 
Initializing Python.
[Mon Aug 08 12:49:59.291791 2016] [wsgi:info] [pid 12022] mod_wsgi (pid=12022): 
Initializing Python.
[Mon Aug 08 12:49:59.312125 2016] [wsgi:info] [pid 12043] mod_wsgi (pid=12043): 
Initializing Python.
[Mon Aug 08 12:49:59.317964 2016] [wsgi:info] [pid 12020] mod_wsgi (pid=12020): 
Attach interpreter ''.
[Mon Aug 08 12:49:59.320378 2016] [wsgi:info] [pid 12027] mod_wsgi (pid=12027): 
Attach interpreter ''.
[Mon Aug 08 12:49:59.321265 2016] [wsgi:info] [pid 12020] mod_wsgi (pid=12020): 
Adding '/var/www/dyn' to path.
[Mon Aug 08 12:49:59.323805 2016] [wsgi:info] [pid 12027] mod_wsgi (pid=12027): 
Adding '/var/www/dyn' to path.
[Mon Aug 08 12:49:59.327720 2016] [wsgi:info] [pid 12022] mod_wsgi (pid=12022): 
Attach interpreter ''.
[Mon Aug 08 12:49:59.330202 2016] [wsgi:info] [pid 12022] mod_wsgi (pid=12022): 
Adding '/var/www/dyn' to path.
[Mon Aug 08 12:49:59.331290 2016] [wsgi:info] [pid 12021] mod_wsgi (pid=12021): 
Attach interpreter ''.
[Mon Aug 08 12:49:59.334499 2016] [wsgi:info] [pid 12021] mod_wsgi (pid=12021): 
Adding '/var/www/dyn' to path.
[Mon Aug 08 12:49:59.344669 2016] [wsgi:info] [pid 12043] mod_wsgi (pid=12043): 
Attach interpreter ''.
[Mon Aug 08 12:49:59.347136 2016] [wsgi:info] [pid 12043] mod_wsgi (pid=12043): 
Adding '/var/www/dyn' to path.
[Mon Aug 08 12:50:09.731008 2016] [wsgi:info] [pid 12020] mod_wsgi (pid=12020): 
Create interpreter 'www.uddeborg.se|/dyn'.
[Mon Aug 08 12:50:09.740547 2016] [wsgi:info] [pid 12020] mod_wsgi (pid=12020): 
Adding '/var/www/dyn' to path.
[Mon Aug 08 12:50:09.741401 2016] [wsgi:info] [pid 12020] [client 
62.65.125.225:47982] mod_wsgi (pid=12020, process='', 
application='www.uddeborg.se|/dyn'): Loading WSGI script 
'/var/www/dyn/dynsite/wsgi.py'.
[Mon Aug 08 10:50:10.059568 2016] [wsgi:error] [pid 12020] [client 
62.65.125.225:47982] mod_wsgi (pid=12020): Target WSGI script 
'/var/www/dyn/dynsite/wsgi.py' cannot be loaded as Python module.
[Mon Aug 08 10:50:10.059639 2016] [wsgi:error] [pid 12020] [client 
62.65.125.225:47982] mod_wsgi (pid=12020): Exception occurred processing WSGI 
script '/var/www/dyn/dynsite/wsgi.py'.
[Mon Aug 08 10:50:10.060501 2016] [wsgi:error] [pid 12020] [client 
62.65.125.225:47982] Traceback (most recent call last):
[Mon Aug 08 10:50:10.060566 2016] [wsgi:err

Re: How o run shell command in Django ?

2016-08-08 Thread Erik Cederstrand

> Den 8. aug. 2016 kl. 12.54 skrev Asad ur Rehman :
> 
>  from sh import fs_cli 
> this is also not working ...

What's the error message? Did you install the 'sh' module (pip install sh)?

Erik

-- 
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/BB27E6C3-B9F8-4E9D-BF9B-DA9552387050%40cederstrand.dk.
For more options, visit https://groups.google.com/d/optout.


Re: How o run shell command in Django ?

2016-08-08 Thread M Hashmi
Install sh with pip.
http://amoffat.github.io/

On Mon, Aug 8, 2016 at 3:54 AM, Asad ur Rehman 
wrote:

>  from sh import fs_cli
> this is also not working ...
>
>
>
>
> On Monday, August 8, 2016 at 2:33:12 PM UTC+5, Asad ur Rehman wrote:
>>
>> I want to run *fs_cli -x *command in django . Can anybody help me ?
>> How can i create function in django to execute this command ?
>>
> --
> 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/17d5d75e-12a3-4dfd-843f-22ad7cab1dce%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANoUts4c-%2BtAAo%3DTEw5fFes5bHYwuywEcK9ef%2Bci2SYb%3D0bs6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using non-ASCII app name via Apache server

2016-08-08 Thread M Hashmi
Please makemigrations/migrate and restart server. It says its not getting
proper data from wsgi.py.
wsgi.py is not able to stream data to httpd because it has internal issues.
Also to see if project is working fine please always use runserver so you
can see django related errors. Otherwise you will struggle to seprate httpd
erros from djagno erros.

Regards,
Mudassar

On Mon, Aug 8, 2016 at 4:01 AM, Göran Uddeborg  wrote:

> M Hashmi:
> > Reply me back I am waiting. Apologies if my assumption caused your time.
>
> No need to apologize!  You are trying to help me.  I'm grateful.
>
> In doing my simplified test case, I forgot to add the new app to
> INSTALLED_APP.  Thanks for the pointer!
>
> But after fixing that, I get an "Internal Server Error" instead, and
> the log files contains the traceback below.  Some of the time stamps
> are in local time (UTC+2) and some are in UTC.  I guess that is just
> some idiosyncrasy of Apache httpd and mod_wsgi.
>
> The test server, "./manage.py runserver" still works fine.
>
> (I also attach the updated site tree.  There is just a small change,
> but the entire site is so small so I thought it was ok.)
>
> [Mon Aug 08 12:49:59.214434 2016] [core:notice] [pid 12016] SELinux
> policy enabled; httpd running as context system_u:system_r:httpd_t:
> SystemLow
> [Mon Aug 08 12:49:59.215009 2016] [ssl:info] [pid 12016] AH01887: Init:
> Initializing (virtual) servers for SSL
> [Mon Aug 08 12:49:59.215550 2016] [ssl:info] [pid 12016] AH01876:
> mod_ssl/2.4.23 compiled against Server: Apache/2.4.23, Library:
> OpenSSL/1.0.2h
> [Mon Aug 08 12:49:59.216226 2016] [suexec:notice] [pid 12016] AH01232:
> suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
> [Mon Aug 08 12:49:59.252466 2016] [auth_digest:notice] [pid 12016]
> AH01757: generating secret for digest authentication ...
> [Mon Aug 08 12:49:59.252819 2016] [socache_shmcb:info] [pid 12016]
> AH00830: Shared memory socache initialised
> [Mon Aug 08 12:49:59.252826 2016] [ssl:info] [pid 12016] AH01887: Init:
> Initializing (virtual) servers for SSL
> [Mon Aug 08 12:49:59.253247 2016] [ssl:info] [pid 12016] AH01876:
> mod_ssl/2.4.23 compiled against Server: Apache/2.4.23, Library:
> OpenSSL/1.0.2h
> [Mon Aug 08 12:49:59.253272 2016] [http2:info] [pid 12016] AH03090:
> mod_http2 (v1.5.11, feats=CHPRIO+SHA256, nghttp2 1.7.1), initializing...
> [Mon Aug 08 12:49:59.254005 2016] [lbmethod_heartbeat:notice] [pid 12016]
> AH02282: No slotmem from mod_heartmonitor
> [Mon Aug 08 12:49:59.279641 2016] [wsgi:info] [pid 12021] mod_wsgi
> (pid=12021): Initializing Python.
> [Mon Aug 08 12:49:59.281769 2016] [mpm_prefork:notice] [pid 12016]
> AH00163: Apache/2.4.23 (Fedora) OpenSSL/1.0.2h-fips PHP/5.6.23
> mod_wsgi/4.4.8 Python/3.5.1 configured -- resuming normal operations
> [Mon Aug 08 12:49:59.281802 2016] [mpm_prefork:info] [pid 12016] AH00164:
> Server built: Jul 18 2016 15:38:14
> [Mon Aug 08 12:49:59.281815 2016] [core:notice] [pid 12016] AH00094:
> Command line: '/usr/sbin/httpd -D FOREGROUND'
> [Mon Aug 08 12:49:59.282035 2016] [wsgi:info] [pid 12020] mod_wsgi
> (pid=12020): Initializing Python.
> [Mon Aug 08 12:49:59.284088 2016] [wsgi:info] [pid 12027] mod_wsgi
> (pid=12027): Initializing Python.
> [Mon Aug 08 12:49:59.291791 2016] [wsgi:info] [pid 12022] mod_wsgi
> (pid=12022): Initializing Python.
> [Mon Aug 08 12:49:59.312125 2016] [wsgi:info] [pid 12043] mod_wsgi
> (pid=12043): Initializing Python.
> [Mon Aug 08 12:49:59.317964 2016] [wsgi:info] [pid 12020] mod_wsgi
> (pid=12020): Attach interpreter ''.
> [Mon Aug 08 12:49:59.320378 2016] [wsgi:info] [pid 12027] mod_wsgi
> (pid=12027): Attach interpreter ''.
> [Mon Aug 08 12:49:59.321265 2016] [wsgi:info] [pid 12020] mod_wsgi
> (pid=12020): Adding '/var/www/dyn' to path.
> [Mon Aug 08 12:49:59.323805 2016] [wsgi:info] [pid 12027] mod_wsgi
> (pid=12027): Adding '/var/www/dyn' to path.
> [Mon Aug 08 12:49:59.327720 2016] [wsgi:info] [pid 12022] mod_wsgi
> (pid=12022): Attach interpreter ''.
> [Mon Aug 08 12:49:59.330202 2016] [wsgi:info] [pid 12022] mod_wsgi
> (pid=12022): Adding '/var/www/dyn' to path.
> [Mon Aug 08 12:49:59.331290 2016] [wsgi:info] [pid 12021] mod_wsgi
> (pid=12021): Attach interpreter ''.
> [Mon Aug 08 12:49:59.334499 2016] [wsgi:info] [pid 12021] mod_wsgi
> (pid=12021): Adding '/var/www/dyn' to path.
> [Mon Aug 08 12:49:59.344669 2016] [wsgi:info] [pid 12043] mod_wsgi
> (pid=12043): Attach interpreter ''.
> [Mon Aug 08 12:49:59.347136 2016] [wsgi:info] [pid 12043] mod_wsgi
> (pid=12043): Adding '/var/www/dyn' to path.
> [Mon Aug 08 12:50:09.731008 2016] [wsgi:info] [pid 12020] mod_wsgi
> (pid=12020): Create interpreter 'www.uddeborg.se|/dyn'.
> [Mon Aug 08 12:50:09.740547 2016] [wsgi:info] [pid 12020] mod_wsgi
> (pid=12020): Adding '/var/www/dyn' to path.
> [Mon Aug 08 12:50:09.741401 2016] [wsgi:info] [pid 12020] [client
> 62.65.125.225:47982] mod_wsgi (pid=12020, process='', application='
> www.uddeborg.se|/dyn'): Loading WSGI script '/var/www/dyn/dynsite/ws

Re: How o run shell command in Django ?

2016-08-08 Thread Asad ur Rehman
sh is already installed

On Monday, August 8, 2016 at 2:33:12 PM UTC+5, Asad ur Rehman wrote:
>
> I want to run *fs_cli -x *command in django . Can anybody help me ?
> How can i create function in django to execute this command ?
>

-- 
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/c618ad8e-405b-4b85-a912-3f7bd2ad2155%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How o run shell command in Django ?

2016-08-08 Thread Asad ur Rehman
Internal server error is coming..

On Monday, August 8, 2016 at 2:33:12 PM UTC+5, Asad ur Rehman wrote:
>
> I want to run *fs_cli -x *command in django . Can anybody help me ?
> How can i create function in django to execute this command ?
>

-- 
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/f67108a7-ccab-4f66-897b-821096df7498%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How o run shell command in Django ?

2016-08-08 Thread M Hashmi
Send error.

On Mon, Aug 8, 2016 at 4:14 AM, Asad ur Rehman 
wrote:

> Internal server error is coming..
>
> On Monday, August 8, 2016 at 2:33:12 PM UTC+5, Asad ur Rehman wrote:
>>
>> I want to run *fs_cli -x *command in django . Can anybody help me ?
>> How can i create function in django to execute this command ?
>>
> --
> 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/f67108a7-ccab-4f66-897b-821096df7498%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANoUts6Y2ZnXretNxbK0e4EFCMtOoL11McduadePyTY6Wjp4fA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How o run shell command in Django ?

2016-08-08 Thread Asad ur Rehman


On Monday, August 8, 2016 at 2:33:12 PM UTC+5, Asad ur Rehman wrote:
>
> I want to run *fs_cli -x *command in django . Can anybody help me ?
> How can i create function in django to execute this command ?
>

-- 
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/7f694e9c-806f-4f52-910b-26efaf344986%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How o run shell command in Django ?

2016-08-08 Thread Erik Cederstrand

> Den 8. aug. 2016 kl. 13.14 skrev Asad ur Rehman :
> 
> Internal server error is coming..

If you want help, please be much more specific in your replies; post the 
relevant parts of the code, stacktraces, what have you tried already etc.

I assume you already added the code to your Django project and "Internal Server 
Error" is what you see in the browser. You need to set DEBUG=True in 
settings.py so you get better error reports than just an HTTP 500.

But start by verifying that the code snippet I sent previously actually works. 
Start a Python interpreter from the commandline (make sure you're in the same 
virtualenv as the server running your Django code) and do:

>>> from sh import fs_cli

If that works, we need a full stacktrace from Django to see what's going on.

Erik

-- 
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/0AB65718-BF99-4364-9086-EEC435CBE1D0%40cederstrand.dk.
For more options, visit https://groups.google.com/d/optout.


Re: Using non-ASCII app name via Apache server

2016-08-08 Thread Göran Uddeborg
> Please makemigrations/migrate and restart server. It says its not getting
> proper data from wsgi.py. 

As my models.py is empty, I thought I didn't need to do any
migration.  But I've done so now just in case.  It doesn't seem to
change anything.

> wsgi.py is not able to stream data to httpd because it has internal issues.

Yes, I understand it fails with a traceback.  What I don't understand
is why it fails.

> Also to see if project is working fine please always use runserver so you can
> see django related errors.

I briefly mentioned that.  It works fine with runserver.  No error
message, and the page is served fine.  There is obviously something
different in the WSGI case.  But what, I wonder.

Most recent traceback from the httpd log:

[Mon Aug 08 13:27:36.777315 2016] [wsgi:info] [pid 14003] [client 
62.65.125.225:51998] mod_wsgi (pid=14003, process='', 
application='www.uddeborg.se|/dyn'): Loading WSGI script 
'/var/www/dyn/dynsite/wsgi.py'.
[Mon Aug 08 11:27:37.084022 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998] mod_wsgi (pid=14003): Target WSGI script 
'/var/www/dyn/dynsite/wsgi.py' cannot be loaded as Python module.
[Mon Aug 08 11:27:37.084100 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998] mod_wsgi (pid=14003): Exception occurred processing WSGI 
script '/var/www/dyn/dynsite/wsgi.py'.
[Mon Aug 08 11:27:37.084961 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998] Traceback (most recent call last):
[Mon Aug 08 11:27:37.085025 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998]   File "/var/www/dyn/dynsite/wsgi.py", line 16, in 
[Mon Aug 08 11:27:37.085030 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998] application = get_wsgi_application()
[Mon Aug 08 11:27:37.085041 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998]   File 
"/usr/lib/python3.5/site-packages/django/core/wsgi.py", line 13, in 
get_wsgi_application
[Mon Aug 08 11:27:37.085046 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998] django.setup()
[Mon Aug 08 11:27:37.085055 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998]   File 
"/usr/lib/python3.5/site-packages/django/__init__.py", line 18, in setup
[Mon Aug 08 11:27:37.085060 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998] apps.populate(settings.INSTALLED_APPS)
[Mon Aug 08 11:27:37.085070 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998]   File 
"/usr/lib/python3.5/site-packages/django/apps/registry.py", line 85, in populate
[Mon Aug 08 11:27:37.085075 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998] app_config = AppConfig.create(entry)
[Mon Aug 08 11:27:37.085084 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998]   File 
"/usr/lib/python3.5/site-packages/django/apps/config.py", line 116, in create
[Mon Aug 08 11:27:37.085089 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998] mod = import_module(mod_path)
[Mon Aug 08 11:27:37.085098 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998]   File "/usr/lib64/python3.5/importlib/__init__.py", line 
126, in import_module
[Mon Aug 08 11:27:37.085103 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998] return _bootstrap._gcd_import(name[level:], package, 
level)
[Mon Aug 08 11:27:37.085112 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998]   File "", line 986, in 
_gcd_import
[Mon Aug 08 11:27:37.085121 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998]   File "", line 969, in 
_find_and_load
[Mon Aug 08 11:27:37.085131 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998]   File "", line 944, in 
_find_and_load_unlocked
[Mon Aug 08 11:27:37.085140 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998]   File "", line 222, in 
_call_with_frames_removed
[Mon Aug 08 11:27:37.085149 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998]   File "", line 986, in 
_gcd_import
[Mon Aug 08 11:27:37.085158 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998]   File "", line 969, in 
_find_and_load
[Mon Aug 08 11:27:37.085168 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998]   File "", line 956, in 
_find_and_load_unlocked
[Mon Aug 08 11:27:37.085189 2016] [wsgi:error] [pid 14003] [client 
62.65.125.225:51998] ImportError: No module named 'app\xc3\xa5\xc3\xa4\xc3\xb6'

-- 
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/22440.28123.900658.308986%40gargle.gargle.HOWL.
For more options, visit https://groups.google.com/d/optout.


Re: Using non-ASCII app name via Apache server

2016-08-08 Thread M Hashmi
In traceback the error is in last line. Somehow it is trying to import
something that is returning response as string.
Can you kindly post your installed apps again and root urls.py in project
directory. So I can compare urls and app imports side by side.

You said you have nothing in your app models so is there nothing at all in
app?

Regards,
Mudassar


On Mon, Aug 8, 2016 at 4:32 AM, Göran Uddeborg  wrote:

> > Please makemigrations/migrate and restart server. It says its not getting
> > proper data from wsgi.py.
>
> As my models.py is empty, I thought I didn't need to do any
> migration.  But I've done so now just in case.  It doesn't seem to
> change anything.
>
> > wsgi.py is not able to stream data to httpd because it has internal
> issues.
>
> Yes, I understand it fails with a traceback.  What I don't understand
> is why it fails.
>
> > Also to see if project is working fine please always use runserver so
> you can
> > see django related errors.
>
> I briefly mentioned that.  It works fine with runserver.  No error
> message, and the page is served fine.  There is obviously something
> different in the WSGI case.  But what, I wonder.
>
> Most recent traceback from the httpd log:
>
> [Mon Aug 08 13:27:36.777315 2016] [wsgi:info] [pid 14003] [client
> 62.65.125.225:51998] mod_wsgi (pid=14003, process='', application='
> www.uddeborg.se|/dyn'): Loading WSGI script '/var/www/dyn/dynsite/wsgi.py'
> .
> [Mon Aug 08 11:27:37.084022 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998] mod_wsgi (pid=14003): Target WSGI script
> '/var/www/dyn/dynsite/wsgi.py' cannot be loaded as Python module.
> [Mon Aug 08 11:27:37.084100 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998] mod_wsgi (pid=14003): Exception occurred processing
> WSGI script '/var/www/dyn/dynsite/wsgi.py'.
> [Mon Aug 08 11:27:37.084961 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998] Traceback (most recent call last):
> [Mon Aug 08 11:27:37.085025 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998]   File "/var/www/dyn/dynsite/wsgi.py", line 16, in
> 
> [Mon Aug 08 11:27:37.085030 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998] application = get_wsgi_application()
> [Mon Aug 08 11:27:37.085041 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998]   File 
> "/usr/lib/python3.5/site-packages/django/core/wsgi.py",
> line 13, in get_wsgi_application
> [Mon Aug 08 11:27:37.085046 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998] django.setup()
> [Mon Aug 08 11:27:37.085055 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998]   File 
> "/usr/lib/python3.5/site-packages/django/__init__.py",
> line 18, in setup
> [Mon Aug 08 11:27:37.085060 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998] apps.populate(settings.INSTALLED_APPS)
> [Mon Aug 08 11:27:37.085070 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998]   File "/usr/lib/python3.5/site-
> packages/django/apps/registry.py", line 85, in populate
> [Mon Aug 08 11:27:37.085075 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998] app_config = AppConfig.create(entry)
> [Mon Aug 08 11:27:37.085084 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998]   File "/usr/lib/python3.5/site-
> packages/django/apps/config.py", line 116, in create
> [Mon Aug 08 11:27:37.085089 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998] mod = import_module(mod_path)
> [Mon Aug 08 11:27:37.085098 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998]   File "/usr/lib64/python3.5/importlib/__init__.py",
> line 126, in import_module
> [Mon Aug 08 11:27:37.085103 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998] return _bootstrap._gcd_import(name[level:],
> package, level)
> [Mon Aug 08 11:27:37.085112 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998]   File "", line 986, in
> _gcd_import
> [Mon Aug 08 11:27:37.085121 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998]   File "", line 969, in
> _find_and_load
> [Mon Aug 08 11:27:37.085131 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998]   File "", line 944, in
> _find_and_load_unlocked
> [Mon Aug 08 11:27:37.085140 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998]   File "", line 222, in
> _call_with_frames_removed
> [Mon Aug 08 11:27:37.085149 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998]   File "", line 986, in
> _gcd_import
> [Mon Aug 08 11:27:37.085158 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998]   File "", line 969, in
> _find_and_load
> [Mon Aug 08 11:27:37.085168 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998]   File "", line 956, in
> _find_and_load_unlocked
> [Mon Aug 08 11:27:37.085189 2016] [wsgi:error] [pid 14003] [client
> 62.65.125.225:51998] ImportError: No module named
> 'app\xc3\xa5\xc3\xa4\xc3\xb6'
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users

Re: How o run shell command in Django ?

2016-08-08 Thread Asad ur Rehman
tail -f /var/log/newfies/gunicorn_newfies_dialer.log


when i try to find error through this always give no module named urls. 
Debug is already = True

On Monday, August 8, 2016 at 2:33:12 PM UTC+5, Asad ur Rehman wrote:
>
> I want to run *fs_cli -x *command in django . Can anybody help me ?
> How can i create function in django to execute this command ?
>

-- 
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/c7848c6a-2031-4cb2-bab1-2c3dfc609b77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How o run shell command in Django ?

2016-08-08 Thread M Hashmi
Send your root urls.py code.

On Mon, Aug 8, 2016 at 4:42 AM, Asad ur Rehman 
wrote:

> tail -f /var/log/newfies/gunicorn_newfies_dialer.log
>
>
> when i try to find error through this always give no module named urls.
> Debug is already = True
>
> On Monday, August 8, 2016 at 2:33:12 PM UTC+5, Asad ur Rehman wrote:
>>
>> I want to run *fs_cli -x *command in django . Can anybody help me ?
>> How can i create function in django to execute this command ?
>>
> --
> 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/c7848c6a-2031-4cb2-bab1-2c3dfc609b77%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANoUts5sQt_cVOa4K8ZrZDpCFnxErGPczUta_69Y9tJq0ZoT%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using non-ASCII app name via Apache server

2016-08-08 Thread M Hashmi
http://stackoverflow.com/questions/728891/correct-way-to-define-python-source-code-encoding

On Mon, Aug 8, 2016 at 4:41 AM, M Hashmi  wrote:

> In traceback the error is in last line. Somehow it is trying to import
> something that is returning response as string.
> Can you kindly post your installed apps again and root urls.py in project
> directory. So I can compare urls and app imports side by side.
>
> You said you have nothing in your app models so is there nothing at all in
> app?
>
> Regards,
> Mudassar
>
>
> On Mon, Aug 8, 2016 at 4:32 AM, Göran Uddeborg  wrote:
>
>> > Please makemigrations/migrate and restart server. It says its not
>> getting
>> > proper data from wsgi.py.
>>
>> As my models.py is empty, I thought I didn't need to do any
>> migration.  But I've done so now just in case.  It doesn't seem to
>> change anything.
>>
>> > wsgi.py is not able to stream data to httpd because it has internal
>> issues.
>>
>> Yes, I understand it fails with a traceback.  What I don't understand
>> is why it fails.
>>
>> > Also to see if project is working fine please always use runserver so
>> you can
>> > see django related errors.
>>
>> I briefly mentioned that.  It works fine with runserver.  No error
>> message, and the page is served fine.  There is obviously something
>> different in the WSGI case.  But what, I wonder.
>>
>> Most recent traceback from the httpd log:
>>
>> [Mon Aug 08 13:27:36.777315 2016] [wsgi:info] [pid 14003] [client
>> 62.65.125.225:51998] mod_wsgi (pid=14003, process='', application='
>> www.uddeborg.se|/dyn'): Loading WSGI script
>> '/var/www/dyn/dynsite/wsgi.py'.
>> [Mon Aug 08 11:27:37.084022 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998] mod_wsgi (pid=14003): Target WSGI script
>> '/var/www/dyn/dynsite/wsgi.py' cannot be loaded as Python module.
>> [Mon Aug 08 11:27:37.084100 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998] mod_wsgi (pid=14003): Exception occurred processing
>> WSGI script '/var/www/dyn/dynsite/wsgi.py'.
>> [Mon Aug 08 11:27:37.084961 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998] Traceback (most recent call last):
>> [Mon Aug 08 11:27:37.085025 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998]   File "/var/www/dyn/dynsite/wsgi.py", line 16, in
>> 
>> [Mon Aug 08 11:27:37.085030 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998] application = get_wsgi_application()
>> [Mon Aug 08 11:27:37.085041 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998]   File 
>> "/usr/lib/python3.5/site-packages/django/core/wsgi.py",
>> line 13, in get_wsgi_application
>> [Mon Aug 08 11:27:37.085046 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998] django.setup()
>> [Mon Aug 08 11:27:37.085055 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998]   File 
>> "/usr/lib/python3.5/site-packages/django/__init__.py",
>> line 18, in setup
>> [Mon Aug 08 11:27:37.085060 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998] apps.populate(settings.INSTALLED_APPS)
>> [Mon Aug 08 11:27:37.085070 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998]   File 
>> "/usr/lib/python3.5/site-packages/django/apps/registry.py",
>> line 85, in populate
>> [Mon Aug 08 11:27:37.085075 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998] app_config = AppConfig.create(entry)
>> [Mon Aug 08 11:27:37.085084 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998]   File 
>> "/usr/lib/python3.5/site-packages/django/apps/config.py",
>> line 116, in create
>> [Mon Aug 08 11:27:37.085089 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998] mod = import_module(mod_path)
>> [Mon Aug 08 11:27:37.085098 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998]   File "/usr/lib64/python3.5/importlib/__init__.py",
>> line 126, in import_module
>> [Mon Aug 08 11:27:37.085103 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998] return _bootstrap._gcd_import(name[level:],
>> package, level)
>> [Mon Aug 08 11:27:37.085112 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998]   File "", line 986,
>> in _gcd_import
>> [Mon Aug 08 11:27:37.085121 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998]   File "", line 969,
>> in _find_and_load
>> [Mon Aug 08 11:27:37.085131 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998]   File "", line 944,
>> in _find_and_load_unlocked
>> [Mon Aug 08 11:27:37.085140 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998]   File "", line 222,
>> in _call_with_frames_removed
>> [Mon Aug 08 11:27:37.085149 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998]   File "", line 986,
>> in _gcd_import
>> [Mon Aug 08 11:27:37.085158 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998]   File "", line 969,
>> in _find_and_load
>> [Mon Aug 08 11:27:37.085168 2016] [wsgi:error] [pid 14003] [client
>> 62.65.125.225:51998]   File "", line 956,
>> in _find_and_lo

Re: Please Can Some one Help me To get my static files load my default CSS files

2016-08-08 Thread Timothy Steele
M Hashmi
Thanks
For the response it work for me.
I will like you to also give me a step by step process on how to add a
template downloaded
so that i can change the default template

On Mon, Aug 8, 2016 at 11:49 AM, M Hashmi  wrote:

> You need to set your static in settings.py and I am giving you simplest
> idea you can implement with no issues.
>
> STATIC_URL = '/static/'
> STATIC_ROOT = os.path.join(BASE_DIR, 'static', 'static-only')
> MEDIA_URL = '/media/'
> MEDIA_ROOT = os.path.join(BASE_DIR, 'static', 'media')
> STATICFILES_DIRS = [
>os.path.join(BASE_DIR, 'static', 'static'),
> ]
>
> Now in your project source folder create a new folder named 'static' which
> will refer to values in blue.
> In your 'static' in blue folder create subfolders with names 'media',
> static-only', 'templates' and 'static' again. So hierarchy should look like
> this:
>
> static
> static
> media
> static-only
> templates
>
> In your settings.py in "TEMPLATE" section find simalr line like below and
> change it as I did.
>
> 'DIRS': [os.path.join(BASE_DIR, 'static', 'templates')],
>
> Now go to your terminal (command shell) and run following command.
> ./manage.py collectstatic
>
> It will ask you are you sure you want to do this. Type "yes" and press
> enter.
>
> .manage.py runserver and refresh your page.
>
> You will get all the css loaded.
>
> Furthermore you can create three new folders in your /static/static/.
>
> static
> static
>  |
>  ---css
>  |
>  ---js
>  |
>  ---images
> media
> static-only
> templates
>
> In your static/static folder you can keep the project template related
> css/js/images. All your html based code will go to /static/templates
> folder. Read the link below thorough and in case of issues you can post
> another question or to same thread.
>
> https://docs.djangoproject.com/en/1.10/howto/static-files/
>
> Regards,
> Mudassar
>
> On Mon, Aug 8, 2016 at 1:58 AM, Timothy Steele <
> steeletimothy2...@gmail.com> wrote:
>
>>
>>
>> On Monday, August 8, 2016 at 1:16:57 AM UTC+1, Timothy Steele wrote:
>>>
>>> Please any time i try to load my Django admin panel the default CSS
>>> files does not load and even i have to refresh several time before i can
>>>  the css file will load, and even if i log in still the interface become
>>> different, it does not load the CSS files. I believe this is coming form
>>> the static files which i have not loaded but i did what ever i could and it
>>> did not work for me so i need  a help please.
>>> Please below is an attach file of screen shots i took
>>>
>>> Any way i am still a beginner
>>>
>>> THANKS
>>>
>>
>> (any way this is the best group i have join so far thanks to all of you)
>>
>> PLEASE MY FRIENDS I BEG
>> can you give me a step by step process to do this
>> thanks very mach
>>
>>
>>
>> --
>> 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/ms
>> gid/django-users/7f5ae2e5-11f7-429b-b4a3-78a8d36ef787%40googlegroups.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/django-users/hiSv5Nf2z5M/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CANoUts6uCR1H5tAZaZ8x%2BfwNiZkh_zSe9qJoL00_ss9reget_
> Q%40mail.gmail.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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMcZcZ1AFdOiRA

Re: Using non-ASCII app name via Apache server

2016-08-08 Thread Göran Uddeborg
M Hashmi:
> Can you kindly post your installed apps again and root urls.py in project
> directory.

Sure, it's attached in this mail too.

> You said you have nothing in your app models so is there nothing at all in
> app?

Correct.  To isolate the problem I've made a minimal app that doesn't
do anything, just returns a message.

Of course, the real app I'm writing contains some real logic.  But
this is a test case to try to understand where it goes wrong.

-- 
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/22440.32799.23615.881465%40gargle.gargle.HOWL.
For more options, visit https://groups.google.com/d/optout.


dyn.tar.gz
Description: Binary data


Re: Using non-ASCII app name via Apache server

2016-08-08 Thread Göran Uddeborg
M Hashmi:
> http://stackoverflow.com/questions/728891/correct-way-to-define-python-source-code-encoding

I'm using UTF-8 in Python 3 where it is the default.  So that is
probably not the issue.

http://stackoverflow.com/questions/14083111/should-i-use-encoding-declaration-in-python3

-- 
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/22440.32902.459446.548379%40gargle.gargle.HOWL.
For more options, visit https://groups.google.com/d/optout.


Re: Using non-ASCII app name via Apache server

2016-08-08 Thread M Hashmi
I am sorry but I need some time for R&D coz few things about
encoding/decoding are confusing. I've tried to recreate error on my apache
live server but I couldn't create this error. Kindly wait for others to
reply or I will search it out after some time.
I am trying to add a new app on one of my prototype dressika.com. Can you
also try apt-get update/upgrade to get build releases.
Regards,

Mudassar

On Mon, Aug 8, 2016 at 5:52 AM, Göran Uddeborg  wrote:

> M Hashmi:
> > http://stackoverflow.com/questions/728891/correct-way-
> to-define-python-source-code-encoding
>
> I'm using UTF-8 in Python 3 where it is the default.  So that is
> probably not the issue.
>
> http://stackoverflow.com/questions/14083111/should-i-
> use-encoding-declaration-in-python3
>
> --
> 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/22440.32902.459446.548379%40gargle.gargle.HOWL.
> 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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANoUts6A5nXUfT5sq-hT5q2LW1W3Vc0xhMmfdadbvm90cQg-Uw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: deprecated urls as strings: problem adding second + urls to main urls.py file

2016-08-08 Thread Tim Graham
I'm not sure exactly what you're asking. Maybe you could give a concrete 
example. For a complex example, you could take a look at the urls.py for 
djangoproject.com: 
https://github.com/django/djangoproject.com/blob/249c3482982fc43afc6b6fa575fe79f938ebe472/djangoproject/urls/www.py.
 
There are many ways to structure things though.

On Saturday, August 6, 2016 at 7:16:04 PM UTC-4, Andrew Emory wrote:
>
> Is there convention on import view as vs a separate URL file in every app? 
>  
>
> Is there separate URL in each app only used if you need to use include() ??
>
>
> On Saturday, August 6, 2016 at 10:05:25 AM UTC-5, Tim Graham wrote:
>>
>> You're not missing something. You should imports. Sorry you don't like 
>> the look of it, but that's Python.
>>
>> On Saturday, August 6, 2016 at 8:42:29 AM UTC-4, Andrew Emory wrote:
>>>
>>> I am having trouble with how I would intuitively get my url patterns to 
>>> work, by listing the actual path to the view function.
>>>
>>> So it needs to be a callable, ok.  But I don't like having 15+ from 
>>> appname import views as appname_view.
>>>
>>> I can add a url.py file in each app and use include().   But then in the 
>>> app, I would do a relative view import and import all the functions to that 
>>> module...
>>>
>>> Is there a better way to do this?  Am I missing something?
>>>
>>> I am watching a tutorial on django 1.9...ha, that is my problem, I 
>>> assumed I was working on 1.9.  The latest, which is what I have installed, 
>>> is 1.10.
>>>
>>> My question still stands, would someone please share convention with me 
>>> on the best way to do this?
>>>
>>> Thank You.
>>>
>>

-- 
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/ec6ac73c-2e07-4acc-ad30-c2acddbfdb43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using non-ASCII app name via Apache server

2016-08-08 Thread Göran Uddeborg
M Hashmi:
> I am sorry but I need some time for R&D coz few things about encoding/decoding
> are confusing.

Agreed! :-)  I've always found Python's encoding handling confusing.
Not quite as much in Python 3 as in Python 2, but still.

To rule out all eventualities, I made a second app called "ascii".  It
is identical to "appåäö" except for the name.  In the trees, only the
class name and its "name" attributein apps.py differ.

If I comment out appåäö from INSTALLED_APPS in dynsite/settings.py and
from urlpatterns in dynsite/urls.py, then it works just fine.  If I
include the appåäö again I get the internal server error and the
backtrace in the log as before.  That is also if it is the ascii app I
try to access.

I attach the updated site.

> Can you also
> try apt-get update/upgrade to get build releases.

I upgraded, and I did get a newer django package.  But it didn't make
any difference.

(And in case it matters, I'm using Fedora, not a Debian derivative.  I
guess I should have mentioned that.)

-- 
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/22440.35114.793613.275251%40gargle.gargle.HOWL.
For more options, visit https://groups.google.com/d/optout.


dyn.tar.gz
Description: Updated test site


Re: Django migrations taking all the memory on Django 1.9

2016-08-08 Thread Tim Graham
I think that error suggests that you disabled migrations for an app 
(something_else) that's a dependency of another app that doesn't have 
migrations disabled (something). That isn't permitted. I guess there's no 
good solution for your requirements as of now.

On Monday, August 8, 2016 at 6:02:48 AM UTC-4, andrea crotti wrote:
>
> Since we also use --keepdb I thought we could simply avoid running all the 
> migrations, and maybe dynamically even skip all the apps that were not 
> changed at all. 
>
> So I just tried something silly like this:
>
>
> NO_MIGRATIONS = os.environ.get('NO_MIGRATIONS', 'false').lower() in 
> ('true', '1')
> if NO_MIGRATIONS:
> for app in INSTALLED_APPS:
> if app not in MIGRATION_MODULES:
> MIGRATION_MODULES[app] = None
>
>
> But I get this error:
>
> django.db.migrations.exceptions.NodeNotFoundError: Migration 
> something.0001_initial dependencies reference nonexistent parent node 
> ('something_else', u'0001_initial')
>
> So I guess it's not as simple (and maybe that ticket is what that's about, 
> but sadly it's not even merged in master now from my understanding).
>
> PS. so to clarify our tests do rely on migrations (and there are some data 
> migrations too) but since we normally use --keepdb anyway we definitively 
> not need to run only a few migrations at a time max (and even then 
> sometimes it takes ages and uses all the RAM).
>
> On Saturday, August 6, 2016 at 4:03:50 PM UTC+1, Tim Graham wrote:
>>
>> As long as your tests don't rely on any data migrations, you can set 
>> MIGRATIONS_MODULES['app'] = None for all apps in a test settings file as 
>> described in 
>> https://docs.djangoproject.com/en/stable/ref/settings/#std:setting-MIGRATION_MODULES
>>  
>> to disable migrations while testing. There's a ticket to make that a bit 
>> easier: https://code.djangoproject.com/ticket/25388
>>
>> On Saturday, August 6, 2016 at 6:07:04 AM UTC-4, andrea crotti wrote:
>>>
>>>
>>> Ok great thanks for the answer Markus.
>>> And yes I can try to help, it's quite a big issue for us..
>>> Anything else we can do to improve the situation in the meanwhile?
>>>
>>> In general I was wondering why do we need to handle all the "baggage" of 
>>> supporting backward migrations and doing things 100% properly while running 
>>> migrations just for tests.
>>>
>>> I think that in general if there was just a way to render all the SQL 
>>> that needs to be run statically for tests it would be great.
>>>
>>> On Friday, August 5, 2016 at 11:07:56 AM UTC+1, andrea crotti wrote:

 We have a very big Django project with > 100 apps and > 300 models.
 We had some massive issues with Django 1.8 and migrations, which would 
 take forever and just take all the computer memory after a while.

 Now with Django 1.9 things improved, however we are again back with 
 some extremely bad performances and massive memory usages (up to 8GB of 
 RAM 
 for example), sometimes just to run ONE single migration.

 It's not even entirely deterministic though sometimes killing the 
 process and doing it again just works.

 I'm attaching the profile graph (done wtith gprof2dot) from running 
 "./manage migrate" and one thing that clearly looks bad is that *render* 
 for example is called 44355 times, which is definitively not normal.

 Any idea about about what we can do about this and what could be the 
 problem?
 I have the impression that it's related with the amount of models and 
 how they are interconnected, and mabye some caching would avoid all this 
 extra computation.

 Noone else has similar issues?
 Thanks

>>>

-- 
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/5254bade-8708-4bf4-baeb-d4a5a7a4b643%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Adding custom Template downloaded

2016-08-08 Thread Timothy Steele
I want to get  a step by step process on how to add a django template
downloaded
so that i can over ride the default template that django give to me by
default
Please any help

Thanks

-- 
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/CAMcZcZ37diWCv8pXyOaO%2BJp36Z9erzM4jMm4bw1ZxYHsZ1YWcQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding custom Template downloaded

2016-08-08 Thread Tim Graham
I'm not sure what you're asking. Does this documentation proposal help? 
https://github.com/django/django/pull/6720

On Monday, August 8, 2016 at 9:55:23 AM UTC-4, Timothy Steele wrote:
>
> I want to get  a step by step process on how to add a django template 
> downloaded 
> so that i can over ride the default template that django give to me by 
> default
> Please any help
>
> Thanks
>
>

-- 
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/64382e2b-8198-4b26-a883-8da797200ed6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Launching websites

2016-08-08 Thread david . vaks9
Hi,

This is slightly off topic, but I can imagine some of you might have faced 
this situation. I've been launching quite a few websites lately. It usually 
involves at least the following for me:
- Domain registration and DNS setup
- Server/Host configuration: Heroku setup (registration, environment 
variables for some of the steps above) or Docker setup
- Deployment
- Security aspects: TLS certificates, HTTPS setup, HTTP security headers, 
etc
- Legal aspects: cookie policy, T&Cs, privacy, etc (implications from other 
steps)
- Email: basic setup, SPF/DKIM for the spam, create RFC email addresses, etc
- Mailing list setup (MailChimp or others)
- Social media: signup to a few social networks, add "social sharing" 
buttons
- Analytics/instrumentation/monitoring (Google Analytics, New Relic, etc)
- Search engine registration/indexation (Google, Bing)
- etc

Some of these steps are interlinked and that's only for fairly "basic 
website" without any payment, A/B testing, user feedback or advertising 
requirements.

None of it is particularly complex, although it does require some 
knowledge/experience, but it takes quite a lot of time and feels repetitive.

There are lots of great products/services for the individual steps 
involved, but I can't find anything to streamline the whole (or at least 
part of the) process.

Does anyone know any good tool, product, checklist or website for this? Do 
you have the same problem? How do you handle this yourself?

Thanks for your help.

David

-- 
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/5de3b67d-5b14-4e98-a1ae-0638addbce1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding custom Template downloaded

2016-08-08 Thread Timothy Steele

Please What I am Talking about is this 
i have download  a template from www.github.com, but i can not configure it 
and i need a help please 

On Monday, August 8, 2016 at 2:55:23 PM UTC+1, Timothy Steele wrote:
>
> I want to get  a step by step process on how to add a django template 
> downloaded 
> so that i can over ride the default template that django give to me by 
> default
> Please any help
>
> Thanks
>
>

-- 
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/763aeb71-5e3d-4b5b-95a5-ec06bbf90a43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using non-ASCII app name via Apache server

2016-08-08 Thread Göran Uddeborg
For the benefit of anyone following this thread.  I've found some
relevant information, even if I don't understand the entire picture.

The important point seems to be the locale in which the Apache server
is running.  The default Fedora configuration sets LANG=C for the
httpd server.  Apparently, that affects a lot of how Python behaves.

By adding some configuration to set LANG to a UTF-8 locale, sv_SE.utf8
in my case, things started to work.  I can now access both ascii and
appåäö, and everything seems fine.  Remains to be seen if I have
changed some other behaviour of my server in some way.

Even if I don't fully understand the interactions between the locale
setting and the Python interpreter, it works for me now.  I can
continue my work on my original app.

Thanks for the help!

-- 
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/22440.47636.729258.491836%40gargle.gargle.HOWL.
For more options, visit https://groups.google.com/d/optout.


Re: Adding custom Template downloaded

2016-08-08 Thread ludovic coues
If you haven't done a django tutorial, I highly recommend doing one.
http://tutorial.djangogirls.org/ is really friendly for beginner but
you can do the official one at
https://docs.djangoproject.com/en/1.10/intro/tutorial01/.

if you want more help than that, sharing what you have tried is a good
start. Also, a link to the template you are trying to use can help.

As the saying go, help us to help you.

2016-08-08 18:41 GMT+02:00 Timothy Steele :
>
> Please What I am Talking about is this
> i have download  a template from www.github.com, but i can not configure it
> and i need a help please
>
> On Monday, August 8, 2016 at 2:55:23 PM UTC+1, Timothy Steele wrote:
>>
>> I want to get  a step by step process on how to add a django template
>> downloaded
>> so that i can over ride the default template that django give to me by
>> default
>> Please any help
>>
>> Thanks
>>
> --
> 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/763aeb71-5e3d-4b5b-95a5-ec06bbf90a43%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
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/CAEuG%2BTZgcZOUU0bMjQViAzi%3D3m4ZjTZGtwQxd3KnFRbB-XDmBw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding custom Template downloaded

2016-08-08 Thread Fabio C. Barrionuevo da Luz
Please, explain step by step, what and how you do to get "template" from
github.

That said, when I was starting out in the world of information technology,
this text gave me several useful tips on how to ask questions in order to
have more chances to get a satisfactory answer:

http://www.catb.org/esr/faqs/smart-questions.html

-- 

Fábio C. Barrionuevo da Luz
Palmas - Tocantins - Brasil - América do Sul

http://pythonclub.com.br/

Blog colaborativo sobre Python e tecnologias Relacionadas, mantido
totalmente no https://github.com/pythonclub/pythonclub.github.io .

Todos são livres para publicar. É só fazer fork, escrever sua postagem e
mandar o pull-request. Leia mais sobre como publicar em README.md e
contributing.md.

Regra básica de postagem:

"Você" acha interessante? É útil para "você"? Pode ser utilizado com Python
ou é útil para quem usa Python? Está esperando o que? Publica logo, que
estou louco para ler...



Em 08/08/2016 13:41, "Timothy Steele" 
escreveu:

>
> Please What I am Talking about is this
> i have download  a template from www.github.com, but i can not configure
> it and i need a help please
>
> On Monday, August 8, 2016 at 2:55:23 PM UTC+1, Timothy Steele wrote:
>>
>> I want to get  a step by step process on how to add a django template
>> downloaded
>> so that i can over ride the default template that django give to me by
>> default
>> Please any help
>>
>> Thanks
>>
>> --
> 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/ms
> gid/django-users/763aeb71-5e3d-4b5b-95a5-ec06bbf90a43%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPVjvMZJsCW4-QXEadNV2a63_Lz3%3DHy9cp45wFH9vd9AfsYTxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding custom Template downloaded

2016-08-08 Thread Tim Graham
What template did you download? What template are you trying to replace?

On Monday, August 8, 2016 at 12:41:06 PM UTC-4, Timothy Steele wrote:
>
>
> Please What I am Talking about is this 
> i have download  a template from www.github.com, but i can not configure 
> it and i need a help please 
>
> On Monday, August 8, 2016 at 2:55:23 PM UTC+1, Timothy Steele wrote:
>>
>> I want to get  a step by step process on how to add a django template 
>> downloaded 
>> so that i can over ride the default template that django give to me by 
>> default
>> Please any help
>>
>> Thanks
>>
>>

-- 
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/f3e8fa95-6514-4150-b263-e0de9855b243%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding custom Template downloaded

2016-08-08 Thread Timothy Steele
THANK YOU

On Monday, August 8, 2016 at 2:55:23 PM UTC+1, Timothy Steele wrote:
>
> I want to get  a step by step process on how to add a django template 
> downloaded 
> so that i can over ride the default template that django give to me by 
> default
> Please any help
>
> Thanks
>
>

-- 
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/d2be7bbc-b213-4f64-a2a5-a3a0c578e999%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Launching websites

2016-08-08 Thread Sergiy Khohlov
Hello David,
You have mixed different tasks. I have a question for you.
What kind of goal do you have?
Are you planing to have mail server, web server, dev box etc?
How much money are you going to spend?
Do you have sysadmin ?
Of course first question has high priority.

Thanks.,
Serge

8 серп. 2016 18:20  пише:

> Hi,
>
> This is slightly off topic, but I can imagine some of you might have faced
> this situation. I've been launching quite a few websites lately. It usually
> involves at least the following for me:
> - Domain registration and DNS setup
> - Server/Host configuration: Heroku setup (registration, environment
> variables for some of the steps above) or Docker setup
> - Deployment
> - Security aspects: TLS certificates, HTTPS setup, HTTP security headers,
> etc
> - Legal aspects: cookie policy, T&Cs, privacy, etc (implications from
> other steps)
> - Email: basic setup, SPF/DKIM for the spam, create RFC email addresses,
> etc
> - Mailing list setup (MailChimp or others)
> - Social media: signup to a few social networks, add "social sharing"
> buttons
> - Analytics/instrumentation/monitoring (Google Analytics, New Relic, etc)
> - Search engine registration/indexation (Google, Bing)
> - etc
>
> Some of these steps are interlinked and that's only for fairly "basic
> website" without any payment, A/B testing, user feedback or advertising
> requirements.
>
> None of it is particularly complex, although it does require some
> knowledge/experience, but it takes quite a lot of time and feels repetitive.
>
> There are lots of great products/services for the individual steps
> involved, but I can't find anything to streamline the whole (or at least
> part of the) process.
>
> Does anyone know any good tool, product, checklist or website for this? Do
> you have the same problem? How do you handle this yourself?
>
> Thanks for your help.
>
> David
>
> --
> 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/5de3b67d-5b14-4e98-a1ae-0638addbce1b%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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADTRxJMfAGj4dcMiP%2B2jFJVeM2Kx3DGeMGbvk%3DJ%2Bk4TCXQA9Qg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


associating save link with button

2016-08-08 Thread Larry Martell
Not really a django question but I'm hoping someone can help me here.

I have a django app but the html is not displayed in a browser -
render_to_string is called and the html is returned in a response to
custom app that displays the page. On the page I have a button that
sends a request back to the server. When I click the button in the
page within the custom app app the request is sent, but the app does
not wait for the reply. However if I right click on the button and
select "Save link ...' then the app does wait for the reply and it all
works as I want.

Is there some way I can associate the "Save link ...' action with the
button so that clicking on it will function the same as when right
click save link is selected?

-- 
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/CACwCsY4_nBfccOmL86quN%3DHGWeNdnHi%2BLBwGjhiRw1j1gphxUA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using non-ASCII app name via Apache server

2016-08-08 Thread M Hashmi
Oh Great!

It was great learning for me as well while searching out the solution.
Take care Goran,

Regards,

Mudassar

On Mon, Aug 8, 2016 at 9:57 AM, Göran Uddeborg  wrote:

> For the benefit of anyone following this thread.  I've found some
> relevant information, even if I don't understand the entire picture.
>
> The important point seems to be the locale in which the Apache server
> is running.  The default Fedora configuration sets LANG=C for the
> httpd server.  Apparently, that affects a lot of how Python behaves.
>
> By adding some configuration to set LANG to a UTF-8 locale, sv_SE.utf8
> in my case, things started to work.  I can now access both ascii and
> appåäö, and everything seems fine.  Remains to be seen if I have
> changed some other behaviour of my server in some way.
>
> Even if I don't fully understand the interactions between the locale
> setting and the Python interpreter, it works for me now.  I can
> continue my work on my original app.
>
> Thanks for the help!
>
> --
> 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/22440.47636.729258.491836%40gargle.gargle.HOWL.
> 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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANoUts7YMtdpLZZoKaR%3DQmO%2BZFVr5qBTst5FvBTT4%2BABnx6MHA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Please Can Some one Help me To get my static files load my default CSS files

2016-08-08 Thread M Hashmi
You will better understand it with following link:

https://www.codingforentrepreneurs.com/projects/try-django-18/
Regards,
Mudassar

On Mon, Aug 8, 2016 at 5:26 AM, Timothy Steele 
wrote:

> M Hashmi
> Thanks
> For the response it work for me.
> I will like you to also give me a step by step process on how to add a
> template downloaded
> so that i can change the default template
>
> On Mon, Aug 8, 2016 at 11:49 AM, M Hashmi  wrote:
>
>> You need to set your static in settings.py and I am giving you simplest
>> idea you can implement with no issues.
>>
>> STATIC_URL = '/static/'
>> STATIC_ROOT = os.path.join(BASE_DIR, 'static', 'static-only')
>> MEDIA_URL = '/media/'
>> MEDIA_ROOT = os.path.join(BASE_DIR, 'static', 'media')
>> STATICFILES_DIRS = [
>>os.path.join(BASE_DIR, 'static', 'static'),
>> ]
>>
>> Now in your project source folder create a new folder named 'static'
>> which will refer to values in blue.
>> In your 'static' in blue folder create subfolders with names 'media',
>> static-only', 'templates' and 'static' again. So hierarchy should look like
>> this:
>>
>> static
>> static
>> media
>> static-only
>> templates
>>
>> In your settings.py in "TEMPLATE" section find simalr line like below and
>> change it as I did.
>>
>> 'DIRS': [os.path.join(BASE_DIR, 'static', 'templates')],
>>
>> Now go to your terminal (command shell) and run following command.
>> ./manage.py collectstatic
>>
>> It will ask you are you sure you want to do this. Type "yes" and press
>> enter.
>>
>> .manage.py runserver and refresh your page.
>>
>> You will get all the css loaded.
>>
>> Furthermore you can create three new folders in your /static/static/.
>>
>> static
>> static
>>  |
>>  ---css
>>  |
>>  ---js
>>  |
>>  ---images
>> media
>> static-only
>> templates
>>
>> In your static/static folder you can keep the project template related
>> css/js/images. All your html based code will go to /static/templates
>> folder. Read the link below thorough and in case of issues you can post
>> another question or to same thread.
>>
>> https://docs.djangoproject.com/en/1.10/howto/static-files/
>>
>> Regards,
>> Mudassar
>>
>> On Mon, Aug 8, 2016 at 1:58 AM, Timothy Steele <
>> steeletimothy2...@gmail.com> wrote:
>>
>>>
>>>
>>> On Monday, August 8, 2016 at 1:16:57 AM UTC+1, Timothy Steele wrote:

 Please any time i try to load my Django admin panel the default CSS
 files does not load and even i have to refresh several time before i can
  the css file will load, and even if i log in still the interface become
 different, it does not load the CSS files. I believe this is coming form
 the static files which i have not loaded but i did what ever i could and it
 did not work for me so i need  a help please.
 Please below is an attach file of screen shots i took

 Any way i am still a beginner

 THANKS

>>>
>>> (any way this is the best group i have join so far thanks to all of you)
>>>
>>> PLEASE MY FRIENDS I BEG
>>> can you give me a step by step process to do this
>>> thanks very mach
>>>
>>>
>>>
>>> --
>>> 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/ms
>>> gid/django-users/7f5ae2e5-11f7-429b-b4a3-78a8d36ef787%40googlegroups.com
>>> 
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/django-users/hiSv5Nf2z5M/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/ms
>> gid/django-users/CANoUts6uCR1H5tAZaZ8x%2BfwNiZkh_zSe9qJoL00_
>> ss9reget_Q%40mail.gmail.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