Re: Import css in Django

2016-09-11 Thread Mike Dewhirst
Jonathan I use the attached announce.py to display exactly where all the directories and URLs are. I had trouble in the beginning getting it straight in my head but seeing it every time I looked at the dev-server output helped a lot. Comments in announce.py show how to use it. Good luck Mi

Re: Django REST Authenticate with Session in external app

2016-09-11 Thread flaudizio
Thank's James. Very clearly now. Em domingo, 11 de setembro de 2016 19:13:45 UTC-3, James Schneider escreveu: > > On Sep 11, 2016 2:19 PM, "flaudizio" > > wrote: > > > > Hi guys, > > > > I'm a doubt about Django REST auth and an external app's (mobile, > desktop). > > > > When we work with dj

Re: Django REST Authenticate with Session in external app

2016-09-11 Thread James Schneider
On Sep 11, 2016 2:19 PM, "flaudizio" wrote: > > Hi guys, > > I'm a doubt about Django REST auth and an external app's (mobile, desktop). > > When we work with django in browser we have a session auth. To use session it's possible using django rest with an external app created in C sharp ? Or need

Re: pymssql

2016-09-11 Thread sum abiut
Thanks heaps for your comments, manage to get it work using the as_dict` parameter of the `cursor` object, cus=conn.cursor(as_dict=True) cus.execute("SELECT budget_code,budget_description,rate_type FROM glbud") for row in cus: print(row['budget_code'],row['budget_description'],row['rate_type']

Django REST Authenticate with Session in external app

2016-09-11 Thread flaudizio
Hi guys, I'm a doubt about Django REST auth and an external app's (mobile, desktop). When we work with django in browser we have a session auth. To use session it's possible using django rest with an external app created in C sharp ? Or need to work with tokens in external app consulting my Dja

Re: Import css in Django

2016-09-11 Thread ludovic coues
If you look at the html send by django, what is the href value ? 2016-09-11 19:15 GMT+02:00 Jonathan Cheng : > i fixed usint STATIC_ROOD = '/static/' > it seems to no error > but when i connect to my runserver > the css of assets just doesn't work > > > Jonathan Cheng於 2016年9月12日星期一 UTC+8上午1時04分

Re: Import css in Django

2016-09-11 Thread Jonathan Cheng
i fixed usint STATIC_ROOD = '/static/' it seems to no error but when i connect to my runserver the css of assets just doesn't work Jonathan Cheng於 2016年9月12日星期一 UTC+8上午1時04分22秒寫道: > > here i explain , because i just test how main.css work, finally i want to > use the assets and images . > and

Re: Import css in Django

2016-09-11 Thread Jonathan Cheng
thx i change into STATIC_ROOT='/static/' it seems to no error but when i connect to my runserver the css of assets just doesn't work 2016-09-12 0:44 GMT+08:00 ali Eblice : > your "mysite" folder and "static" folder are in a same directory but in > your settings.py you wrote "STATIC_ROOT='/mysite

Re: Import css in Django

2016-09-11 Thread Jonathan Cheng
here i explain , because i just test how main.css work, finally i want to use the assets and images . and i use the python mange.py collectstatic it showed ImproperlyConfigured: The STATICFILES_DIRS setting should not contain the > STATIC_ROOT setting > ludovic coues於 2016年9月12日星期一 UTC+8上午12

Re: Import css in Django

2016-09-11 Thread ludovic coues
I mentionned tree because I have doubt about what "static - assets - css - main.css" means. If your path is really /mysite/static/assets/css/main.css, then you want . At least with a debug configuration, django will search for static file in each apps' static directory for the path you used as arg

Re: AssertionError: database connection isn't set to UTC

2016-09-11 Thread Lars Olafsson
it would be great if someone could explain to me, where the offset in the function utc_tzinfo_factory comes from. My python skills apparently are not sufficient to be able to trace this in the code. /Lars On Sunday, September 11, 2016 at 4:59:56 PM UTC+2, Lars Olafsson wrote: > > Dear Reader,

Re: Import css in Django

2016-09-11 Thread ali Eblice
your "mysite" folder and "static" folder are in a same directory but in your settings.py you wrote "STATIC_ROOT='/mysite/static/'" which says that static should be subdirectory of mysite which its not a subdirectory its in a same directory of mysite On Sunday, September 11, 2016 at 8:48:57 PM U

Re: Import css in Django

2016-09-11 Thread Jonathan Cheng
https://gist.github.com/cj10243/fb557903441d4a3e95190b854fbaabe1 ludovic coues於 2016年9月12日星期一 UTC+8上午12時05分12秒寫道: > > I have a hard time to read the paths you use. The command tree produce > a nice tree view of a directory, it might help. You can also use > service like http://paste2.org/ or ht

Re: Import css in Django

2016-09-11 Thread ludovic coues
I have a hard time to read the paths you use. The command tree produce a nice tree view of a directory, it might help. You can also use service like http://paste2.org/ or https://gist.github.com/ to share it 2016-09-11 17:58 GMT+02:00 Jonathan Cheng : > thx reply,but it just can see the original h

Re: Import css in Django

2016-09-11 Thread Jonathan Cheng
thx reply,but it just can see the original html with no css,is my path setted correct? ludovic coues於 2016年9月11日星期日 UTC+8下午11時45分24秒寫道: > > Have you tried to add a few newlines to be sure about which line is the > issue ? > > Also, in you email, there is a space between % and } in the load > s

Re: Import css in Django

2016-09-11 Thread ludovic coues
Have you tried to add a few newlines to be sure about which line is the issue ? Also, in you email, there is a space between % and } in the load staticfiles tag 2016-09-11 7:29 GMT+02:00 Jonathan Cheng : > I use django1.10 > > i reference the official doc > https://docs.djangoproject.com/en/1.10/

AssertionError: database connection isn't set to UTC

2016-09-11 Thread Lars Olafsson
Dear Reader, I hope someone here can help me, resolve this issue. I have installed a new server and even though i have the same exact setup running, and I have even cloned the database from my other server. I get this error when i try to connect to Django on the web. And I cannot figure out w

Import css in Django

2016-09-11 Thread Jonathan Cheng
I use django1.10 i reference the official doc https://docs.djangoproject.com/en/1.10/intro/tutorial06/ my project name:mysite structure: - mysite- - mysite - urls.py -views.py ... - templates - ind