Re: STATIC FILE

2022-11-09 Thread Chukwudi Onwusa
I think you should make your work more organized, iff I truly understand
you, by putting your static directory inside your working directory.

On Thu, Nov 10, 2022, 04:25 Mh Raffi  wrote:

> Media url in settings I have.
>
> On Thu, Nov 10, 2022, 8:50 AM ritik sahoo  wrote:
>
>> You must import media url
>>
>> On Wed, 9 Nov, 2022, 8:58 pm Mh Raffi,  wrote:
>>
>>> Hi,
>>> I run cmd to collect static files but files are stored in c:\ but not in
>>> the actual project folder.
>>> My project folder is on the desktop.
>>> while running the command am into that root folder of the project.
>>> and i have images that are also not stored. I have an app in railway
>>> host and debug in a false  mode.
>>> I tried the option of white noise and it was still the same.
>>> Can anyone let me know where I am missing?
>>>
>>>
>>> Thanks & Regards
>>> Mohammed Raffi.J
>>>
>>>
>>> --
>>> 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/CAKfPRhVnz55d%2B%3Dw2N5Q2pJwj96ksnOWFO0njWPExGwNrzA6mMA%40mail.gmail.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/CAJwehCvguwsmDq9C9ohWWSmt%2BrORyT03ZSKhGStj1h9e8aLzDg%40mail.gmail.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/CAKfPRhV6POFbXFhiK%2BvyyZguAyk5WEw4LGt506V2kV2MWg8EYg%40mail.gmail.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/CAGoV8n%3DjC5r%2BRo-9ma7OXBczg0792dp%2BW-B-NFQLR4UWHWw%2BXg%40mail.gmail.com.


Re: STATIC FILE

2022-11-09 Thread Mh Raffi
Media url in settings I have.

On Thu, Nov 10, 2022, 8:50 AM ritik sahoo  wrote:

> You must import media url
>
> On Wed, 9 Nov, 2022, 8:58 pm Mh Raffi,  wrote:
>
>> Hi,
>> I run cmd to collect static files but files are stored in c:\ but not in
>> the actual project folder.
>> My project folder is on the desktop.
>> while running the command am into that root folder of the project.
>> and i have images that are also not stored. I have an app in railway host
>> and debug in a false  mode.
>> I tried the option of white noise and it was still the same.
>> Can anyone let me know where I am missing?
>>
>>
>> Thanks & Regards
>> Mohammed Raffi.J
>>
>>
>> --
>> 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/CAKfPRhVnz55d%2B%3Dw2N5Q2pJwj96ksnOWFO0njWPExGwNrzA6mMA%40mail.gmail.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/CAJwehCvguwsmDq9C9ohWWSmt%2BrORyT03ZSKhGStj1h9e8aLzDg%40mail.gmail.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/CAKfPRhV6POFbXFhiK%2BvyyZguAyk5WEw4LGt506V2kV2MWg8EYg%40mail.gmail.com.


Re: STATIC FILE

2022-11-09 Thread Mh Raffi
I have that configuration setup.

Images are not loading and collect static is collecting in c drive but my
project is in desktop.

On Thu, Nov 10, 2022, 8:50 AM ritik sahoo  wrote:

> You must import media url
>
> On Wed, 9 Nov, 2022, 8:58 pm Mh Raffi,  wrote:
>
>> Hi,
>> I run cmd to collect static files but files are stored in c:\ but not in
>> the actual project folder.
>> My project folder is on the desktop.
>> while running the command am into that root folder of the project.
>> and i have images that are also not stored. I have an app in railway host
>> and debug in a false  mode.
>> I tried the option of white noise and it was still the same.
>> Can anyone let me know where I am missing?
>>
>>
>> Thanks & Regards
>> Mohammed Raffi.J
>>
>>
>> --
>> 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/CAKfPRhVnz55d%2B%3Dw2N5Q2pJwj96ksnOWFO0njWPExGwNrzA6mMA%40mail.gmail.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/CAJwehCvguwsmDq9C9ohWWSmt%2BrORyT03ZSKhGStj1h9e8aLzDg%40mail.gmail.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/CAKfPRhU%2BaU3uxCCBfp2YR%3DsuCL%2Bd1vWwoXmDj0jH3bu0qLzZPA%40mail.gmail.com.


Re: STATIC FILE

2022-11-09 Thread ritik sahoo
You must import media url

On Wed, 9 Nov, 2022, 8:58 pm Mh Raffi,  wrote:

> Hi,
> I run cmd to collect static files but files are stored in c:\ but not in
> the actual project folder.
> My project folder is on the desktop.
> while running the command am into that root folder of the project.
> and i have images that are also not stored. I have an app in railway host
> and debug in a false  mode.
> I tried the option of white noise and it was still the same.
> Can anyone let me know where I am missing?
>
>
> Thanks & Regards
> Mohammed Raffi.J
>
>
> --
> 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/CAKfPRhVnz55d%2B%3Dw2N5Q2pJwj96ksnOWFO0njWPExGwNrzA6mMA%40mail.gmail.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/CAJwehCvguwsmDq9C9ohWWSmt%2BrORyT03ZSKhGStj1h9e8aLzDg%40mail.gmail.com.


Re: STATIC FILE

2022-11-09 Thread Lakshyaraj Dash
Set the STATIC_ROOT conf as follows
import os # ignore if once imported
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')

Also see of you've allowed that particular host.

Thanks and Regards
Lakshyaraj Dash

On Wed, Nov 9, 2022, 20:57 Mh Raffi  wrote:

> Hi,
> I run cmd to collect static files but files are stored in c:\ but not in
> the actual project folder.
> My project folder is on the desktop.
> while running the command am into that root folder of the project.
> and i have images that are also not stored. I have an app in railway host
> and debug in a false  mode.
> I tried the option of white noise and it was still the same.
> Can anyone let me know where I am missing?
>
>
> Thanks & Regards
> Mohammed Raffi.J
>
>
> --
> 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/CAKfPRhVnz55d%2B%3Dw2N5Q2pJwj96ksnOWFO0njWPExGwNrzA6mMA%40mail.gmail.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/CAF7qQgBJe0v4JBU_MQ2YJbzEQ1gzttgRz4OfUhdK87soS4VQgw%40mail.gmail.com.


Re: Static file - java script - not found

2022-09-07 Thread Lakshyaraj Dash
His configurations are correct os module is not compulsory... because the
BASE_DIR is already configured...

On Thu, Sep 8, 2022, 04:51 Ezekiel Obiajulu 
wrote:

> There is an error in staticfiles_dirs
> Message me on WhatsApp for further corrections ...
> Use that code
> STATIC_URL = 'static/'
> STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]
>
> remember to:
> import os
> at the top
>
> +2349033768504 (WhatsApp only)
>
> On Wednesday, September 7, 2022 at 10:19:38 PM UTC+1 bodyabd...@gmail.com
> wrote:
>
>> Dear All;
>> I've problem in static folder , the file js not found
>>
>> --
> 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/1ab4716e-c311-4bc3-9e3b-6954e9056d55n%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/CAF7qQgCvO-5QjVw-B-%2BOYgTYtxBtAzy3WciP8RxsV5urmsOPQA%40mail.gmail.com.


Re: Static file - java script - not found

2022-09-07 Thread Ezekiel Obiajulu
There is an error in staticfiles_dirs 
Message me on WhatsApp for further corrections ... 
Use that code 
STATIC_URL = 'static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]

remember to:
import os
at the top 

+2349033768504 (WhatsApp only)

On Wednesday, September 7, 2022 at 10:19:38 PM UTC+1 bodyabd...@gmail.com 
wrote:

> Dear All;
> I've problem in static folder , the file js not found 
>
>

-- 
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/1ab4716e-c311-4bc3-9e3b-6954e9056d55n%40googlegroups.com.


Re: Static file - java script - not found

2022-09-07 Thread Ezekiel Obiajulu
Use this code [image: Annotation 2022-09-07 231453.png] remember to:
import os at the top 

On Wednesday, September 7, 2022 at 10:19:38 PM UTC+1 bodyabd...@gmail.com 
wrote:

> Dear All;
> I've problem in static folder , the file js not found 
>
>

-- 
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/61da8caa-1983-4abf-833e-3c9edad52248n%40googlegroups.com.


Re: Static file - java script - not found

2022-09-07 Thread Lakshyaraj Dash
Listen you need to configure your sales app inside the installed apps like
'sales.apps.SalesConfig' and remove the line 'BASE_DIR / sales / static'
from the STATIFILES_DIRS.

Thanks and regards
Lakshyaraj Dash

On Thu, Sep 8, 2022, 02:49 bodyabd...@gmail.com 
wrote:

> Dear All;
> I've problem in static folder , the file js not found
>
> --
> 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/191f5b42-a186-4ca7-ba5e-de441e4dc7f2n%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/CAF7qQgDqAo%2Btm1gsQGCyzcDxRavwvfUsKGvQrAKYNjKt0EU71A%40mail.gmail.com.


Re: static file serve nothing is load in deployment

2022-06-15 Thread Antonis Christofides
If you are running the server with "manage.py runserver", STATIC_ROOT is 
irrelevant. You should put the "polls" directory in "polls/static", i.e. e.g. 
"polls/static/polls/style.css"; this is relative to the folder where "manage.py" is.



On 15/06/2022 13.54, luca72.b...@gmail.com wrote:

no i'm not in production
i'm running with runserver

Il giorno mercoledì 15 giugno 2022 alle 12:45:54 UTC+2 Antonis Christofides ha 
scritto:


Is this in production? Are you using apache or something? if yes, please
take a look at

https://djangodeployment.readthedocs.io/en/latest/_images/how-static-files-work-apache.png.
Otherwise, please explain in more detail what your deployment environment
looks like.


On 15/06/2022 13.08, luca72.b...@gmail.com wrote:

Hello i have this configuration in settings.py

STATIC_URL = '/static_files/'
STATIC_ROOT =  'D:/prova_nuovo_sito/static_files'

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

The folder where I store the file is 'D:/prova_nuovo_sito/static_files'
in this folder I have a subfolder polls with all the needed file

The template I write as follow:
{% load static %}
    

What is wrong
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...@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/8398ea8b-63da-40c1-90e6-fedd08594085n%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/34b6ab11-2892-4d16-a848-ee8b09a09344n%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/16abae4f-b0d9-73e2-2e97-fe5abf4f57a3%40antonischristofides.com.


Re: static file serve nothing is load in deployment

2022-06-15 Thread luca72.b...@gmail.com
no i'm not in production
i'm running with runserver 

Il giorno mercoledì 15 giugno 2022 alle 12:45:54 UTC+2 Antonis Christofides 
ha scritto:

> Is this in production? Are you using apache or something? if yes, please 
> take a look at 
> https://djangodeployment.readthedocs.io/en/latest/_images/how-static-files-work-apache.png.
>  
> Otherwise, please explain in more detail what your deployment environment 
> looks like.
>
>
> On 15/06/2022 13.08, luca72.b...@gmail.com wrote:
>
> Hello i have this configuration in settings.py 
>
> STATIC_URL = '/static_files/'
> STATIC_ROOT =  'D:/prova_nuovo_sito/static_files'
>
> INSTALLED_APPS = [
> 'polls.apps.PollsConfig',
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> ]
>
> The folder where I store the file is  'D:/prova_nuovo_sito/static_files'
> in this folder I have a subfolder polls with all the needed file
>
> The template I write as follow:
> {% load static %}
>  media="screen">
>
> What is wrong
> 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...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/8398ea8b-63da-40c1-90e6-fedd08594085n%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/34b6ab11-2892-4d16-a848-ee8b09a09344n%40googlegroups.com.


Re: static file serve nothing is load in deployment

2022-06-15 Thread Antonis Christofides
Is this in production? Are you using apache or something? if yes, please take a 
look at 
https://djangodeployment.readthedocs.io/en/latest/_images/how-static-files-work-apache.png. 
Otherwise, please explain in more detail what your deployment environment looks 
like.



On 15/06/2022 13.08, luca72.b...@gmail.com wrote:

Hello i have this configuration in settings.py

STATIC_URL = '/static_files/'
STATIC_ROOT =  'D:/prova_nuovo_sito/static_files'

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

The folder where I store the file is 'D:/prova_nuovo_sito/static_files'
in this folder I have a subfolder polls with all the needed file

The template I write as follow:
{% load static %}
    

What is wrong
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8398ea8b-63da-40c1-90e6-fedd08594085n%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/b094eb89-953c-56fa-4c37-e827b7b76331%40antonischristofides.com.


Re: static file rendering help

2013-04-05 Thread Fatih Tiryakioglu
I tried both of them, but it seems it isn't the problem..


--

5 Nisan 2013 Cuma 23:14:20 UTC+3 tarihinde jondbaker yazdı:
>
> From a quick glance it appears that the file source you've included in the 
> html is not specifying a file extension.
>
> Try:
>  src="/home/mehmet/internet_projeleri/site4ust/unnamed/60830071673353216.jpg" 
> />
> ...instead of...
>  />
>
>
> On Fri, Apr 5, 2013 at 1:43 PM, Fatih Tiryakioglu 
>  > wrote:
>
>> Thank you. 
>>
>> The shortcut of the picture:
>> /home/mehmet/internet_projeleri/site4ust/unnamed/60830071673353216.jpg
>>
>> In the template I have written the line below to render a jpg file. 
>>
>> > src="/home/mehmet/internet_projeleri/site4ust/unnamed/60830071673353216" />
>>
>> And in the settings:
>>
>> MEDIA_ROOT = '/home/mehmet/internet_projeleri/site4ust/unnamed'
>> MEDIA_URL = '/unnamed/'
>> STATIC_ROOT = ''
>> STATIC_URL = '/static/'
>>
>> What is wrong..
>>
>>
>> --
>>
>>
>>
>> 5 Nisan 2013 Cuma 20:26:40 UTC+3 tarihinde Navid Shaikh yazdı:
>>
>>>
>>>
>>> On Friday, April 5, 2013 11:16:00 AM UTC+5:30, Fatih Tiryakioglu wrote:

 Hi all,

 I want to render back "user uploaded images" via template. I pass the 
 shortcuts to the template, but template can't show it: only small image 
 symbol. How can i show it up. I tryed some 'MEDIA_ROOT', 'MEDIA_URL' 
 settings, and read some info, but i couldn't figure out..

  
>>> Might be the there is problem with the path of image.
>>> Can you post the some code, how are you rendering images? 
>>>
>>  -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> Jonathan D. Baker
> Developer
> http://jonathandbaker.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: static file rendering help

2013-04-05 Thread Jonathan Baker
>From a quick glance it appears that the file source you've included in the
html is not specifying a file extension.

Try:

...instead of...



On Fri, Apr 5, 2013 at 1:43 PM, Fatih Tiryakioglu wrote:

> Thank you.
>
> The shortcut of the picture:
> /home/mehmet/internet_projeleri/site4ust/unnamed/60830071673353216.jpg
>
> In the template I have written the line below to render a jpg file.
>
>  src="/home/mehmet/internet_projeleri/site4ust/unnamed/60830071673353216" />
>
> And in the settings:
>
> MEDIA_ROOT = '/home/mehmet/internet_projeleri/site4ust/unnamed'
> MEDIA_URL = '/unnamed/'
> STATIC_ROOT = ''
> STATIC_URL = '/static/'
>
> What is wrong..
>
>
> --
>
>
>
> 5 Nisan 2013 Cuma 20:26:40 UTC+3 tarihinde Navid Shaikh yazdı:
>
>>
>>
>> On Friday, April 5, 2013 11:16:00 AM UTC+5:30, Fatih Tiryakioglu wrote:
>>>
>>> Hi all,
>>>
>>> I want to render back "user uploaded images" via template. I pass the
>>> shortcuts to the template, but template can't show it: only small image
>>> symbol. How can i show it up. I tryed some 'MEDIA_ROOT', 'MEDIA_URL'
>>> settings, and read some info, but i couldn't figure out..
>>>
>>>
>> Might be the there is problem with the path of image.
>> Can you post the some code, how are you rendering images?
>>
>  --
> 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 http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Jonathan D. Baker
Developer
http://jonathandbaker.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: static file rendering help

2013-04-05 Thread Fatih Tiryakioglu
Thank you. 

The shortcut of the picture:
/home/mehmet/internet_projeleri/site4ust/unnamed/60830071673353216.jpg

In the template I have written the line below to render a jpg file. 



And in the settings:

MEDIA_ROOT = '/home/mehmet/internet_projeleri/site4ust/unnamed'
MEDIA_URL = '/unnamed/'
STATIC_ROOT = ''
STATIC_URL = '/static/'

What is wrong..


--



5 Nisan 2013 Cuma 20:26:40 UTC+3 tarihinde Navid Shaikh yazdı:
>
>
>
> On Friday, April 5, 2013 11:16:00 AM UTC+5:30, Fatih Tiryakioglu wrote:
>>
>> Hi all,
>>
>> I want to render back "user uploaded images" via template. I pass the 
>> shortcuts to the template, but template can't show it: only small image 
>> symbol. How can i show it up. I tryed some 'MEDIA_ROOT', 'MEDIA_URL' 
>> settings, and read some info, but i couldn't figure out..
>>
>>  
> Might be the there is problem with the path of image.
> Can you post the some code, how are you rendering images? 
>

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: static file rendering help

2013-04-05 Thread Navid Shaikh


On Friday, April 5, 2013 11:16:00 AM UTC+5:30, Fatih Tiryakioglu wrote:
>
> Hi all,
>
> I want to render back "user uploaded images" via template. I pass the 
> shortcuts to the template, but template can't show it: only small image 
> symbol. How can i show it up. I tryed some 'MEDIA_ROOT', 'MEDIA_URL' 
> settings, and read some info, but i couldn't figure out..
>
>  
Might be the there is problem with the path of image.
Can you post the some code, how are you rendering images? 

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: static file rendering help

2013-04-05 Thread Rafael E. Ferrero
i just use de url template tag.


2013/4/5 Fatih Tiryakioglu 

> Hi all,
>
> I want to render back "user uploaded images" via template. I pass the
> shortcuts to the template, but template can't show it: only small image
> symbol. How can i show it up. I tryed some 'MEDIA_ROOT', 'MEDIA_URL'
> settings, and read some info, but i couldn't figure out..
>
> I appreciate your helps..
>
>
> --
>
>  --
> 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 http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Rafael E. Ferrero
Claro: (03562) 15514856

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Static File - help, for a question

2012-07-12 Thread Dott. Tegagni Alessandro
Ok, but Static_root in settings.py is empty, so i import static_url or
staticfiles_dirs ?
In static_url there is define '/static/'
In staticfiles_dirs are define: (
'/home/alessandro/Scrivania/progetto/media/photos/custodia/',
'/home/alessandro/Scrivania/progetto/media/definitiva/',
'/home/alessandro/Scrivania/progetto/media/proforma/',
'/home/alessandro/Scrivania/progetto/media/fpdf/',
)

So in urls.py, in theory I must import that directory.

Then in settings.py, in head, import:
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

(
https://docs.djangoproject.com/en/1.4/howto/static-files/#staticfiles-development
)
and add

urlpatterns += staticfiles_urlpatterns()

But if I realod the admin page, and i find to see the image file or
pdf file, the page not found:
'alessandro/Scrivania/progetto/media/photos/custodia/shop-ad.jpg'
could not be found

Now, I don't know what to do.
Certainly this a Stupid Problem, but I am a New Users in Django, and
I'm sorry for my english. :-(


*Dott. Tegagni Alessandro*
Consulente nel settore delle Tecnologie Informatiche
Siti Web e Applicazioni Mobile

Ufficio di Cremona:
Via Fatebenefratelli, 2 - 26100 Cremona (Cr)
Tel. 333/9118728
P.Iva 01521350197

Sito Web 


("Le informazioni contenute nella presente comunicazione possono essere
riservate e sono, comunque, destinate alle persone o alla società sopra
indicati. La diffusione, distribuzione e/o copiatura del documento
trasmesso da parte di qualsiasi soggetto diverso dal destinatario è
proibita, sia ai sensi dell'art.616 c.p.c. che ai sensi del D.Lgs.n.
196/2003.

Se avete ricevuto questo messaggio per errore, vi preghiamo cortesemente di
cancellarlo ed informarci immediatamente.")



2012/7/12 Dennis Lee Bieber 

> On Thu, 12 Jul 2012 01:30:35 +0200, "Dott. Tegagni Alessandro"
>  declaimed the following in
> gmane.comp.python.django.user:
>
> > Thanks Dennis, in settings.py, the situation are:
> >
>
> It's not the "settings.py" file I'm interested in... It's
> django.conf.settings.py that is active in your later usage. Unless the
> two are somehow the same file you may not be accessing what you think
> you are!
>
> What you typed as
>
> from settings import STATIC_ROOT
> from django.conf import settings
> ...
> {'document_root', settings.STATIC_ROOT})
>
> is, based on your imports, the same as
>
> import django
> ...
> {'document_root', django.conf.settings.STATIC_ROOT})
>
> If you want the STATIC_ROOT from
>
> from settings import STATIC_ROOT
>
> then you need to use
>
> ...
> {'document_root', STATIC_ROOT})
>
>
>
> --
> Wulfraed Dennis Lee Bieber AF6VN
> wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.com/
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: static file problem with modwsgi+ apache2 with django1.3

2011-12-10 Thread Jisson Varghese
@ Ramiro Morales Thank you for your response, *edit the configuration file
as you suggested ,But still am facing the problem.*
I have one doubt about the configuration
I used collectstatic command for static files,
STATIC_ROOT =
'/home/jisson/Desktop/testcloud.aws/DjangoApis/teststaticfiles/'
 STATIC_URL = '/static/'

Whether I add static or teststaticfiles in the last of following line now
am added  'static'

 Alias /static/ /home/jisson/Desktop/testcloud.aws/DjangoApis/static/


teststaticfiles - is the directory in my project where collect static
command collects and save all of my static contents.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: static file problem with modwsgi+ apache2 with django1.3

2011-12-10 Thread Ramiro Morales
On Sat, Dec 10, 2011 at 7:01 AM, Jiss  wrote:
> Settings.py
> STATIC_ROOT = '/home/jisson/Desktop/testcloud.aws/DjangoApis/
> teststaticfiles/'

This is wrong (although it shouldn' t affect your apache+mod_wsgi deployment),
 per the tree structure you posted earlier, you don't have a teststaticfiles
directory.

>
> /etc/apache2/sites/enabled/DjangoApis:
>
> [...]
> Alias /static/ /home/jisson/Desktop/testcloud.aws/DjangoApis/static
> 
> Order deny,allow
> Allow from all
> 
>
> [...]
>
> apache errorlog:
> tail /var/log/apache2/error.log
> [Sat Dec 10 03:16:36 2011] [error] [client 127.0.0.1] File does not
> exist: /home/jisson/Desktop/testcloud.aws/DjangoApis/staticjs,
> referer: http://test.webapp/

Looks like you are missing a trailing / in the Alias definition. i.e.
it should read:

Alias /static/ /home/jisson/Desktop/testcloud.aws/DjangoApis/static/

(see https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/)

but the fact that all the error log entries are about subdirectories
of the static dir (js, images) but no about actual static files is a
bit strange.

-- 
Ramiro Morales

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Static file problem using the development server

2011-08-09 Thread Daniel Roseman
On Tuesday, 9 August 2011 09:48:22 UTC+1, Rodney Topor wrote:
>
> Great.  Thank you.  I missed one, and this somehow affected others. 
> (Must try to understand what RequestContext really does one day.) 
>
> RT


It just runs the context processors, which add various things to the context 
- including STATIC_URL.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/I039Wz2IzRcJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Static file problem using the development server

2011-08-09 Thread Rodney Topor
Great.  Thank you.  I missed one, and this somehow affected others.
(Must try to understand what RequestContext really does one day.)

RT

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Static file problem using the development server

2011-08-09 Thread Daniel Roseman
On Tuesday, 9 August 2011 08:24:20 UTC+1, Rodney Topor wrote:
>
> I tried using a style sheet served as a static file with the tutorial 
> project.  In settings.py, I defined STATIC_URL = /static/ and 
> STATICFILES_DIRS = ('/path/to/project/static/',).  Then I defined a 
> base_html template with a line in the HEAD of the form 
>
>
>
> and put style.css in directory /static/.  Finally, I defined 
> index.html, detail.html, etc., as given in the tutorial to each extend 
> base.html. 
>
> Everything works perfectly, except that only one template 
> (detail.html) correctly processes the {{ STATIC_URL }} value to find / 
> static/style.css.  In every other template, {{ STATIC_URL }} evaluates 
> to the empty string, giving just style.css, which does not exist of 
> course. 
>
> Every template extends the single base template in the same way.  So 
> why does {{ STATIC_URL }} work for some templates and not others? 
>
> Rodney


Because you need to use a RequestContext to render the template.
--
DR. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/H_SiI4YEu1YJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Static file serve with prior authentication?

2009-02-25 Thread John Hensley

On Feb 23, 2009, at 5:20 PM, Graham Dumpleton wrote:

> The approach for mod_python documented in that link, and equivalent
> for mod_wsgi, are only good for HTTP Basic authentication, it is no
> good if you want the page to be authenticated using HTML form/cookie
> based authentication as Django uses.

Assuming you can add an Apache module, or use lighttpd or nginx, you  
can write a Django view to handle the authorization, then delegate the  
actual file delivery to your web server. I think Perlbal also has its  
reproxy feature to do this.

It's been covered a few times in this group:

http://groups.google.com/group/django-users/search?group=django-users=sendfile_g=Search+this+group

Links:

   http://tn123.ath.cx/mod_xsendfile/

   http://blog.lighttpd.net/articles/2006/07/02/x-sendfile

   http://wiki.codemongers.com/NginxXSendfile

John


--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Static file serve with prior authentication?

2009-02-23 Thread Katja Loeffler

> You don't really want use django.views.static.serve in the real world  

OK ;).

> http://docs.djangoproject.com/en/dev/howto/apache-auth/

Thanks! I'll have a look.

Katja


--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Static file serve with prior authentication?

2009-02-23 Thread Andy Mckay


On 23-Feb-09, at 1:44 PM, Katja Loeffler wrote:
> I have been looking for a solution to make a file download with prior
> authentication ...

>
> But this is not really "protected" since they can make the link public
> once they have it and everyone can download without prior login.
>
> I have used:
> (r'^site_media/(?P.*)$', 'django.views.static.serve',
> {'document_root': '/path/to/media'})

You don't really want use django.views.static.serve in the real world  
anyway, you want to use Apache. And for Apache there is an  
Authentication handler for mod_python that allows you to authenticate  
a request for a static file.

http://docs.djangoproject.com/en/dev/howto/apache-auth/

Other webservers and tools may vary.
--
   Andy McKay
   ClearWind Consulting: www.clearwind.ca
   Blog: www.agmweb.ca/blog/andy


--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: static file problems (newbie)

2008-01-09 Thread [EMAIL PROTECTED]

Thanks,

indeed i made a mistake in that part, i changed it to screen and now
it works.
this is really something i should keep in mind while migrating
applications.

thanks again,

Richard

On Jan 9, 4:54 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> On Jan 9, 2008 10:28 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > I can access it, also all the images can be viewed by going to the
> > url.
>
> 
>
> > It only won't appear in the actual html files.
> > > > the link that i put in my index file is the following
> > > >  > > > media="print" >
>
> I have one question. When you're testing it at the URL for the page
> itself, are you printing the page, or at least going to Print Preview?
> Your  tag here specifies that the CSS would only be applied when
> printing the page, so it shouldn't show up when just viewing it
> normally.
>
> If you intend it to show up on the screen instead of on paper, change
> the media from "print" to "screen" or leave it off entirely if the
> formatting is acceptable for printing. If you intend it for print, and
> you're looking at Print Preview and it's still not working, that's
> still an issue in need of fixing. I just want to make sure you're
> testing it in the right place.
>
> -Gul
--~--~-~--~~~---~--~~
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: static file problems (newbie)

2008-01-09 Thread Marty Alchin

On Jan 9, 2008 10:28 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I can access it, also all the images can be viewed by going to the
> url.



> It only won't appear in the actual html files.
> > > the link that i put in my index file is the following
> > >  > > media="print" >

I have one question. When you're testing it at the URL for the page
itself, are you printing the page, or at least going to Print Preview?
Your  tag here specifies that the CSS would only be applied when
printing the page, so it shouldn't show up when just viewing it
normally.

If you intend it to show up on the screen instead of on paper, change
the media from "print" to "screen" or leave it off entirely if the
formatting is acceptable for printing. If you intend it for print, and
you're looking at Print Preview and it's still not working, that's
still an issue in need of fixing. I just want to make sure you're
testing it in the right place.

-Gul

--~--~-~--~~~---~--~~
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: static file problems (newbie)

2008-01-09 Thread [EMAIL PROTECTED]

Hello,

I can access it, also all the images can be viewed by going to the
url.
It only won't appear in the actual html files.

Richard

On Jan 9, 3:29 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Can you accesshttp://127.0.0.1:8000/css/idap.css?
>
> Maybe you have a  tag in you html?
>
> Am Mittwoch, 9. Januar 2008 13:49 schrieb [EMAIL PROTECTED]:
>
> > Hello Django Users,
>
> > I looked at the documentation about the static file serving but don't
> > seem to get it to work.
>
> > the url pattern i put down is the following
> > (r'^css/(?P.*)$','django.views.static.serve',{'document_root':'/
> > Users/cyclops/Documents/crosslinks/idap/qualityControl/templates/
> > css','show_indexes':True})
>
> > when i start my browser i can access the webpages with the following
> > url
> >http://127.0.0.1:8000/qualityControl/
>
> > the css is not server, however if i put the following url i see the
> > file
> >http://127.0.0.1:8000/css/
>
> > the link that i put in my index file is the following
> >  > media="print" >
>
> > Is there something that i'm doing wrong ?
>
> > you help would be greatly appreciated,
>
> > regards,
>
> > Richard Mendes
--~--~-~--~~~---~--~~
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: static file problems (newbie)

2008-01-09 Thread Thomas Guettler

Hi,

Can you access http://127.0.0.1:8000/css/idap.css ?

Maybe you have a  tag in you html?

Am Mittwoch, 9. Januar 2008 13:49 schrieb [EMAIL PROTECTED]:
> Hello Django Users,
>
> I looked at the documentation about the static file serving but don't
> seem to get it to work.
>
> the url pattern i put down is the following
> (r'^css/(?P.*)$','django.views.static.serve',{'document_root':'/
> Users/cyclops/Documents/crosslinks/idap/qualityControl/templates/
> css','show_indexes':True})
>
> when i start my browser i can access the webpages with the following
> url
> http://127.0.0.1:8000/qualityControl/
>
> the css is not server, however if i put the following url i see the
> file
> http://127.0.0.1:8000/css/
>
> the link that i put in my index file is the following
>  media="print" >
>
> Is there something that i'm doing wrong ?
>
> you help would be greatly appreciated,
>
> regards,
>
> Richard Mendes
> 

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---