Coder Social home page Coder Social logo

django-sitemap-generate's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

django-sitemap-generate's Issues

KeyError: 'wsgi.url_scheme'

While trying to generate sitemap an error has occurred

>>>generator = SitemapGenerator(sitemaps=sitemaps)
>>>generator.generate()


  File "/usr/local/lib/python3.8/site-packages/sitemap_generate/generator.py", line 110, in generate
    index_content = self.fetch_content(url)
  File "/usr/local/lib/python3.8/site-packages/sitemap_generate/generator.py", line 96, in fetch_content
    return self.recorder.record(url)
  File "/usr/local/lib/python3.8/site-packages/sitemap_generate/generator.py", line 59, in record
    content = b''.join(self.wsgi(environ, self._start_response))
  File "/usr/local/lib/python3.8/site-packages/raven/middleware.py", line 98, in __call__
    self.client.http_context(self.get_http_context(environ))
  File "/usr/local/lib/python3.8/site-packages/raven/middleware.py", line 106, in get_http_context
    'url': get_current_url(environ, strip_querystring=True),
  File "/usr/local/lib/python3.8/site-packages/raven/utils/wsgi.py", line 81, in get_current_url
    tmp = [environ['wsgi.url_scheme'], '://', get_host(environ)]
KeyError: 'wsgi.url_scheme'

Impossible to use a custom storage

type: bug
version: 0.4.0
description:

  1. SitemapGenerator init method accepts storage: Optional[Storage] instance but further in the code instead of using this instance, it tries to import it. Which is OK if you want to use defaults.SITEMAP_STORAGE but doesn't work when you pass custom storage objects. It was working on version 0.2.1.
storage = storage or defaults.SITEMAP_STORAGE
self.storage = import_string(storage)
  1. If I try to use
    SITEMAP_STORAGE = 'testproject.testapp.storage.SitemapStorage'
    I will get

exists() missing 1 required positional argument: 'name'

because the storage is never initialized

Initial Update

The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.

How to serve files from S3 storage backend

Hi ๐Ÿ‘‹,

I just installed the sitemap generator and works fine it generates the sitemaps and saves it to my storage backend. In my case that is amazon s3. But when i load the sitemap it is still served using the database. I know that because it is more up to date then the sitemap stored on s3.

In the readme there is a nginx config example but that does not apply when using 3s or any other storage backend.

Is there a easy way to get it to serve the sitemaps from s3?

Add multisites / multiples domains support

The project is limited to one site host given by environment variable SITEMAP_HOST.
In accord with sites framework, it allows to have many domains. It would be awesome to create a sitemap index by domain saved in sites model instead of redefine environment variable for each one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.