Re: Import css in Django

2016-09-15 Thread Jonathan Cheng
C+8上午8時43分17秒寫道: > > On 16/09/2016 1:10 AM, Jonathan Cheng wrote: > > thx your code,though i cant run it in cmd > That is correct. It is designed to be imported and called from > settings.py. > > I'll send you a screenshot off-line > > Mike > > > > -

Heroku push failed

2017-02-05 Thread Jonathan Cheng
In Win10 when i run "git push heroku master" the traceback showed: "python manage.py collectstatic" ,the python file ImportError: No module named 'markdown_deux' but i have installed the django-markdown-deux why i met this traceback?

Help: Data model in django

2017-03-09 Thread Ricken Cheng
Hi: I am a beginner using django, I want to build a flexible data model like this: Item_ID AttributeValue 1 Attr1 V1 1 Attr2 V2 2 Attr1 V3 2 Attr2 V4 1

Django Gunicorn Import Error: no module name wsgi

2017-09-03 Thread Jonathan Cheng
I use Python3.5.2 Django1.9 I use `python -m venv venv/weather_station` to create virtual evnironment (/home/user/venv) This is my project tree in Ubuntu /home/user/myproject: (`export project=/home/user/myproject`) myproject | ├── gunicorn.conf.py ├── static │ ├── admin └─

Supervisor FATAl Exited too quickly (process log may have details(About inet_http_server and unix_http_server)

2017-09-09 Thread Jonathan Cheng
I wrote a Django project and I use supervisor with gunicorn /etc/supervisor/conf.d/weather.conf [group:weather_station] programs=site [program:site] directory=$PROJECT command=/home/nhcc/.local/bin/gunicorn -c /$PROJECT/weather_station/ gunicorn.conf.py -p gunicorn.pod

The related_name of ForeignKey cannot be Unicode name after Django 1.8

2015-06-22 Thread Cheng-Hung Hsueh
This code can run before django 1.7 But "related_name" got an error after django 1.8 使用者表.來源: (fields.E306) The name '使用者' is invalid related_name for field 使用者表.來源 class 來源表(models.Model): 名 = models.CharField(max_length=100) class 使用者表(models.Model): 來源 = models.OneToOneField(來源表, re

Re: The related_name of ForeignKey cannot be Unicode name after Django 1.8

2015-06-22 Thread Cheng-Hung Hsueh
gt; > On Monday, June 22, 2015 at 11:28:50 AM UTC-4, Cheng-Hung Hsueh wrote: >> >> This code can run before django 1.7 >> But "related_name" got an error after django 1.8 >> >> 使用者表.來源: (fields.E306) The name '使用者' is invalid related_n

django.db.utils.OperationalError when remove the parent model

2016-09-13 Thread Cheng-Hung Hsueh
My original models like this class A(models.Model): data = models.CharField(max_length=30) class B(models.Model): pass Make migrations, then I modified the artitecture class A(models.Model): data = models.CharField(max_length=30) class B(models.Model): pass Make migration and

Re: django.db.utils.OperationalError when remove the parent model

2016-09-13 Thread Cheng-Hung Hsueh
The sample project: https://github.com/sih4sing5hong5/django_migration_error -- 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...@googlegroup

Re: django.db.utils.OperationalError when remove the parent model

2016-09-13 Thread Cheng-Hung Hsueh
I tyied with some new filed in model B. class A(models.Model): data = models.CharField(max_length=30) class B(A): data2 = models.CharField(max_length=30) to class A(models.Model): data = models.CharField(max_length=30) class B(models.Model): data2 = models.CharField(max_length

Cannot access imported functions in django shell by pipeline command

2017-08-24 Thread Cheng-Hung Hsueh
It is a python script `tshi3.py` : 在此輸入代碼... import csv def li2ho2(): print(csv) li2ho2() I copied this code and pasted it in `python manage.py shell`. It works. But I ran `python manage.py shell < tshi3.py`. Got `NameError: name 'csv' is not defined.` Why? Enviromen

Fail to create Django registration form with email and password only

2018-08-19 Thread Yan Cheng Cheok
Creating basic registration/ authentication in Django is insanely hard. After many tries, I manage to create basic registration/ authentication in Django using username and password. [image: enter image description here] The code is shown in https://gi

<    1   2