Re: Images are not showing up in the page

2023-04-09 Thread Sahan Srinivas
Yeah thanks everyone, the problem is resolved. On Sun, Apr 9, 2023 at 5:19 PM Kiyavilo Msekwa wrote: > If you are running it on a live server make sure that media/photos folder > is on public_html before you run load %satic% since the access to the > domain will look into public_html folder to w

Re: Images are not showing up in the page

2023-04-09 Thread Kiyavilo Msekwa
If you are running it on a live server make sure that media/photos folder is on public_html before you run load %satic% since the access to the domain will look into public_html folder to which Django does not run from. I had previously encountered similar situation and the solution was to copy

Re: Images

2022-05-13 Thread Boris Pérez
If the images files are sotored in static: {% load static %} El vie, 13 may 2022 a las 10:03, Nicolas Passarini (< nicolaspassar...@gmail.com>) escribió: > how do you refer to the object in the template? > > El martes, 10 de mayo de 2022 a la(s) 09:58:56 UTC-3, narsh...@gmail.com > escribió: >

Re: Images

2022-05-13 Thread Nicolas Passarini
how do you refer to the object in the template? El martes, 10 de mayo de 2022 a la(s) 09:58:56 UTC-3, narsh...@gmail.com escribió: > You change the names of the pictures in the separate folder then copy them > in a static folder then change the picture file names in the template > folder then

Re: Images

2022-05-10 Thread Arshad Noman
You change the names of the pictures in the separate folder then copy them in a static folder then change the picture file names in the template folder then refresh then see pictures are new ones or not On Mon, 9 May 2022 at 20:15, Aliya Janmohamed wrote: > Hi > > It is still displaying the same

Re: Images

2022-05-09 Thread Aliya Janmohamed
Hi It is still displaying the same image as above. On Sun, 8 May 2022 at 03:34, Arshad Noman wrote: > First, you change the picture name and place it in the pictures folder > like static or media folder then change the picture name in templates where > you want the picture to be displayed > > >

Re: Images

2022-05-08 Thread Arshad Noman
First, you change the picture name and place it in the pictures folder like static or media folder then change the picture name in templates where you want the picture to be displayed

Re: Images and pdfs for production level

2020-02-15 Thread Soumen Khatua
Okay On Sun 16 Feb, 2020, 11:37 AM Devender Kumar, wrote: > Read about cloudfront that will help you for sure. > > On Sun, 16 Feb, 2020, 11:03 am Soumen Khatua, > wrote: > >> Actually I'm using s3 bucket but I want to convert it as a CDN. Could you >> tell me how I can do that? >> >> Thank you

Re: Images and pdfs for production level

2020-02-15 Thread Devender Kumar
Read about cloudfront that will help you for sure. On Sun, 16 Feb, 2020, 11:03 am Soumen Khatua, wrote: > Actually I'm using s3 bucket but I want to convert it as a CDN. Could you > tell me how I can do that? > > Thank you > > Regards, > Soumen > > On Fri 14 Feb, 2020, 1:10 PM Devender Kumar, w

Re: Images and pdfs for production level

2020-02-15 Thread Soumen Khatua
Actually I'm using s3 bucket but I want to convert it as a CDN. Could you tell me how I can do that? Thank you Regards, Soumen On Fri 14 Feb, 2020, 1:10 PM Devender Kumar, wrote: > I will suggest you go with AWS S3 you can use boto3 lib available for > python > > On Thu, 13 Feb, 2020, 12:32 pm

Re: Images and pdfs for production level

2020-02-13 Thread Devender Kumar
I will suggest you go with AWS S3 you can use boto3 lib available for python On Thu, 13 Feb, 2020, 12:32 pm Soumen Khatua, wrote: > Yes,I want to use CDN for my static files. But I don't know how to > implement it. > > On Wed, Feb 12, 2020 at 9:04 PM Devender Kumar > wrote: > >> Some CDN >> >>

Re: Images and pdfs for production level

2020-02-12 Thread Soumen Khatua
Yes,I want to use CDN for my static files. But I don't know how to implement it. On Wed, Feb 12, 2020 at 9:04 PM Devender Kumar wrote: > Some CDN > > On Wed, 12 Feb, 2020, 7:18 pm Soumen Khatua, > wrote: > >> Hi Folks, >> Where I need to store images and pdfs for production level. >> >> Thank y

Re: Images and pdfs for production level

2020-02-12 Thread Devender Kumar
Some CDN On Wed, 12 Feb, 2020, 7:18 pm Soumen Khatua, wrote: > Hi Folks, > Where I need to store images and pdfs for production level. > > Thank you in advance > > regards, > Soumen > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To un

Re: images in production mode. is pointed to a different path.

2019-08-26 Thread Aldian Fazrihady
On production, static files shouldn't be the burden of django server. Many people are using Nginx to handle static file. This is the guide: https://docs.djangoproject.com/en/2.2/howto/static-files/deployment/ On Mon, Aug 26, 2019 at 11:13 PM janderson abreu wrote: > Good afternoon, I'm having tr

Re: Images are not displaying

2017-06-16 Thread Antonis Christofides
Hello, > ** This is probably missing a slash before "static"; it should be like this: But a better way is this: {% load static %} ... If you are on production rather than development, see also this: https://djangodeployment.com/2016/11/21/how-django-static-files-work-in-production/ Regard

Re: Images are not displaying

2017-06-16 Thread Carl
Hi! Because static is a folder on the root of your website, try putting a slash in front of static; for example, Hope this helps. :-) Sincerely, Carl Original Message Subject: Images are not displaying Local Time: June 16, 2017 1:44 AM UTC Time: June 16, 2017 5:44 AM From: s

Re: Images are not displaying

2017-06-16 Thread 'Abraham Varricatt' via Django users
If this is a production deployment, you probably need to run collectstatic and test if static files are being served correctly - more a deployment issue than a django matter. But, if you are testing with 'runserver' on a development system ... without exact knowledge of your folder structure,

Re: pywkhtmltopdf [Was: [mezzanine-users] Re: Images in .pdf Invoice]

2016-07-06 Thread Mike Dewhirst
Akhil thank you. I'll bookmark your advice for later. At this point staying with a functional view might be less work. Next views to be written will probably be class based Cheers Mike Akhil Lawrence wrote: >To answer  how do I change from function based views to class based views, > > >The s

Re: pywkhtmltopdf [Was: [mezzanine-users] Re: Images in .pdf Invoice]

2016-06-30 Thread Akhil Lawrence
To answer *how do I change from function based views to class based views,* The simplest way to do that is, create a view file as below: from django.views.generic import View class ViewName(View): def get(self, request, *args, **kwargs): def post(self, request, *args, **k

pywkhtmltopdf [Was: [mezzanine-users] Re: Images in .pdf Invoice]

2016-06-28 Thread Mike Dewhirst
Sorry for hijacking a thread from Mezzanine ... On 29/06/2016 11:22 AM, Sam Kingston wrote: I'm not sure if this will help you or not, but I developed a replacement library for xhtml2pdf (though not a drop-in): https://github.com/sjkingo/pywkhtmltopdf Thank you Sam :) Do you have a separate

Re: images umpload prob

2014-07-29 Thread Mario Gudelj
Use the url it gives you inside src attribute inside img tag. On 30/07/2014 1:19 pm, "ngangsia akumbo" wrote: > i have the following > > MODEL > > from django.db import models > > class Timer(models.Model): > title = models.CharField(max_length=100) > slug = models.SlugField(unique=True)

Re: images in a template

2011-03-27 Thread Vladimir
I have found a solution but it's very strange! Remind I use Django 1.2.5, development web server, Windows 7. Project level (named galiontours) urls.py: import os from django.conf.urls.defaults import * from galiontours.galion import views from galion.views import index from galiontours import setti

Re: images in a template

2011-03-19 Thread Sultan Imanhodjaev
The piece of code below from my own development stack ( r'^static/(?P.*)$', serve, {'document_root': '%s/../static' % (APPLICATION,)} ) On Sat, Mar 19, 2011 at 10:42 PM, Vladimir wrote: > Thank You, Sultan! > Search "django.views.static.serve" for Django 1.2 in > http://docs.djan

Re: images in a template

2011-03-19 Thread Vladimir
Thank You, Sultan! Search "django.views.static.serve" for Django 1.2 in http://docs.djangoproject.com/ gives nothing. I failed to get any from Your answer, because I'm a beginner, You see. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: images in a template

2011-03-19 Thread Sultan Imanhodjaev
Hello, Sometimes for unknown reason I've to use a small workaround while developing from django.views.static import serve and then just use serve itself url((r'^site_media/(?P.*)$', serve, {'document_root': settings.STATIC_DOC_ROOT}), 2011/3/19 Vladimir > Большое спасибо, Артем, за до

Re: images in a template

2011-03-19 Thread Vladimir
Большое спасибо, Артем, за добрый совет, сразу моя ошибка прояснилась! У меня есть Подробное руководство А.Головатого и Д.Каплан-Мосса (2010), и книга Дж.Форсье, П.Биссекса и У.Чана (2010). Руководство на сайте Django я тоже стараюсь читать вдумчиво. Не ожидаю, что за меня все сделают. Пока осваива

Re: images in a template

2011-03-19 Thread Vladimir
Thank You very much, Daniel ! I try to follow every advice of You and Mike. > So you put the image in the media directory. In a project directory 'galiontour' I created a subdirectory 'media' and placed 'galion.gif' into it. Index.html was placed into application level directory 'galion'. > Then

Re: images in a template

2011-03-19 Thread Vladimir
> unmatched parentheses `url((` should be `url(` Thank You very much, Mike! -- 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

Re: images in a template

2011-03-19 Thread Artem
Почемуб тебе сначала не разобратся как и что работает, и не задавать глупых вопросов, за тебя всеравно все не сделают. Почитай (вдумчиво) книжки и туторы по джанге, например мне сам больше помогла разобратся "Beginning Django E-Commerce [Jim McGaw] (2009)" -- You received this message because you

Re: images in a template

2011-03-19 Thread Mike Ramirez
On Saturday, March 19, 2011 05:37:04 am Vladimir wrote: > url((r'^site_media/(?P.*)$', 'django.views.static.serve', > {'document_root': settings.STATIC_DOC_ROOT}), unmatched parentheses `url((` should be `url(` Mike -- Program load too heavy for processor to lift. -- You receive

Re: images in a template

2011-03-19 Thread Daniel Roseman
On Saturday, March 19, 2011 12:54:22 PM UTC, Vladimir wrote: > > Daniel, I understand that's a wrong idea to mix files of different > nature in one directory. I only showed that one and the same simple > (?) configuration: index.html plus image file does works when I call > index.html directly a

Re: images in a template

2011-03-19 Thread Vladimir
Daniel, I understand that's a wrong idea to mix files of different nature in one directory. I only showed that one and the same simple (?) configuration: index.html plus image file does works when I call index.html directly and doesn't work when I call it in Django style. Of cource, this is a resul

Re: images in a template

2011-03-19 Thread Vladimir
1. I have read this article before. I think this instruction teaches us how we can access files in this directory. My problem differs: I can't include this files into index.html. 2. I don't understand why shall I create STATIC_DOC_ROOT, MEDIA_ROOT is already exists. 3. I failed following this artic

Re: images in a template

2011-03-19 Thread Daniel Roseman
On Saturday, March 19, 2011 9:44:41 AM UTC, Vladimir wrote: > > It does not work. If I call index.html which contains > #title h1{ background-image: url(galion.gif); background-position: > left top; background-repeat: no-repeat; } > directly in web browser then image is displayed. > If I ca

Re: images in a template

2011-03-19 Thread Mike Ramirez
On Saturday, March 19, 2011 02:44:41 am Vladimir wrote: > It does not work. If I call index.html which contains > #title h1{ background-image: url(galion.gif); background-position: > left top; background-repeat: no-repeat; } > directly in web browser then image is displayed. > If I call it: > h

Re: images in a template

2011-03-19 Thread Vladimir
It does not work. If I call index.html which contains #title h1{ background-image: url(galion.gif); background-position: left top; background-repeat: no-repeat; } directly in web browser then image is displayed. If I call it: http://localhost:8000/index/ then image is not displayed. Note, for s

Re: images in a template

2011-03-18 Thread Mike Ramirez
On Friday, March 18, 2011 11:12:52 pm Vladimir wrote: > Thank You very much! > I found one more mistake, I need to replace in views.py: > from django.template import loader, Context > with > from django.template import RequestContext > > Now there is no syntax mistake but there is no image. How ma

Re: images in a template

2011-03-18 Thread Vladimir
Thank You very much! I found one more mistake, I need to replace in views.py: from django.template import loader, Context with from django.template import RequestContext Now there is no syntax mistake but there is no image. How many other mistakes I have done? -- You received this message becaus

Re: images in a template

2011-03-18 Thread Mike Ramirez
On Friday, March 18, 2011 10:39:18 pm Vladimir wrote: > return > render_to_response('index.html',,context_instance=RequestContext(request)) > > Such version lead to an error message: SyntaxError at/index/ , invalid > syntax (views.py, line 5) > What are my mistakes please? xtra comma in rend

Re: images

2011-02-15 Thread webzy
Hi, Here is a How-to on this: http://docs.djangoproject.com/en/1.2/howto/static-files/ On Feb 15, 12:00 pm, "Szabo, Patrick \(LNG-VIE\)" wrote: > Hi, > > I just want an image to be shown in my header so i just added it in my > template like this: > > > > Unfortunately i only get the "alt text"

Re: images

2011-02-15 Thread Piotr Zalewa
Learn how to serve static files For the Django 1.3+ http://docs.djangoproject.com/en/dev/howto/static-files/ For Django 1.2 http://docs.djangoproject.com/en/1.2/howto/static-files/ Good luck zalun On 02/15/11 10:00, Szabo, Patrick (LNG-VIE) wrote: > Hi, > > I just want an image to be shown in m

Re: images

2011-02-15 Thread Ian McDowall
; > > Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] > > Im Auftrag von Kenneth Gonsalves > > Gesendet: Dienstag, 15. Februar 2011 11:05 > > An: django-users@googlegroups.com > > Betreff: Re: images > > > On Tue, 2011-02-15 at 11:00

Re: images

2011-02-15 Thread Praveen Krishna R
573 > Fax: +43 (1) 534 52 - 146 > > > -Ursprüngliche Nachricht- > > Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] > Im Auftrag von Kenneth Gonsalves > Gesendet: Dienstag, 15. Februar 2011 11:05 > An: django-users@googlegroups.com > Betreff: R

Re: images

2011-02-15 Thread Kenneth Gonsalves
On Tue, 2011-02-15 at 11:00 +0100, Szabo, Patrick (LNG-VIE) wrote: > Unfortunately i only get the "alt text" shown and not the image. > The image is in the same directory as the template. check your logs to see where it is searching for your image -- regards KG http://lawgon.livejournal.com Coi

Re: Images, videos and thumbnails.

2010-02-12 Thread thanos
I would take a different tack. Store my videos is a service such as Vimeo and then link to their generated thumbnails. I'm doing that using django-picasa (http://pypi.python.org/pypi/django- picasa/1.2). The code might give you an idea now how do it. I'd also serve up my videos from them and save m

Re: Images, videos and thumbnails.

2010-02-12 Thread esatterwh...@wi.rr.com
Well I can answer the last bit of your question at least. There are 2 basic field types Form Field & Model Field. Form fields are used in form classes where as Model Fields are used in Models. Model fields handle the normalization of python objects to data suitable for storage in your database an

Re: images in admin/change_list.html

2010-02-09 Thread bruno desthuilliers
On Feb 9, 5:37 am, django_jedi wrote: > I feel like I'm missing something obvious.  Another set of eyes would > be greatly appreciated. > > I'm trying to add an image to the change_list form in the admin. > Doesn't seem to work. I guess Adnan pointed you to the right direction. Now as a general

Re: images in admin/change_list.html

2010-02-09 Thread Adnan Sadzak
Shoul'd be here two variables to pass as You defined two %s and pass only one ? I'm newbie, maybe I'm wrong :) def image_img(self): if self.image: return u'' % self.image.url_125x125 else: On Tue, Feb 9, 2010 at 5:37 AM, django_jedi wrote: >

Re: Images not uploading in the admin tool

2009-06-17 Thread mmarshall
Well, here's what I know: I had this issue several months back and 'solved' it by disabling the in memory upload handler. I wrote a little about it at the bottom of this thread: https://forums.mediatemple.net/viewtopic.php?id=2514 But it looks like in Django 1.1beta the TemporaryFileUploadHand

Re: Images not uploading in the admin tool

2009-06-17 Thread Sean Brant
Nope, there customer support takes to long so I just gave up. Please post if you have any updates. Last I remember it might be a NFS issue on there end. Not really sure. On Jun 17, 2009, at 9:43 AM, mmarshall wrote: > > On Jun 9, 9:19 am, Sean Brant wrote: >> "Did MediaTemple change some

Re: Images not uploading in the admin tool

2009-06-17 Thread mmarshall
On Jun 9, 9:19 am, Sean Brant wrote: > "Did MediaTemple change something about the file system you have > access to?  It sounds like they must have changed something so that > the file locking code that used to work for your setup is no longer > working." > > That is what it sounds like to me, ho

Re: Images not uploading in the admin tool

2009-06-09 Thread Sean Brant
"Did MediaTemple change something about the file system you have access to? It sounds like they must have changed something so that the file locking code that used to work for your setup is no longer working." That is what it sounds like to me, however they we're not much help. I'll reach back o

Re: Images not uploading in the admin tool

2009-06-09 Thread Karen Tracey
On Tue, Jun 9, 2009 at 9:49 AM, Sean Brant wrote: > > I am running on a MediaTemple Django container with the SVN version of > Django. When I try and upload a image in the admin tool I get a proxy > error. The following is the part of the traceback that gets emailed to > me. > > Traceback (most r

Re: images do not upload

2009-06-01 Thread Mike Ramirez
On Monday 01 June 2009 08:53:26 pm Bobby Roberts wrote: > Does anyone have an example of how to upload an image. I've followed > the docs and it's just not working (ie no file is uploaded and the > filename is not saved to the db. > I had a similar problem, though it did save the path to the db.

Re: images do not upload

2009-06-01 Thread Bobby Roberts
Does anyone have an example of how to upload an image. I've followed the docs and it's just not working (ie no file is uploaded and the filename is not saved to the db. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: images do not upload

2009-06-01 Thread Bobby Roberts
just checking if anyone has an update on this. I've added request.FILES to my view to accept the file from the form but nothing is working and it's not even saving the file name in the db at this time. --~--~-~--~~~---~--~~ You received this message because you a

Re: images on development server versus production server

2009-05-11 Thread Michael
On Mon, May 11, 2009 at 3:36 PM, Frutoso wrote: > > So let me get this straight. > > in development enviroment: In order to get images to be displayed in a > template there is a work around that needs to be down? > > in production enviroment: There is not a work around? simply create an > ta

Re: Images dose not upload , unless it the admin !

2009-04-01 Thread Hamza
got it fixed it mins ago , Thanks Alex , ( I need to slp 38 hours so far ) On Apr 2, 7:49 am, Alex Gaynor wrote: > On Thu, Apr 2, 2009 at 1:38 AM, Hamza wrote: > > > Hello > > > am having a problem in uploading images , which i set ImageField to > > upload the image to /Photo/ directory

Re: Images dose not upload , unless it the admin !

2009-04-01 Thread Alex Gaynor
On Thu, Apr 2, 2009 at 1:38 AM, Hamza wrote: > > Hello > > am having a problem in uploading images , which i set ImageField to > upload the image to /Photo/ directory , however it works , and > uploaded the photos as expected , but now its not working : and > display a message : > This field is r

Re: Images in MySQL

2008-07-14 Thread lukeqsee
Thanks Oliver, hadn't researched that yet I have decided to use lighttpd to serve up the images now, looks to be much more reliable. On Jul 14, 11:48 am, Oliver Andrich <[EMAIL PROTECTED]> wrote: > Hi Luke, > > I have tried this in an asset management system I am currently   > implementing for my

Re: Images in MySQL

2008-07-14 Thread Oliver Andrich
Hi Luke, I have tried this in an asset management system I am currently implementing for my company, which is ment to store a lots of images (round about 300.000+). Generally it is a very bad idea, at least this is what I have found. I ignored this article http://mysqldump.azundris.com/arc

Re: Images in MySQL

2008-07-14 Thread Marty Alchin
On Mon, Jul 14, 2008 at 11:02 AM, Rudolph <[EMAIL PROTECTED]> wrote: > Ticket 5361 provides a way to accomplish this by writing a custom > backend: > http://code.djangoproject.com/ticket/5361 > > The ticket is on the "maybe" list for 1.0! I was afraid someone would bring up that ticket on this th

Re: Images in MySQL

2008-07-14 Thread Rudolph
Ticket 5361 provides a way to accomplish this by writing a custom backend: http://code.djangoproject.com/ticket/5361 The ticket is on the "maybe" list for 1.0! Rudolph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Images in MySQL

2008-07-14 Thread Marty Alchin
On Mon, Jul 14, 2008 at 10:41 AM, lukeqsee <[EMAIL PROTECTED]> wrote: > I know you can store images in a BLOB field in mysql, but is it > possible with Django models? Not out of the box, but you're free to create your own custom field[1] to do that for you. If you look hard enough, you can probab

Re: images in templates?

2008-06-01 Thread Daniel Roseman
On Jun 1, 9:51 pm, lindec <[EMAIL PROTECTED]> wrote: > Thanks!! I had the same problem adding external CSS and Javascript > files as well. This seems like an absurd problem to have, given that > its obvious that developers would want to add CSS/JS files to their > templates. I wonder why the devel

Re: images in templates?

2008-06-01 Thread lindec
Thanks!! I had the same problem adding external CSS and Javascript files as well. This seems like an absurd problem to have, given that its obvious that developers would want to add CSS/JS files to their templates. I wonder why the developers have not addressed this? On Jun 1, 4:14 am, Jarred Bis

Re: images in templates?

2008-06-01 Thread Jarred Bishop
Hi, the problem is (like you mentioned) django has no reference to where your images are. A way i got around this was, adding a line to my urls.py that contained a 'static' folder. for example: (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': 'C:/path-to-project/templates/stat

Re: Images

2008-04-16 Thread [EMAIL PROTECTED]
I managed to get this working properly. Thanks for all the help. On Apr 16, 3:00 am, "Rishabh Manocha" <[EMAIL PROTECTED]> wrote: > Did you take a look > athttp://www.djangoproject.com/documentation/static_files/#how-to-do-it. > If you are using the dev server, this is the way to do it. > > Henc

Re: Images and Stylesheets

2008-04-16 Thread Reisswolf
>> The only relevant thing to note based on your earlier post would be that '/media/' is by default used by the ADMIN_MEDIA_PREFIX setting. Perhaps the 'media' URL is experiencing some stompage... << Hi Doug, For pointing out the above pitfall, I would personally like to pay for your plane ticke

Re: Images

2008-04-16 Thread Rishabh Manocha
Did you take a look at http://www.djangoproject.com/documentation/static_files/#how-to-do-it. If you are using the dev server, this is the way to do it. Hence, you should not be using anything like (http://127.0.0.1:8000/detail/...) in your view. R On Wed, Apr 16, 2008 at 4:37 AM, [EMAIL PROTEC

Re: Images

2008-04-15 Thread [EMAIL PROTECTED]
I will post my code up here, it is just a small classroom project that we are working on so I am not super concerned about reliability or speed. http://dpaste.com/45051/ Hopefully it is just something that I am missing or am being a complete noobstick about. Thanks for all of your help it is most

Re: Images and Stylesheets

2008-04-15 Thread Doug Van Horn
Your previous description sounds pretty close. Check your URLs in your HTML (mentioned by Karen Tracey in this thread). As a quick reference, here are the relevant entries in my settings.py: import os ROOT_DIR = os.path.normpath(os.path.dirname(__file__)) MEDIA_ROOT = os.path.join(ROOT_DIR, 'me

Re: Images

2008-04-15 Thread Erik Vorhes
In production environments, you need to use something like Apache or Lighttpd (sp?) to serve media--it's not something you should be doing directly through Django. Check the URL for your image and compare it to MEDIA_URL in your settings.py file (plus anything you're adding through upload_to='som

Re: Images

2008-04-15 Thread [EMAIL PROTECTED]
The error I get is the white box with the red X which means it can't find the image. On Apr 15, 1:39 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Apr 15, 12:06 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > I have searched high and low to make it possible for me to display an > > i

Re: Images

2008-04-15 Thread Michael Wieher
in views: get the username set a variable named media-root to be an absolute url, not relative (where static media lives, not django-processed stuff) send username to a function that returns a list of image-paths relative to the media-root concatenate the media-root variable to this list of paths

Re: Images

2008-04-15 Thread Rajesh Dhawan
On Apr 15, 12:06 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have searched high and low to make it possible for me to display an > image via Django in an html template and it fail bombs so hard. Can you put that in developer-friendly terms? :) - What error do you get? Is here an error

Re: Images and Stylesheets

2008-04-15 Thread Duke
This is strange its work for me U config the URL as i suggested and referce the image as below in the tab This should definitly work it even work for javascript. Thank Duke --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Images and Stylesheets

2008-04-15 Thread Karen Tracey
On Tue, Apr 15, 2008 at 6:34 AM, Reisswolf <[EMAIL PROTECTED]> wrote: > > I have followed Doug Van Horn's detailed explanation very closely. I > have also read the Django documentation page on this particular > topic. But for some reason, I still cannot get the thing to work. > > Here is my situ

Re: Images and Stylesheets

2008-04-15 Thread Reisswolf
Hi, Sorry to bother everyone again, but the suggestion above is not working either. Actually, I fail to see why the ROOT_PATH suggestion would work when hard-coding the path document_root is not working. But that could just as well be due to my ignorance. I have tried the ROOT_PATH suggestion.

Re: Images and Stylesheets

2008-04-15 Thread Duke
change the URL config as from django.conf.urls.defaults import * import os ROOT_PATH = os.path.dirname(__file__) urlpatterns = patterns('', # Example: (r'^hellodojo/', 'hello.views.hellodojo'), (r'^site_media/(?P.*)$', 'django.views.static.serve', {'document_ro

Re: Images and Stylesheets

2008-04-15 Thread Reisswolf
I have followed Doug Van Horn's detailed explanation very closely. I have also read the Django documentation page on this particular topic. But for some reason, I still cannot get the thing to work. Here is my situation: In my /Programming/Python/Django directory I have created a project calle

Re: Images and Stylesheets

2008-04-12 Thread greg
Thanks to everyone for the replies. Static content now makes sense to me, and I have things up and working. --greg --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

Re: Images and Stylesheets

2008-04-12 Thread andy baxter
Greg Lindstrom wrote: > Hello Everyone- > > I started learning Django at PyCon in Chicago and have worked most of > the way through the "Django Book" and Sams "Teach Yourself Django", as > well as "Head First HTML with CSS and XHTML". It's been quite a lot > for this old dog, but I'd like to t

Re: Images and Stylesheets

2008-04-11 Thread Doug Van Horn
Here's my rewording of your question: "How do I serve static content?" Websites need to serve up your HTML, CSS, JavaScript, and images. In Django, your views are serving up your HTML. What you need to do is serve up the rest of that stuff. The first way to serve static content, when you are

Re: Images and Stylesheets

2008-04-11 Thread Tim Chase
> I started learning Django at PyCon in Chicago and have worked > most of the way through the "Django Book" and Sams "Teach > Yourself Django", as well as "Head First HTML with CSS and > XHTML". It's been quite a lot for this old dog, but I'd like > to take a crack a writing my own web site u

Re: Images and Stylesheets

2008-04-11 Thread Justin Lilly
You're problems are one and the same. It seems you're runserver isn't configured to serve images. The bit of code you're looking for is: if settings.DEBUG: urlpatterns += patterns('', (r'^site_media/(?P.*)$', 'django.views.static.serve', {'document_root': '/path/to/media'}), ) wh

Re: Images Won't Include

2007-01-28 Thread Perica Zivkovic
Check this out: http://www.djangoproject.com/documentation/static_files/ or simply do: In apache config (under the Location where you set up Django), put SetHandler None and you are done :) On 1/29/07, James Bennett <[EMAIL PROTECTED]> wrote: > > On 1/28/07, NathanWithAnN <[EMAIL PROTECTED

Re: Images Won't Include

2007-01-28 Thread James Bennett
On 1/28/07, NathanWithAnN <[EMAIL PROTECTED]> wrote: > When I try to include an image like I would in any other website, the > image does not display. How do I configure the urls to treat an > image > like an image so they can be displayed? If you're using Apache and mod_python, then for perfo

Re: images path[please adrian help]

2006-01-18 Thread Kenneth Gonsalves
On Thursday 19 Jan 2006 9:35 am, Kenneth Gonsalves wrote: > On Thursday 19 Jan 2006 3:35 am, [EMAIL PROTECTED] wrote: > > 1- I write this in my page.py:  full_image = > > meta.ImageField(upload_to ="/media/images/", null = True, blank > > = True ) > > upload_to = "media/images/" oops - upload_to

Re: images path[please adrian help]

2006-01-18 Thread Kenneth Gonsalves
On Thursday 19 Jan 2006 3:35 am, [EMAIL PROTECTED] wrote: > 1- I write this in my page.py:  full_image = > meta.ImageField(upload_to ="/media/images/", null = True, blank = > True ) upload_to = "media/images/" -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in

Re: images path[please adrian help]

2006-01-18 Thread Joseph Kocherhans
On 1/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Dear ALL > I still have a problem with the picture feild here what i have done > 1- I write this in my page.py: full_image = meta.ImageField(upload_to > ="/media/images/", null = True, blank = True ) > 2-i opened the admin page and load

Re: Images. Stylesheets. Javascripts. Where do I put 'em.

2006-01-04 Thread limodou
2006/1/4, iGL <[EMAIL PROTECTED]>: > > on windows, MEDIA_URL and MEDIA_ROOT, did not quit help; I haven't > understood why... MEDIA_URL is used for file or image upload. > > all I did then was to put: > > in urls something like > r'^m/(?P.*)$', 'media', {'document_root': > 'D:\\django\\testapp\\m

Re: Images. Stylesheets. Javascripts. Where do I put 'em.

2006-01-04 Thread iGL
on windows, MEDIA_URL and MEDIA_ROOT, did not quit help; I haven't understood why... all I did then was to put: in urls something like r'^m/(?P.*)$', 'media', {'document_root': 'D:\\django\\testapp\\media\\'}), and in views from django.views.static import serve media = serve and in the base

Re: Images. Stylesheets. Javascripts. Where do I put 'em.

2005-12-31 Thread wiz
On Птн, 2005-12-30 at 20:42 +, scum wrote: > I cannot figure out the `official` place to put images, stylesheets, > and javascripts and the process to access them. Can someone explain > their method of doing this. I'm just root-linking all that stuff to '/media/css/base.css'(js, img, etc.) an

Re: Images. Stylesheets. Javascripts. Where do I put 'em.

2005-12-30 Thread James Bennett
On 12/30/05, scum <[EMAIL PROTECTED]> wrote: > I cannot figure out the `official` place to put images, stylesheets, > and javascripts and the process to access them. Can someone explain > their method of doing this. Except for the location you define with MEDIA_URL and MEDIA_ROOT, there is no "o

Re: Images. Stylesheets. Javascripts. Where do I put 'em.

2005-12-30 Thread Maniac
scum wrote: I cannot figure out the `official` place to put images, stylesheets, and javascripts and the process to access them. Can someone explain their method of doing this. As far as I know there is no 'official' place. But I think the good idea is to store CSS and JS with your project