Re: CSS not working

2019-10-13 Thread Rajkumar Mittal
sure


On Friday, 11 October 2019 08:48:42 UTC+5:30, yasar arafath Kajamydeen 
wrote:
>
> Hi All,
>
> I just added style sheet in my application but its not working , Please 
> try to help me.
>
>
> Setting.py
>
>
>
> import os
>
> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>
>
> # Quick-start development settings - unsuitable for production
> # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
>
> # SECURITY WARNING: keep the secret key used in production secret!
> SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'
>
> # SECURITY WARNING: don't run with debug turned on in production!
> DEBUG = True
>
> ALLOWED_HOSTS = []
>
>
> # Application definition
>
> INSTALLED_APPS = [
> 'polls.apps.PollsConfig',
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
>
>
> ]
>
> MIDDLEWARE = [
> 'django.middleware.security.SecurityMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.common.CommonMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
> ]
>
> ROOT_URLCONF = 'telusko.urls'
>
>
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> 'DIRS': [os.path.join(BASE_DIR,'templates')],
> 'APP_DIRS': True,
> 'OPTIONS': {
> 'context_processors': [
> 'django.template.context_processors.debug',
> 'django.template.context_processors.request',
> 'django.contrib.auth.context_processors.auth',
> 'django.contrib.messages.context_processors.messages',
> ],
> },
> },
> ]
>
> WSGI_APPLICATION = 'telusko.wsgi.application'
>
>
> # Database
> # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.sqlite3',
> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to database 
> file if using sqlite3.
> 'USER': '',  # Not used with sqlite3.
> 'PASSWORD': '',  # Not used with sqlite3.
> 'HOST': '',  # Set to empty string for localhost. Not used with 
> sqlite3.
> 'PORT': '',
> }
> }
>
>
> # Password validation
> # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
>
> AUTH_PASSWORD_VALIDATORS = [
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.MinimumLengthValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.CommonPasswordValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.NumericPasswordValidator',
> },
> ]
>
>
> # Internationalization
> # https://docs.djangoproject.com/en/2.2/topics/i18n/
>
> LANGUAGE_CODE = 'en-us'
>
> TIME_ZONE = 'UTC'
>
> USE_I18N = True
>
> USE_L10N = True
>
> USE_TZ = True
>
>
> # Static files (CSS, JavaScript, Images)
> # https://docs.djangoproject.com/en/2.2/howto/static-files/
>
> STATIC_URL = '/static/'
> STATICFILES_DIRS = [
> os.path.join(BASE_DIR, 'style.css'),
> ]
>
>
>
>
>
> *style.css*
>
>
>
>
> li a {
> color: green;
> }
>
>
>
>
>
>
>
> *index.html*
>
>
> {% load static %}
>
> 
> {% if latest_question_list %}
> 
> {% for question in latest_question_list %}
>   {{ 
> question.question_text }}
> {% endfor %}
> 
> {% else %}
> No polls are available.
> {% endif %}
>
>
>
>
>
> Regards,
>
> Yasar Arafath K
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c99ce60a-0910-44e2-b20c-5650d27aba9b%40googlegroups.com.


Re: CSS not working

2019-10-13 Thread Suraj Thapa FC
Ya sure

On Sun, 13 Oct, 2019, 6:34 PM No Name,  wrote:

> guys can we make a groupchat on whatsapp?
>
> On Fri, Oct 11, 2019 at 4:19 AM yasar arafath Kajamydeen <
> yasar...@gmail.com> wrote:
>
>> Hi All,
>>
>> I just added style sheet in my application but its not working , Please
>> try to help me.
>>
>>
>> Setting.py
>>
>>
>>
>> import os
>>
>> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
>> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>>
>>
>> # Quick-start development settings - unsuitable for production
>> # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
>>
>> # SECURITY WARNING: keep the secret key used in production secret!
>> SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'
>>
>> # SECURITY WARNING: don't run with debug turned on in production!
>> DEBUG = True
>>
>> ALLOWED_HOSTS = []
>>
>>
>> # Application definition
>>
>> INSTALLED_APPS = [
>> 'polls.apps.PollsConfig',
>> 'django.contrib.admin',
>> 'django.contrib.auth',
>> 'django.contrib.contenttypes',
>> 'django.contrib.sessions',
>> 'django.contrib.messages',
>> 'django.contrib.staticfiles',
>>
>>
>> ]
>>
>> MIDDLEWARE = [
>> 'django.middleware.security.SecurityMiddleware',
>> 'django.contrib.sessions.middleware.SessionMiddleware',
>> 'django.middleware.common.CommonMiddleware',
>> 'django.middleware.csrf.CsrfViewMiddleware',
>> 'django.contrib.auth.middleware.AuthenticationMiddleware',
>> 'django.contrib.messages.middleware.MessageMiddleware',
>> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
>> ]
>>
>> ROOT_URLCONF = 'telusko.urls'
>>
>>
>> TEMPLATES = [
>> {
>> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
>> 'DIRS': [os.path.join(BASE_DIR,'templates')],
>> 'APP_DIRS': True,
>> 'OPTIONS': {
>> 'context_processors': [
>> 'django.template.context_processors.debug',
>> 'django.template.context_processors.request',
>> 'django.contrib.auth.context_processors.auth',
>> 'django.contrib.messages.context_processors.messages',
>> ],
>> },
>> },
>> ]
>>
>> WSGI_APPLICATION = 'telusko.wsgi.application'
>>
>>
>> # Database
>> # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
>>
>> DATABASES = {
>> 'default': {
>> 'ENGINE': 'django.db.backends.sqlite3',
>> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to database 
>> file if using sqlite3.
>> 'USER': '',  # Not used with sqlite3.
>> 'PASSWORD': '',  # Not used with sqlite3.
>> 'HOST': '',  # Set to empty string for localhost. Not used with 
>> sqlite3.
>> 'PORT': '',
>> }
>> }
>>
>>
>> # Password validation
>> # 
>> https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
>>
>> AUTH_PASSWORD_VALIDATORS = [
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
>> },
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.MinimumLengthValidator',
>> },
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.CommonPasswordValidator',
>> },
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.NumericPasswordValidator',
>> },
>> ]
>>
>>
>> # Internationalization
>> # https://docs.djangoproject.com/en/2.2/topics/i18n/
>>
>> LANGUAGE_CODE = 'en-us'
>>
>> TIME_ZONE = 'UTC'
>>
>> USE_I18N = True
>>
>> USE_L10N = True
>>
>> USE_TZ = True
>>
>>
>> # Static files (CSS, JavaScript, Images)
>> # https://docs.djangoproject.com/en/2.2/howto/static-files/
>>
>> STATIC_URL = '/static/'
>> STATICFILES_DIRS = [
>> os.path.join(BASE_DIR, 'style.css'),
>> ]
>>
>>
>>
>>
>>
>> *style.css*
>>
>>
>>
>>
>> li a {
>> color: green;
>> }
>>
>>
>>
>>
>>
>>
>>
>> *index.html*
>>
>>
>> {% load static %}
>>
>> 
>> {% if latest_question_list %}
>> 
>> {% for question in latest_question_list %}
>>   {{ 
>> question.question_text }}
>> {% endfor %}
>> 
>> {% else %}
>> No polls are available.
>> {% endif %}
>>
>>
>>
>>
>>
>> Regards,
>>
>> Yasar Arafath K
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/3a71830f-e494-47b0-be2d-6d43e8d7cb27%40googlegroups.com
>> 
>> .
>>
> --
> 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 dj

Re: CSS not working

2019-10-12 Thread yasar arafath Kajamydeen
*@ Jani *- Tried the same no reaction in page.

Please find the att (test.xlsx).



*Regards,*
*Yasar Arafath K*




On Saturday, October 12, 2019 at 6:39:30 AM UTC+8, Jani Tiainen wrote:
>
> Hi.
>
> As you see Django indeed found your static file.
>
> Next step is to open up developer tools in browser and load your page. You 
> should be able to use it to determine was file even loaded and was your 
> style applied to link 
>
> Note that if I'm not mistaken plain color only affects unvisited links and 
> visited link may stay different colored and thus seemingly you see that it 
> wasn't doing "nothing".
>
>
> pe 11. lokak. 2019 klo 9.30 yasar arafath Kajamydeen  > kirjoitti:
>
>> *@ Jani - Executed the  given cmd, Please find the output and please 
>> guide me further ..*
>>
>>
>> (mypython) C:\Users\kajamydeenya\telusko>python manage.py findstatic -v 3 
>> polls/style.css
>> Found 'polls/style.css' here:
>>   C:\Users\kajamydeenya\telusko\polls\static\polls\style.css
>> Looking in the following locations:
>>   C:\Users\kajamydeenya\telusko\static
>>   C:\Users\kajamydeenya\telusko\polls\static
>>   
>> C:\Users\kajamydeenya\telusko\mypython\lib\site-packages\django\contrib\admin\st
>>
>>
>>
>>
>> *Regards,*
>> *Yasar Arafath K*
>>
>> On Friday, October 11, 2019 at 12:30:19 PM UTC+8, Jani Tiainen wrote:
>>>
>>> Hi.
>>>
>>> You could try to diagnose issue with findstatic management command:
>>>
>>> ./manage.py findstatic -v 3 polls/style.css
>>>
>>> You should get a list of paths Django tried to look for your static file 
>>> (stylesheet) and of course was it found.
>>>
>>>
>>> pe 11. lokak. 2019 klo 6.19 yasar arafath Kajamydeen  
>>> kirjoitti:
>>>
 Hi All,

 I just added style sheet in my application but its not working , Please 
 try to help me.


 Setting.py



 import os

 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


 # Quick-start development settings - unsuitable for production
 # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/

 # SECURITY WARNING: keep the secret key used in production secret!
 SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'

 # SECURITY WARNING: don't run with debug turned on in production!
 DEBUG = True

 ALLOWED_HOSTS = []


 # Application definition

 INSTALLED_APPS = [
 'polls.apps.PollsConfig',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',


 ]

 MIDDLEWARE = [
 'django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 ]

 ROOT_URLCONF = 'telusko.urls'


 TEMPLATES = [
 {
 'BACKEND': 'django.template.backends.django.DjangoTemplates',
 'DIRS': [os.path.join(BASE_DIR,'templates')],
 'APP_DIRS': True,
 'OPTIONS': {
 'context_processors': [
 'django.template.context_processors.debug',
 'django.template.context_processors.request',
 'django.contrib.auth.context_processors.auth',
 'django.contrib.messages.context_processors.messages',
 ],
 },
 },
 ]

 WSGI_APPLICATION = 'telusko.wsgi.application'


 # Database
 # https://docs.djangoproject.com/en/2.2/ref/settings/#databases

 DATABASES = {
 'default': {
 'ENGINE': 'django.db.backends.sqlite3',
 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to 
 database file if using sqlite3.
 'USER': '',  # Not used with sqlite3.
 'PASSWORD': '',  # Not used with sqlite3.
 'HOST': '',  # Set to empty string for localhost. Not used with 
 sqlite3.
 'PORT': '',
 }
 }


 # Password validation
 # 
 https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators

 AUTH_PASSWORD_VALIDATORS = [
 {
 'NAME': 
 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
 },
 {
 'NAME': 
 'django.contrib.auth.password_validation.MinimumLengthValidator',
 },
 {
 'NAME': 
 'django.contrib.auth.password_validation.CommonPasswordValidator',

Re: CSS not working

2019-10-11 Thread yasar arafath Kajamydeen
* Hi **yashwanth**  - The Suggested one tried already in earlier, But its 
not working .*



On Friday, October 11, 2019 at 10:28:55 PM UTC+8, yashwanth .k wrote:
>
> Hello,
> You must make a separate directory in static folder.
> in the html file try using { load staticfiles } not {load static}
>
> On Fri, Oct 11, 2019 at 11:59 AM yasar arafath Kajamydeen <
> yasa...@gmail.com > wrote:
>
>> *@ Jani - Executed the  given cmd, Please find the output and please 
>> guide me further ..*
>>
>>
>> (mypython) C:\Users\kajamydeenya\telusko>python manage.py findstatic -v 3 
>> polls/style.css
>> Found 'polls/style.css' here:
>>   C:\Users\kajamydeenya\telusko\polls\static\polls\style.css
>> Looking in the following locations:
>>   C:\Users\kajamydeenya\telusko\static
>>   C:\Users\kajamydeenya\telusko\polls\static
>>   
>> C:\Users\kajamydeenya\telusko\mypython\lib\site-packages\django\contrib\admin\st
>>
>>
>>
>>
>> *Regards,*
>> *Yasar Arafath K*
>>
>> On Friday, October 11, 2019 at 12:30:19 PM UTC+8, Jani Tiainen wrote:
>>>
>>> Hi.
>>>
>>> You could try to diagnose issue with findstatic management command:
>>>
>>> ./manage.py findstatic -v 3 polls/style.css
>>>
>>> You should get a list of paths Django tried to look for your static file 
>>> (stylesheet) and of course was it found.
>>>
>>>
>>> pe 11. lokak. 2019 klo 6.19 yasar arafath Kajamydeen  
>>> kirjoitti:
>>>
 Hi All,

 I just added style sheet in my application but its not working , Please 
 try to help me.


 Setting.py



 import os

 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


 # Quick-start development settings - unsuitable for production
 # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/

 # SECURITY WARNING: keep the secret key used in production secret!
 SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'

 # SECURITY WARNING: don't run with debug turned on in production!
 DEBUG = True

 ALLOWED_HOSTS = []


 # Application definition

 INSTALLED_APPS = [
 'polls.apps.PollsConfig',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',


 ]

 MIDDLEWARE = [
 'django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 ]

 ROOT_URLCONF = 'telusko.urls'


 TEMPLATES = [
 {
 'BACKEND': 'django.template.backends.django.DjangoTemplates',
 'DIRS': [os.path.join(BASE_DIR,'templates')],
 'APP_DIRS': True,
 'OPTIONS': {
 'context_processors': [
 'django.template.context_processors.debug',
 'django.template.context_processors.request',
 'django.contrib.auth.context_processors.auth',
 'django.contrib.messages.context_processors.messages',
 ],
 },
 },
 ]

 WSGI_APPLICATION = 'telusko.wsgi.application'


 # Database
 # https://docs.djangoproject.com/en/2.2/ref/settings/#databases

 DATABASES = {
 'default': {
 'ENGINE': 'django.db.backends.sqlite3',
 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to 
 database file if using sqlite3.
 'USER': '',  # Not used with sqlite3.
 'PASSWORD': '',  # Not used with sqlite3.
 'HOST': '',  # Set to empty string for localhost. Not used with 
 sqlite3.
 'PORT': '',
 }
 }


 # Password validation
 # 
 https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators

 AUTH_PASSWORD_VALIDATORS = [
 {
 'NAME': 
 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
 },
 {
 'NAME': 
 'django.contrib.auth.password_validation.MinimumLengthValidator',
 },
 {
 'NAME': 
 'django.contrib.auth.password_validation.CommonPasswordValidator',
 },
 {
 'NAME': 
 'django.contrib.auth.password_validation.NumericPasswordValidator',
 },
 ]


 # Internationalization
 # https://docs.djangoproject.com/en/2.2/topics/i18n/

 LANGUAGE_CODE = 'en-us'

 TIME_ZONE = 'UTC'


Re: CSS not working

2019-10-11 Thread Jani Tiainen
Hi.

As you see Django indeed found your static file.

Next step is to open up developer tools in browser and load your page. You
should be able to use it to determine was file even loaded and was your
style applied to link

Note that if I'm not mistaken plain color only affects unvisited links and
visited link may stay different colored and thus seemingly you see that it
wasn't doing "nothing".


pe 11. lokak. 2019 klo 9.30 yasar arafath Kajamydeen 
kirjoitti:

> *@ Jani - Executed the  given cmd, Please find the output and please guide
> me further ..*
>
>
> (mypython) C:\Users\kajamydeenya\telusko>python manage.py findstatic -v 3
> polls/style.css
> Found 'polls/style.css' here:
>   C:\Users\kajamydeenya\telusko\polls\static\polls\style.css
> Looking in the following locations:
>   C:\Users\kajamydeenya\telusko\static
>   C:\Users\kajamydeenya\telusko\polls\static
>
> C:\Users\kajamydeenya\telusko\mypython\lib\site-packages\django\contrib\admin\st
>
>
>
>
> *Regards,*
> *Yasar Arafath K*
>
> On Friday, October 11, 2019 at 12:30:19 PM UTC+8, Jani Tiainen wrote:
>>
>> Hi.
>>
>> You could try to diagnose issue with findstatic management command:
>>
>> ./manage.py findstatic -v 3 polls/style.css
>>
>> You should get a list of paths Django tried to look for your static file
>> (stylesheet) and of course was it found.
>>
>>
>> pe 11. lokak. 2019 klo 6.19 yasar arafath Kajamydeen 
>> kirjoitti:
>>
>>> Hi All,
>>>
>>> I just added style sheet in my application but its not working , Please
>>> try to help me.
>>>
>>>
>>> Setting.py
>>>
>>>
>>>
>>> import os
>>>
>>> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
>>> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>>>
>>>
>>> # Quick-start development settings - unsuitable for production
>>> # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
>>>
>>> # SECURITY WARNING: keep the secret key used in production secret!
>>> SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'
>>>
>>> # SECURITY WARNING: don't run with debug turned on in production!
>>> DEBUG = True
>>>
>>> ALLOWED_HOSTS = []
>>>
>>>
>>> # Application definition
>>>
>>> INSTALLED_APPS = [
>>> 'polls.apps.PollsConfig',
>>> 'django.contrib.admin',
>>> 'django.contrib.auth',
>>> 'django.contrib.contenttypes',
>>> 'django.contrib.sessions',
>>> 'django.contrib.messages',
>>> 'django.contrib.staticfiles',
>>>
>>>
>>> ]
>>>
>>> MIDDLEWARE = [
>>> 'django.middleware.security.SecurityMiddleware',
>>> 'django.contrib.sessions.middleware.SessionMiddleware',
>>> 'django.middleware.common.CommonMiddleware',
>>> 'django.middleware.csrf.CsrfViewMiddleware',
>>> 'django.contrib.auth.middleware.AuthenticationMiddleware',
>>> 'django.contrib.messages.middleware.MessageMiddleware',
>>> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
>>> ]
>>>
>>> ROOT_URLCONF = 'telusko.urls'
>>>
>>>
>>> TEMPLATES = [
>>> {
>>> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
>>> 'DIRS': [os.path.join(BASE_DIR,'templates')],
>>> 'APP_DIRS': True,
>>> 'OPTIONS': {
>>> 'context_processors': [
>>> 'django.template.context_processors.debug',
>>> 'django.template.context_processors.request',
>>> 'django.contrib.auth.context_processors.auth',
>>> 'django.contrib.messages.context_processors.messages',
>>> ],
>>> },
>>> },
>>> ]
>>>
>>> WSGI_APPLICATION = 'telusko.wsgi.application'
>>>
>>>
>>> # Database
>>> # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
>>>
>>> DATABASES = {
>>> 'default': {
>>> 'ENGINE': 'django.db.backends.sqlite3',
>>> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to 
>>> database file if using sqlite3.
>>> 'USER': '',  # Not used with sqlite3.
>>> 'PASSWORD': '',  # Not used with sqlite3.
>>> 'HOST': '',  # Set to empty string for localhost. Not used with 
>>> sqlite3.
>>> 'PORT': '',
>>> }
>>> }
>>>
>>>
>>> # Password validation
>>> # 
>>> https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
>>>
>>> AUTH_PASSWORD_VALIDATORS = [
>>> {
>>> 'NAME': 
>>> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
>>> },
>>> {
>>> 'NAME': 
>>> 'django.contrib.auth.password_validation.MinimumLengthValidator',
>>> },
>>> {
>>> 'NAME': 
>>> 'django.contrib.auth.password_validation.CommonPasswordValidator',
>>> },
>>> {
>>> 'NAME': 
>>> 'django.contrib.auth.password_validation.NumericPasswordValidator',
>>> },
>>> ]
>>>
>>>
>>> # Internationalization
>>> # https://docs.djangoproject.com/en/2.2/topics/i18n/
>>>
>>> LANGUAGE_CODE = 'en-us'
>>>
>>> TIME_ZONE = 'UTC'
>>>
>>> USE_I18N = True
>>>
>>> USE_L10N = True
>>>
>>> USE_TZ = True
>>>
>>>
>>> # Static fil

Re: CSS not working

2019-10-11 Thread yashwanth .k
Hello,
You must make a separate directory in static folder.
in the html file try using { load staticfiles } not {load static}

On Fri, Oct 11, 2019 at 11:59 AM yasar arafath Kajamydeen <
yasar...@gmail.com> wrote:

> *@ Jani - Executed the  given cmd, Please find the output and please guide
> me further ..*
>
>
> (mypython) C:\Users\kajamydeenya\telusko>python manage.py findstatic -v 3
> polls/style.css
> Found 'polls/style.css' here:
>   C:\Users\kajamydeenya\telusko\polls\static\polls\style.css
> Looking in the following locations:
>   C:\Users\kajamydeenya\telusko\static
>   C:\Users\kajamydeenya\telusko\polls\static
>
> C:\Users\kajamydeenya\telusko\mypython\lib\site-packages\django\contrib\admin\st
>
>
>
>
> *Regards,*
> *Yasar Arafath K*
>
> On Friday, October 11, 2019 at 12:30:19 PM UTC+8, Jani Tiainen wrote:
>>
>> Hi.
>>
>> You could try to diagnose issue with findstatic management command:
>>
>> ./manage.py findstatic -v 3 polls/style.css
>>
>> You should get a list of paths Django tried to look for your static file
>> (stylesheet) and of course was it found.
>>
>>
>> pe 11. lokak. 2019 klo 6.19 yasar arafath Kajamydeen 
>> kirjoitti:
>>
>>> Hi All,
>>>
>>> I just added style sheet in my application but its not working , Please
>>> try to help me.
>>>
>>>
>>> Setting.py
>>>
>>>
>>>
>>> import os
>>>
>>> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
>>> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>>>
>>>
>>> # Quick-start development settings - unsuitable for production
>>> # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
>>>
>>> # SECURITY WARNING: keep the secret key used in production secret!
>>> SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'
>>>
>>> # SECURITY WARNING: don't run with debug turned on in production!
>>> DEBUG = True
>>>
>>> ALLOWED_HOSTS = []
>>>
>>>
>>> # Application definition
>>>
>>> INSTALLED_APPS = [
>>> 'polls.apps.PollsConfig',
>>> 'django.contrib.admin',
>>> 'django.contrib.auth',
>>> 'django.contrib.contenttypes',
>>> 'django.contrib.sessions',
>>> 'django.contrib.messages',
>>> 'django.contrib.staticfiles',
>>>
>>>
>>> ]
>>>
>>> MIDDLEWARE = [
>>> 'django.middleware.security.SecurityMiddleware',
>>> 'django.contrib.sessions.middleware.SessionMiddleware',
>>> 'django.middleware.common.CommonMiddleware',
>>> 'django.middleware.csrf.CsrfViewMiddleware',
>>> 'django.contrib.auth.middleware.AuthenticationMiddleware',
>>> 'django.contrib.messages.middleware.MessageMiddleware',
>>> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
>>> ]
>>>
>>> ROOT_URLCONF = 'telusko.urls'
>>>
>>>
>>> TEMPLATES = [
>>> {
>>> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
>>> 'DIRS': [os.path.join(BASE_DIR,'templates')],
>>> 'APP_DIRS': True,
>>> 'OPTIONS': {
>>> 'context_processors': [
>>> 'django.template.context_processors.debug',
>>> 'django.template.context_processors.request',
>>> 'django.contrib.auth.context_processors.auth',
>>> 'django.contrib.messages.context_processors.messages',
>>> ],
>>> },
>>> },
>>> ]
>>>
>>> WSGI_APPLICATION = 'telusko.wsgi.application'
>>>
>>>
>>> # Database
>>> # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
>>>
>>> DATABASES = {
>>> 'default': {
>>> 'ENGINE': 'django.db.backends.sqlite3',
>>> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to 
>>> database file if using sqlite3.
>>> 'USER': '',  # Not used with sqlite3.
>>> 'PASSWORD': '',  # Not used with sqlite3.
>>> 'HOST': '',  # Set to empty string for localhost. Not used with 
>>> sqlite3.
>>> 'PORT': '',
>>> }
>>> }
>>>
>>>
>>> # Password validation
>>> # 
>>> https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
>>>
>>> AUTH_PASSWORD_VALIDATORS = [
>>> {
>>> 'NAME': 
>>> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
>>> },
>>> {
>>> 'NAME': 
>>> 'django.contrib.auth.password_validation.MinimumLengthValidator',
>>> },
>>> {
>>> 'NAME': 
>>> 'django.contrib.auth.password_validation.CommonPasswordValidator',
>>> },
>>> {
>>> 'NAME': 
>>> 'django.contrib.auth.password_validation.NumericPasswordValidator',
>>> },
>>> ]
>>>
>>>
>>> # Internationalization
>>> # https://docs.djangoproject.com/en/2.2/topics/i18n/
>>>
>>> LANGUAGE_CODE = 'en-us'
>>>
>>> TIME_ZONE = 'UTC'
>>>
>>> USE_I18N = True
>>>
>>> USE_L10N = True
>>>
>>> USE_TZ = True
>>>
>>>
>>> # Static files (CSS, JavaScript, Images)
>>> # https://docs.djangoproject.com/en/2.2/howto/static-files/
>>>
>>> STATIC_URL = '/static/'
>>> STATICFILES_DIRS = [
>>> os.path.join(BASE_DIR, 'style.css'),
>>> ]
>>>
>>>
>>>
>>>
>>>
>>> *style.css*
>>>
>>>
>>>
>>>

Re: CSS not working

2019-10-10 Thread yasar arafath Kajamydeen
*@ Jani - Executed the  given cmd, Please find the output and please guide 
me further ..*


(mypython) C:\Users\kajamydeenya\telusko>python manage.py findstatic -v 3 
polls/style.css
Found 'polls/style.css' here:
  C:\Users\kajamydeenya\telusko\polls\static\polls\style.css
Looking in the following locations:
  C:\Users\kajamydeenya\telusko\static
  C:\Users\kajamydeenya\telusko\polls\static
  
C:\Users\kajamydeenya\telusko\mypython\lib\site-packages\django\contrib\admin\st




*Regards,*
*Yasar Arafath K*

On Friday, October 11, 2019 at 12:30:19 PM UTC+8, Jani Tiainen wrote:
>
> Hi.
>
> You could try to diagnose issue with findstatic management command:
>
> ./manage.py findstatic -v 3 polls/style.css
>
> You should get a list of paths Django tried to look for your static file 
> (stylesheet) and of course was it found.
>
>
> pe 11. lokak. 2019 klo 6.19 yasar arafath Kajamydeen  > kirjoitti:
>
>> Hi All,
>>
>> I just added style sheet in my application but its not working , Please 
>> try to help me.
>>
>>
>> Setting.py
>>
>>
>>
>> import os
>>
>> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
>> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>>
>>
>> # Quick-start development settings - unsuitable for production
>> # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
>>
>> # SECURITY WARNING: keep the secret key used in production secret!
>> SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'
>>
>> # SECURITY WARNING: don't run with debug turned on in production!
>> DEBUG = True
>>
>> ALLOWED_HOSTS = []
>>
>>
>> # Application definition
>>
>> INSTALLED_APPS = [
>> 'polls.apps.PollsConfig',
>> 'django.contrib.admin',
>> 'django.contrib.auth',
>> 'django.contrib.contenttypes',
>> 'django.contrib.sessions',
>> 'django.contrib.messages',
>> 'django.contrib.staticfiles',
>>
>>
>> ]
>>
>> MIDDLEWARE = [
>> 'django.middleware.security.SecurityMiddleware',
>> 'django.contrib.sessions.middleware.SessionMiddleware',
>> 'django.middleware.common.CommonMiddleware',
>> 'django.middleware.csrf.CsrfViewMiddleware',
>> 'django.contrib.auth.middleware.AuthenticationMiddleware',
>> 'django.contrib.messages.middleware.MessageMiddleware',
>> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
>> ]
>>
>> ROOT_URLCONF = 'telusko.urls'
>>
>>
>> TEMPLATES = [
>> {
>> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
>> 'DIRS': [os.path.join(BASE_DIR,'templates')],
>> 'APP_DIRS': True,
>> 'OPTIONS': {
>> 'context_processors': [
>> 'django.template.context_processors.debug',
>> 'django.template.context_processors.request',
>> 'django.contrib.auth.context_processors.auth',
>> 'django.contrib.messages.context_processors.messages',
>> ],
>> },
>> },
>> ]
>>
>> WSGI_APPLICATION = 'telusko.wsgi.application'
>>
>>
>> # Database
>> # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
>>
>> DATABASES = {
>> 'default': {
>> 'ENGINE': 'django.db.backends.sqlite3',
>> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to database 
>> file if using sqlite3.
>> 'USER': '',  # Not used with sqlite3.
>> 'PASSWORD': '',  # Not used with sqlite3.
>> 'HOST': '',  # Set to empty string for localhost. Not used with 
>> sqlite3.
>> 'PORT': '',
>> }
>> }
>>
>>
>> # Password validation
>> # 
>> https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
>>
>> AUTH_PASSWORD_VALIDATORS = [
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
>> },
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.MinimumLengthValidator',
>> },
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.CommonPasswordValidator',
>> },
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.NumericPasswordValidator',
>> },
>> ]
>>
>>
>> # Internationalization
>> # https://docs.djangoproject.com/en/2.2/topics/i18n/
>>
>> LANGUAGE_CODE = 'en-us'
>>
>> TIME_ZONE = 'UTC'
>>
>> USE_I18N = True
>>
>> USE_L10N = True
>>
>> USE_TZ = True
>>
>>
>> # Static files (CSS, JavaScript, Images)
>> # https://docs.djangoproject.com/en/2.2/howto/static-files/
>>
>> STATIC_URL = '/static/'
>> STATICFILES_DIRS = [
>> os.path.join(BASE_DIR, 'style.css'),
>> ]
>>
>>
>>
>>
>>
>> *style.css*
>>
>>
>>
>>
>> li a {
>> color: green;
>> }
>>
>>
>>
>>
>>
>>
>>
>> *index.html*
>>
>>
>> {% load static %}
>>
>> 
>> {% if latest_question_list %}
>> 
>> {% for question in latest_question_list %}
>>   {{ 
>> question.question_text }}
>> {% endfor %}
>> 
>> {% else %}
>> No polls are available.
>> {% endif %}
>>
>>
>>
>>
>>
>> Regards,
>>
>> Yasar Arafath K
>>
>> -- 
>> You received

Re: CSS not working

2019-10-10 Thread Jani Tiainen
Hi.

You could try to diagnose issue with findstatic management command:

./manage.py findstatic -v 3 polls/style.css

You should get a list of paths Django tried to look for your static file
(stylesheet) and of course was it found.


pe 11. lokak. 2019 klo 6.19 yasar arafath Kajamydeen 
kirjoitti:

> Hi All,
>
> I just added style sheet in my application but its not working , Please
> try to help me.
>
>
> Setting.py
>
>
>
> import os
>
> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>
>
> # Quick-start development settings - unsuitable for production
> # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
>
> # SECURITY WARNING: keep the secret key used in production secret!
> SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'
>
> # SECURITY WARNING: don't run with debug turned on in production!
> DEBUG = True
>
> ALLOWED_HOSTS = []
>
>
> # Application definition
>
> INSTALLED_APPS = [
> 'polls.apps.PollsConfig',
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
>
>
> ]
>
> MIDDLEWARE = [
> 'django.middleware.security.SecurityMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.common.CommonMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
> ]
>
> ROOT_URLCONF = 'telusko.urls'
>
>
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> 'DIRS': [os.path.join(BASE_DIR,'templates')],
> 'APP_DIRS': True,
> 'OPTIONS': {
> 'context_processors': [
> 'django.template.context_processors.debug',
> 'django.template.context_processors.request',
> 'django.contrib.auth.context_processors.auth',
> 'django.contrib.messages.context_processors.messages',
> ],
> },
> },
> ]
>
> WSGI_APPLICATION = 'telusko.wsgi.application'
>
>
> # Database
> # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.sqlite3',
> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to database 
> file if using sqlite3.
> 'USER': '',  # Not used with sqlite3.
> 'PASSWORD': '',  # Not used with sqlite3.
> 'HOST': '',  # Set to empty string for localhost. Not used with 
> sqlite3.
> 'PORT': '',
> }
> }
>
>
> # Password validation
> # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
>
> AUTH_PASSWORD_VALIDATORS = [
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.MinimumLengthValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.CommonPasswordValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.NumericPasswordValidator',
> },
> ]
>
>
> # Internationalization
> # https://docs.djangoproject.com/en/2.2/topics/i18n/
>
> LANGUAGE_CODE = 'en-us'
>
> TIME_ZONE = 'UTC'
>
> USE_I18N = True
>
> USE_L10N = True
>
> USE_TZ = True
>
>
> # Static files (CSS, JavaScript, Images)
> # https://docs.djangoproject.com/en/2.2/howto/static-files/
>
> STATIC_URL = '/static/'
> STATICFILES_DIRS = [
> os.path.join(BASE_DIR, 'style.css'),
> ]
>
>
>
>
>
> *style.css*
>
>
>
>
> li a {
> color: green;
> }
>
>
>
>
>
>
>
> *index.html*
>
>
> {% load static %}
>
> 
> {% if latest_question_list %}
> 
> {% for question in latest_question_list %}
>   {{ 
> question.question_text }}
> {% endfor %}
> 
> {% else %}
> No polls are available.
> {% endif %}
>
>
>
>
>
> Regards,
>
> Yasar Arafath K
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3a71830f-e494-47b0-be2d-6d43e8d7cb27%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://gro

Re: CSS not working

2019-10-10 Thread yasar arafath Kajamydeen
@Suraj - Please find the polls.xlsx   attachment in conversation . 





On Friday, October 11, 2019 at 12:10:04 PM UTC+8, Suraj Thapa FC wrote:
>
> Send the directory structure of the project
>
> On Fri, 11 Oct, 2019, 9:29 AM yasar arafath Kajamydeen,  > wrote:
>
>> Hi Suraj,
>>
>> As for your suggestion i tried like this  but its not working , Please do 
>> needful.
>>
>>
>>
>> STATIC_URL = '/static/'
>> STATICFILES_DIRS = [
>> os.path.join(BASE_DIR, 'static'),
>> ]
>>
>>
>>
>>
>>
>>
>> Regards,
>> Yasar Arafath K
>>
>>
>>
>>
>>
>>
>> On Friday, October 11, 2019 at 11:18:42 AM UTC+8, yasar arafath 
>> Kajamydeen wrote:
>>>
>>> Hi All,
>>>
>>> I just added style sheet in my application but its not working , Please 
>>> try to help me.
>>>
>>>
>>> Setting.py
>>>
>>>
>>>
>>> import os
>>>
>>> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
>>> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>>>
>>>
>>> # Quick-start development settings - unsuitable for production
>>> # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
>>>
>>> # SECURITY WARNING: keep the secret key used in production secret!
>>> SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'
>>>
>>> # SECURITY WARNING: don't run with debug turned on in production!
>>> DEBUG = True
>>>
>>> ALLOWED_HOSTS = []
>>>
>>>
>>> # Application definition
>>>
>>> INSTALLED_APPS = [
>>> 'polls.apps.PollsConfig',
>>> 'django.contrib.admin',
>>> 'django.contrib.auth',
>>> 'django.contrib.contenttypes',
>>> 'django.contrib.sessions',
>>> 'django.contrib.messages',
>>> 'django.contrib.staticfiles',
>>>
>>>
>>> ]
>>>
>>> MIDDLEWARE = [
>>> 'django.middleware.security.SecurityMiddleware',
>>> 'django.contrib.sessions.middleware.SessionMiddleware',
>>> 'django.middleware.common.CommonMiddleware',
>>> 'django.middleware.csrf.CsrfViewMiddleware',
>>> 'django.contrib.auth.middleware.AuthenticationMiddleware',
>>> 'django.contrib.messages.middleware.MessageMiddleware',
>>> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
>>> ]
>>>
>>> ROOT_URLCONF = 'telusko.urls'
>>>
>>>
>>> TEMPLATES = [
>>> {
>>> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
>>> 'DIRS': [os.path.join(BASE_DIR,'templates')],
>>> 'APP_DIRS': True,
>>> 'OPTIONS': {
>>> 'context_processors': [
>>> 'django.template.context_processors.debug',
>>> 'django.template.context_processors.request',
>>> 'django.contrib.auth.context_processors.auth',
>>> 'django.contrib.messages.context_processors.messages',
>>> ],
>>> },
>>> },
>>> ]
>>>
>>> WSGI_APPLICATION = 'telusko.wsgi.application'
>>>
>>>
>>> # Database
>>> # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
>>>
>>> DATABASES = {
>>> 'default': {
>>> 'ENGINE': 'django.db.backends.sqlite3',
>>> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to 
>>> database file if using sqlite3.
>>> 'USER': '',  # Not used with sqlite3.
>>> 'PASSWORD': '',  # Not used with sqlite3.
>>> 'HOST': '',  # Set to empty string for localhost. Not used with 
>>> sqlite3.
>>> 'PORT': '',
>>> }
>>> }
>>>
>>>
>>> # Password validation
>>> # 
>>> https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
>>>
>>> AUTH_PASSWORD_VALIDATORS = [
>>> {
>>> 'NAME': 
>>> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
>>> },
>>> {
>>> 'NAME': 
>>> 'django.contrib.auth.password_validation.MinimumLengthValidator',
>>> },
>>> {
>>> 'NAME': 
>>> 'django.contrib.auth.password_validation.CommonPasswordValidator',
>>> },
>>> {
>>> 'NAME': 
>>> 'django.contrib.auth.password_validation.NumericPasswordValidator',
>>> },
>>> ]
>>>
>>>
>>> # Internationalization
>>> # https://docs.djangoproject.com/en/2.2/topics/i18n/
>>>
>>> LANGUAGE_CODE = 'en-us'
>>>
>>> TIME_ZONE = 'UTC'
>>>
>>> USE_I18N = True
>>>
>>> USE_L10N = True
>>>
>>> USE_TZ = True
>>>
>>>
>>> # Static files (CSS, JavaScript, Images)
>>> # https://docs.djangoproject.com/en/2.2/howto/static-files/
>>>
>>> STATIC_URL = '/static/'
>>> STATICFILES_DIRS = [
>>> os.path.join(BASE_DIR, 'style.css'),
>>> ]
>>>
>>>
>>>
>>>
>>>
>>> *style.css*
>>>
>>>
>>>
>>>
>>> li a {
>>> color: green;
>>> }
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *index.html*
>>>
>>>
>>> {% load static %}
>>>
>>> 
>>> {% if latest_question_list %}
>>> 
>>> {% for question in latest_question_list %}
>>>   {{ 
>>> question.question_text }}
>>> {% endfor %}
>>> 
>>> {% else %}
>>> No polls are available.
>>> {% endif %}
>>>
>>>
>>>
>>>
>>>
>>> Regards,
>>>
>>> Yasar Arafath K
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.

Re: CSS not working

2019-10-10 Thread Suraj Thapa FC
Send the directory structure of the project

On Fri, 11 Oct, 2019, 9:29 AM yasar arafath Kajamydeen, 
wrote:

> Hi Suraj,
>
> As for your suggestion i tried like this  but its not working , Please do
> needful.
>
>
>
> STATIC_URL = '/static/'
> STATICFILES_DIRS = [
> os.path.join(BASE_DIR, 'static'),
> ]
>
>
>
>
>
>
> Regards,
> Yasar Arafath K
>
>
>
>
>
>
> On Friday, October 11, 2019 at 11:18:42 AM UTC+8, yasar arafath Kajamydeen
> wrote:
>>
>> Hi All,
>>
>> I just added style sheet in my application but its not working , Please
>> try to help me.
>>
>>
>> Setting.py
>>
>>
>>
>> import os
>>
>> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
>> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>>
>>
>> # Quick-start development settings - unsuitable for production
>> # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
>>
>> # SECURITY WARNING: keep the secret key used in production secret!
>> SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'
>>
>> # SECURITY WARNING: don't run with debug turned on in production!
>> DEBUG = True
>>
>> ALLOWED_HOSTS = []
>>
>>
>> # Application definition
>>
>> INSTALLED_APPS = [
>> 'polls.apps.PollsConfig',
>> 'django.contrib.admin',
>> 'django.contrib.auth',
>> 'django.contrib.contenttypes',
>> 'django.contrib.sessions',
>> 'django.contrib.messages',
>> 'django.contrib.staticfiles',
>>
>>
>> ]
>>
>> MIDDLEWARE = [
>> 'django.middleware.security.SecurityMiddleware',
>> 'django.contrib.sessions.middleware.SessionMiddleware',
>> 'django.middleware.common.CommonMiddleware',
>> 'django.middleware.csrf.CsrfViewMiddleware',
>> 'django.contrib.auth.middleware.AuthenticationMiddleware',
>> 'django.contrib.messages.middleware.MessageMiddleware',
>> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
>> ]
>>
>> ROOT_URLCONF = 'telusko.urls'
>>
>>
>> TEMPLATES = [
>> {
>> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
>> 'DIRS': [os.path.join(BASE_DIR,'templates')],
>> 'APP_DIRS': True,
>> 'OPTIONS': {
>> 'context_processors': [
>> 'django.template.context_processors.debug',
>> 'django.template.context_processors.request',
>> 'django.contrib.auth.context_processors.auth',
>> 'django.contrib.messages.context_processors.messages',
>> ],
>> },
>> },
>> ]
>>
>> WSGI_APPLICATION = 'telusko.wsgi.application'
>>
>>
>> # Database
>> # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
>>
>> DATABASES = {
>> 'default': {
>> 'ENGINE': 'django.db.backends.sqlite3',
>> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to database 
>> file if using sqlite3.
>> 'USER': '',  # Not used with sqlite3.
>> 'PASSWORD': '',  # Not used with sqlite3.
>> 'HOST': '',  # Set to empty string for localhost. Not used with 
>> sqlite3.
>> 'PORT': '',
>> }
>> }
>>
>>
>> # Password validation
>> # 
>> https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
>>
>> AUTH_PASSWORD_VALIDATORS = [
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
>> },
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.MinimumLengthValidator',
>> },
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.CommonPasswordValidator',
>> },
>> {
>> 'NAME': 
>> 'django.contrib.auth.password_validation.NumericPasswordValidator',
>> },
>> ]
>>
>>
>> # Internationalization
>> # https://docs.djangoproject.com/en/2.2/topics/i18n/
>>
>> LANGUAGE_CODE = 'en-us'
>>
>> TIME_ZONE = 'UTC'
>>
>> USE_I18N = True
>>
>> USE_L10N = True
>>
>> USE_TZ = True
>>
>>
>> # Static files (CSS, JavaScript, Images)
>> # https://docs.djangoproject.com/en/2.2/howto/static-files/
>>
>> STATIC_URL = '/static/'
>> STATICFILES_DIRS = [
>> os.path.join(BASE_DIR, 'style.css'),
>> ]
>>
>>
>>
>>
>>
>> *style.css*
>>
>>
>>
>>
>> li a {
>> color: green;
>> }
>>
>>
>>
>>
>>
>>
>>
>> *index.html*
>>
>>
>> {% load static %}
>>
>> 
>> {% if latest_question_list %}
>> 
>> {% for question in latest_question_list %}
>>   {{ 
>> question.question_text }}
>> {% endfor %}
>> 
>> {% else %}
>> No polls are available.
>> {% endif %}
>>
>>
>>
>>
>>
>> Regards,
>>
>> Yasar Arafath K
>>
>> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/bb82f38d-8e9d-4ef7-a1b9-ea3726973ff0%40googlegroups.com
> 

Re: CSS not working

2019-10-10 Thread yasar arafath Kajamydeen
Hi Suraj,

As for your suggestion i tried like this  but its not working , Please do 
needful.



STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]






Regards,
Yasar Arafath K






On Friday, October 11, 2019 at 11:18:42 AM UTC+8, yasar arafath Kajamydeen 
wrote:
>
> Hi All,
>
> I just added style sheet in my application but its not working , Please 
> try to help me.
>
>
> Setting.py
>
>
>
> import os
>
> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>
>
> # Quick-start development settings - unsuitable for production
> # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
>
> # SECURITY WARNING: keep the secret key used in production secret!
> SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'
>
> # SECURITY WARNING: don't run with debug turned on in production!
> DEBUG = True
>
> ALLOWED_HOSTS = []
>
>
> # Application definition
>
> INSTALLED_APPS = [
> 'polls.apps.PollsConfig',
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
>
>
> ]
>
> MIDDLEWARE = [
> 'django.middleware.security.SecurityMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.common.CommonMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
> ]
>
> ROOT_URLCONF = 'telusko.urls'
>
>
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> 'DIRS': [os.path.join(BASE_DIR,'templates')],
> 'APP_DIRS': True,
> 'OPTIONS': {
> 'context_processors': [
> 'django.template.context_processors.debug',
> 'django.template.context_processors.request',
> 'django.contrib.auth.context_processors.auth',
> 'django.contrib.messages.context_processors.messages',
> ],
> },
> },
> ]
>
> WSGI_APPLICATION = 'telusko.wsgi.application'
>
>
> # Database
> # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.sqlite3',
> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to database 
> file if using sqlite3.
> 'USER': '',  # Not used with sqlite3.
> 'PASSWORD': '',  # Not used with sqlite3.
> 'HOST': '',  # Set to empty string for localhost. Not used with 
> sqlite3.
> 'PORT': '',
> }
> }
>
>
> # Password validation
> # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
>
> AUTH_PASSWORD_VALIDATORS = [
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.MinimumLengthValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.CommonPasswordValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.NumericPasswordValidator',
> },
> ]
>
>
> # Internationalization
> # https://docs.djangoproject.com/en/2.2/topics/i18n/
>
> LANGUAGE_CODE = 'en-us'
>
> TIME_ZONE = 'UTC'
>
> USE_I18N = True
>
> USE_L10N = True
>
> USE_TZ = True
>
>
> # Static files (CSS, JavaScript, Images)
> # https://docs.djangoproject.com/en/2.2/howto/static-files/
>
> STATIC_URL = '/static/'
> STATICFILES_DIRS = [
> os.path.join(BASE_DIR, 'style.css'),
> ]
>
>
>
>
>
> *style.css*
>
>
>
>
> li a {
> color: green;
> }
>
>
>
>
>
>
>
> *index.html*
>
>
> {% load static %}
>
> 
> {% if latest_question_list %}
> 
> {% for question in latest_question_list %}
>   {{ 
> question.question_text }}
> {% endfor %}
> 
> {% else %}
> No polls are available.
> {% endif %}
>
>
>
>
>
> Regards,
>
> Yasar Arafath K
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bb82f38d-8e9d-4ef7-a1b9-ea3726973ff0%40googlegroups.com.


Re: CSS not working

2019-10-10 Thread yasar arafath Kajamydeen
Hi Mike,

I created separate folder for static, Please find the att (polls.xlsx).


Regards,
Yasar Arafath K


On Friday, October 11, 2019 at 11:18:42 AM UTC+8, yasar arafath Kajamydeen 
wrote:
>
> Hi All,
>
> I just added style sheet in my application but its not working , Please 
> try to help me.
>
>
> Setting.py
>
>
>
> import os
>
> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>
>
> # Quick-start development settings - unsuitable for production
> # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
>
> # SECURITY WARNING: keep the secret key used in production secret!
> SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'
>
> # SECURITY WARNING: don't run with debug turned on in production!
> DEBUG = True
>
> ALLOWED_HOSTS = []
>
>
> # Application definition
>
> INSTALLED_APPS = [
> 'polls.apps.PollsConfig',
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
>
>
> ]
>
> MIDDLEWARE = [
> 'django.middleware.security.SecurityMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.common.CommonMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
> ]
>
> ROOT_URLCONF = 'telusko.urls'
>
>
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> 'DIRS': [os.path.join(BASE_DIR,'templates')],
> 'APP_DIRS': True,
> 'OPTIONS': {
> 'context_processors': [
> 'django.template.context_processors.debug',
> 'django.template.context_processors.request',
> 'django.contrib.auth.context_processors.auth',
> 'django.contrib.messages.context_processors.messages',
> ],
> },
> },
> ]
>
> WSGI_APPLICATION = 'telusko.wsgi.application'
>
>
> # Database
> # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.sqlite3',
> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to database 
> file if using sqlite3.
> 'USER': '',  # Not used with sqlite3.
> 'PASSWORD': '',  # Not used with sqlite3.
> 'HOST': '',  # Set to empty string for localhost. Not used with 
> sqlite3.
> 'PORT': '',
> }
> }
>
>
> # Password validation
> # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
>
> AUTH_PASSWORD_VALIDATORS = [
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.MinimumLengthValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.CommonPasswordValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.NumericPasswordValidator',
> },
> ]
>
>
> # Internationalization
> # https://docs.djangoproject.com/en/2.2/topics/i18n/
>
> LANGUAGE_CODE = 'en-us'
>
> TIME_ZONE = 'UTC'
>
> USE_I18N = True
>
> USE_L10N = True
>
> USE_TZ = True
>
>
> # Static files (CSS, JavaScript, Images)
> # https://docs.djangoproject.com/en/2.2/howto/static-files/
>
> STATIC_URL = '/static/'
> STATICFILES_DIRS = [
> os.path.join(BASE_DIR, 'style.css'),
> ]
>
>
>
>
>
> *style.css*
>
>
>
>
> li a {
> color: green;
> }
>
>
>
>
>
>
>
> *index.html*
>
>
> {% load static %}
>
> 
> {% if latest_question_list %}
> 
> {% for question in latest_question_list %}
>   {{ 
> question.question_text }}
> {% endfor %}
> 
> {% else %}
> No polls are available.
> {% endif %}
>
>
>
>
>
> Regards,
>
> Yasar Arafath K
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fd8a59a9-5145-4f11-9fef-44f3132453e1%40googlegroups.com.


polls.xlsx
Description: MS-Excel 2007 spreadsheet


Re: CSS not working

2019-10-10 Thread Suraj Thapa FC
In your settings.py
At STATICFILES_DIRS you had write basedir, style. Css instead style.css
write "static"

On Fri, 11 Oct, 2019, 8:49 AM yasar arafath Kajamydeen, 
wrote:

> Hi All,
>
> I just added style sheet in my application but its not working , Please
> try to help me.
>
>
> Setting.py
>
>
>
> import os
>
> # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
> BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>
>
> # Quick-start development settings - unsuitable for production
> # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
>
> # SECURITY WARNING: keep the secret key used in production secret!
> SECRET_KEY = '@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh'
>
> # SECURITY WARNING: don't run with debug turned on in production!
> DEBUG = True
>
> ALLOWED_HOSTS = []
>
>
> # Application definition
>
> INSTALLED_APPS = [
> 'polls.apps.PollsConfig',
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
>
>
> ]
>
> MIDDLEWARE = [
> 'django.middleware.security.SecurityMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.common.CommonMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> 'django.middleware.clickjacking.XFrameOptionsMiddleware',
> ]
>
> ROOT_URLCONF = 'telusko.urls'
>
>
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> 'DIRS': [os.path.join(BASE_DIR,'templates')],
> 'APP_DIRS': True,
> 'OPTIONS': {
> 'context_processors': [
> 'django.template.context_processors.debug',
> 'django.template.context_processors.request',
> 'django.contrib.auth.context_processors.auth',
> 'django.contrib.messages.context_processors.messages',
> ],
> },
> },
> ]
>
> WSGI_APPLICATION = 'telusko.wsgi.application'
>
>
> # Database
> # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.sqlite3',
> 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),  # Or path to database 
> file if using sqlite3.
> 'USER': '',  # Not used with sqlite3.
> 'PASSWORD': '',  # Not used with sqlite3.
> 'HOST': '',  # Set to empty string for localhost. Not used with 
> sqlite3.
> 'PORT': '',
> }
> }
>
>
> # Password validation
> # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
>
> AUTH_PASSWORD_VALIDATORS = [
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.MinimumLengthValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.CommonPasswordValidator',
> },
> {
> 'NAME': 
> 'django.contrib.auth.password_validation.NumericPasswordValidator',
> },
> ]
>
>
> # Internationalization
> # https://docs.djangoproject.com/en/2.2/topics/i18n/
>
> LANGUAGE_CODE = 'en-us'
>
> TIME_ZONE = 'UTC'
>
> USE_I18N = True
>
> USE_L10N = True
>
> USE_TZ = True
>
>
> # Static files (CSS, JavaScript, Images)
> # https://docs.djangoproject.com/en/2.2/howto/static-files/
>
> STATIC_URL = '/static/'
> STATICFILES_DIRS = [
> os.path.join(BASE_DIR, 'style.css'),
> ]
>
>
>
>
>
> *style.css*
>
>
>
>
> li a {
> color: green;
> }
>
>
>
>
>
>
>
> *index.html*
>
>
> {% load static %}
>
> 
> {% if latest_question_list %}
> 
> {% for question in latest_question_list %}
>   {{ 
> question.question_text }}
> {% endfor %}
> 
> {% else %}
> No polls are available.
> {% endif %}
>
>
>
>
>
> Regards,
>
> Yasar Arafath K
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3a71830f-e494-47b0-be2d-6d43e8d7cb27%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPjsHcGVNSnj-4oa00jvqy9Py_KgYsFr-hzDaji_f5or0SPL6Q%40mail.gmail.com.


Re: CSS not working

2019-10-10 Thread Mike Dewhirst

On 11/10/2019 2:18 pm, yasar arafath Kajamydeen wrote:

Hi All,

I just added style sheet in my application but its not working , 
Please try to help me.


I think you need to put your stylesheet in a separate directory reserved 
for static files such as css, js etc and perhaps call it polls/static. 
Then you need to run manage.py collectstatic which will copy such static 
files to the directory nominated in settings.STATIC_ROOT from where they 
will be served at settings.STATIC_URL


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




Setting.py


import os

# Build paths inside the project like this: os.path.join(BASE_DIR, ...) 
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production # See 
https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ # 
SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY ='@$k&=42v@e7u26@0+woy#%aopsiv&55jjj$a=x2tr52f_5ipyh' # SECURITY 
WARNING: don't run with debug turned on in production! DEBUG =True ALLOWED_HOSTS = []



# Application definition INSTALLED_APPS = [
 'polls.apps.PollsConfig',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',


]

MIDDLEWARE = [
 'django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF ='telusko.urls' TEMPLATES = [
 {
 'BACKEND':'django.template.backends.django.DjangoTemplates',
 'DIRS': [os.path.join(BASE_DIR,'templates')],
 'APP_DIRS':True,
 'OPTIONS': {
 'context_processors': [
 'django.template.context_processors.debug',
 'django.template.context_processors.request',
 'django.contrib.auth.context_processors.auth',
 'django.contrib.messages.context_processors.messages',
 ],
 },
 },
]

WSGI_APPLICATION ='telusko.wsgi.application' # Database # 
https://docs.djangoproject.com/en/2.2/ref/settings/#databases DATABASES = {

 'default': {
 'ENGINE':'django.db.backends.sqlite3',
 'NAME': os.path.join(BASE_DIR,'db.sqlite3'),# Or path to database file 
if using sqlite3. 'USER':'',# Not used with sqlite3. 'PASSWORD':'',# Not used 
with sqlite3. 'HOST':'',# Set to empty string for localhost. Not used with 
sqlite3. 'PORT':'',
 }
}


# Password validation # 
https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators 
AUTH_PASSWORD_VALIDATORS = [

 {
 
'NAME':'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
 },
 {
 
'NAME':'django.contrib.auth.password_validation.MinimumLengthValidator',
 },
 {
 
'NAME':'django.contrib.auth.password_validation.CommonPasswordValidator',
 },
 {
 
'NAME':'django.contrib.auth.password_validation.NumericPasswordValidator',
 },
]


# Internationalization # 
https://docs.djangoproject.com/en/2.2/topics/i18n/ LANGUAGE_CODE ='en-us' TIME_ZONE ='UTC' USE_I18N =True USE_L10N =True USE_TZ =True # Static files (CSS, JavaScript, Images) # 
https://docs.djangoproject.com/en/2.2/howto/static-files/ STATIC_URL ='/static/' STATICFILES_DIRS = [

 os.path.join(BASE_DIR,'style.css'),
]
*_style.css_*
li a {
 color: green;
}
*_index.html_*
{% load static %}



{% if latest_question_list %}
 
 {% for question in latest_question_list %}
   {{ question.question_text 
}}
 {% endfor %}
 
{% else %}
 No polls are available.
{% endif %}
Regards,
Yasar Arafath K
--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3a71830f-e494-47b0-be2d-6d43e8d7cb27%40googlegroups.com 
.


--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c5c4c973-1f8c-f1c5-5c3c-cab23a7a4e30%40dewhirst.com.au.


Re: CSS not working in exe

2008-06-23 Thread Molly

Thanks Johan, I will check that out :)

On Jun 21, 8:06 am, johan de taeye <[EMAIL PROTECTED]> wrote:
> For my frePPle project, I have been using py2exe to package a
> standalone django application.
>
> See here for my manage.py 
> script:http://frepple.svn.sourceforge.net/viewvc/frepple/trunk/contrib/insta...
>
> Here's a patch for the django code to make also the django commands
> work with the zip-file created by 
> py2exe:http://code.djangoproject.com/ticket/5825 unfortunately
> not marked for the 1.0 release :-(
>
> Johan
>
> On 20 jun, 19:10, Molly <[EMAIL PROTECTED]> wrote:
>
> > Thanks for that tip, Chris! I have been wondering about that actually.
>
> > I think I am going to switch to Apache, because I have been having a
> > lot of trouble with the exe.
>
> > Thanks for the help, I aprreciate it :)
>
> > Molly
>
> > On Jun 20, 10:56 am, chris vigelius <[EMAIL PROTECTED]>
> > wrote:
>
> > > Hi Molly,
>
> > > please consider using dpaste.com or similar for posting long code 
> > > examples.
> > > Not only does this reduce list traffic, but you'll get syntax coloring and
> > > readable formatting, too...
>
> > > On to your question:
> > > I must admit I never used py2exe, so my advice may be misguided, but 
> > > shouldn't
> > > this list
>
> > > >data_files = [(".", 
> > > > [r"C:\dev\incidents\db.sqlite3"]),
> > > >(r".\templates\admin", 
> > > > glob.glob(r"C:\Python25\Lib\site-packages
> > > > \django\contrib\admin\templates\admin\*.*")),
> > > >(r".\templates\admin\auth\user", 
> > > > glob.glob(r"C:\Python25\Libsite-
> > > > packages\django\contrib\admin\templates\admin\auth\user\*.*")),
> > > > -~--~~~~--~~--~--~---
>
> > > somehow refer to C:\dev\incidents\media\, where you seem to store your 
> > > actual
> > > media files? If this "data_files" property does what I think it does, then
> > > you import admin media from site-packages, but not your own media files. 
> > > And
> > > btw, there's a backslash missing in the third line, too.
>
> > > hth,
> > >  chris- Tekst uit oorspronkelijk bericht niet weergeven -
>
> > - Tekst uit oorspronkelijk bericht weergeven -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: CSS not working in exe

2008-06-21 Thread johan de taeye


For my frePPle project, I have been using py2exe to package a
standalone django application.

See here for my manage.py script:
http://frepple.svn.sourceforge.net/viewvc/frepple/trunk/contrib/installer/manage.py?revision=640&view=markup

Here's a patch for the django code to make also the django commands
work with the zip-file created by py2exe:
http://code.djangoproject.com/ticket/5825  unfortunately
not marked for the 1.0 release :-(


Johan

On 20 jun, 19:10, Molly <[EMAIL PROTECTED]> wrote:
> Thanks for that tip, Chris! I have been wondering about that actually.
>
> I think I am going to switch to Apache, because I have been having a
> lot of trouble with the exe.
>
> Thanks for the help, I aprreciate it :)
>
> Molly
>
> On Jun 20, 10:56 am, chris vigelius <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > Hi Molly,
>
> > please consider using dpaste.com or similar for posting long code examples.
> > Not only does this reduce list traffic, but you'll get syntax coloring and
> > readable formatting, too...
>
> > On to your question:
> > I must admit I never used py2exe, so my advice may be misguided, but 
> > shouldn't
> > this list
>
> > >                    data_files = [(".", [r"C:\dev\incidents\db.sqlite3"]),
> > >                            (r".\templates\admin", 
> > > glob.glob(r"C:\Python25\Lib\site-packages
> > > \django\contrib\admin\templates\admin\*.*")),
> > >                            (r".\templates\admin\auth\user", 
> > > glob.glob(r"C:\Python25\Libsite-
> > > packages\django\contrib\admin\templates\admin\auth\user\*.*")),
> > > -~--~~~~--~~--~--~---
>
> > somehow refer to C:\dev\incidents\media\, where you seem to store your 
> > actual
> > media files? If this "data_files" property does what I think it does, then
> > you import admin media from site-packages, but not your own media files. And
> > btw, there's a backslash missing in the third line, too.
>
> > hth,
> >  chris- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: CSS not working in exe

2008-06-20 Thread Molly

Thanks for that tip, Chris! I have been wondering about that actually.

I think I am going to switch to Apache, because I have been having a
lot of trouble with the exe.

Thanks for the help, I aprreciate it :)

Molly

On Jun 20, 10:56 am, chris vigelius <[EMAIL PROTECTED]>
wrote:
> Hi Molly,
>
> please consider using dpaste.com or similar for posting long code examples.
> Not only does this reduce list traffic, but you'll get syntax coloring and
> readable formatting, too...
>
> On to your question:
> I must admit I never used py2exe, so my advice may be misguided, but shouldn't
> this list
>
> >data_files = [(".", [r"C:\dev\incidents\db.sqlite3"]),
> >(r".\templates\admin", 
> > glob.glob(r"C:\Python25\Lib\site-packages
> > \django\contrib\admin\templates\admin\*.*")),
> >(r".\templates\admin\auth\user", 
> > glob.glob(r"C:\Python25\Libsite-
> > packages\django\contrib\admin\templates\admin\auth\user\*.*")),
> > -~--~~~~--~~--~--~---
>
> somehow refer to C:\dev\incidents\media\, where you seem to store your actual
> media files? If this "data_files" property does what I think it does, then
> you import admin media from site-packages, but not your own media files. And
> btw, there's a backslash missing in the third line, too.
>
> hth,
>  chris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: CSS not working in exe

2008-06-20 Thread chris vigelius

Hi Molly,

please consider using dpaste.com or similar for posting long code examples. 
Not only does this reduce list traffic, but you'll get syntax coloring and 
readable formatting, too...

On to your question:
I must admit I never used py2exe, so my advice may be misguided, but shouldn't 
this list 

>   data_files = [(".", [r"C:\dev\incidents\db.sqlite3"]),
>   (r".\templates\admin", 
> glob.glob(r"C:\Python25\Lib\site-packages
> \django\contrib\admin\templates\admin\*.*")),
>   (r".\templates\admin\auth\user", 
> glob.glob(r"C:\Python25\Libsite-
> packages\django\contrib\admin\templates\admin\auth\user\*.*")),
> -~--~~~~--~~--~--~---

somehow refer to C:\dev\incidents\media\, where you seem to store your actual 
media files? If this "data_files" property does what I think it does, then 
you import admin media from site-packages, but not your own media files. And 
btw, there's a backslash missing in the third line, too.

hth,
 chris

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---