Closed hagst closed 11 years ago
The default template "spotnet/viewpost.html" should contain the image if it's available. Is it missing for all posts or posts that have an image using other spotnet clients?
There are two ways of adding an image when adding a spot.
1- Input a link to the image. This is currently working in Django-spotnet.
Spot with image (http link):
message-ID: IxU96MSJskfxnH9FYLQuO@spot.net
Date: 16 Nov 2012 16:01:37 GMT
Image: <Image>http://www.xx/xx/xx.jpg</Image>
Used by older spotclients and newer clients who didn't changed this specific option.
2- uploading the image to usenet. This is currently not working in Django-spotnet.
Spot without image (segment):
message-ID: y0SMyNT3XF4pfO3UAADBz@spot.net
Date: 29 Nov 2012 23:47:18 GMT
Image: <Image Width='600' Height='425'><Segment>q2k2s2CVPhkAfS3UAAMB4@spot.net</Segment></Image>
Used by newer spotclients.
I wasn't aware of that second method, it should definitely be included!
This second method is now supported with the latest commit (bitbucket 89f8802ebb55cc0e1cab0931ffb5fc5701e08e56). It does require renaming the spotnet_post.image
column to image_url
and adding a image_segments
column (see manage.py sqlall spotnet
), and re-updating your database to get the correct image for already stored posts.
Btw, you can now overwrite existing posts when updating using the --overwrite / -w flag.
Thanks for adding and the information about changing the database.
Thought that manage.py syncdb
would update the settings of the database.
I have used manage.py sqlall spotnet
to list the database layout and manual changed the mysql database.
Spots with image retrieved from usenet are working. The -w switch works.
Is this possible? I am using Blue-django-spotnet-2f992c6dee29 from 2012-08-23 with the example_project, XP sp3, sqlite3, Django 1.4.2 and Python 2.7.3. The spots are listed and can be opened.