Giter Club home page Giter Club logo

Comments (17)

jirikuncar avatar jirikuncar commented on July 20, 2024

@brunlid can you provide a bit more information about your Flask application? Do you have any caching in place?

from flask-sitemap.

brunlid avatar brunlid commented on July 20, 2024

Hi,

It's still such a small site so we don't use any caching.

from flask-sitemap.

jirikuncar avatar jirikuncar commented on July 20, 2024

@brunlid do you get the error when you run your Flask app directly python manage.py runserver (Flask-Script) or python app.py (in case your app is similar to http://flask.pocoo.org/docs/0.10/quickstart/#a-minimal-application)? Can you also verify that url_for('yourendpoint', _external=True) generates correct url?

from flask-sitemap.

brunlid avatar brunlid commented on July 20, 2024

I get it when running python app.py (as in the mini app example). Will chech url_for on the server shortly. Generates correct url when running locally.

from flask-sitemap.

jirikuncar avatar jirikuncar commented on July 20, 2024

@brunlid can you provide running code snippet that is generating the error?

from flask-sitemap.

brunlid avatar brunlid commented on July 20, 2024

Are you referring to my views? In that case:

@app.route('/')
@app.route('/index', methods=['GET', 'POST'])
def index():
    return render_template('index.html',
                           title='Foxberry')


@ext.register_generator
def index():
    yield 'index', {}

from flask-sitemap.

jirikuncar avatar jirikuncar commented on July 20, 2024

@brunlid it should be correct. Can you try to debug the output of list(ext._generate_all_urls())?

Alternatively you can also try to set SITEMAP_INCLUDE_RULES_WITHOUT_PARAMS to True for url rules without view arguments.

from flask-sitemap.

brunlid avatar brunlid commented on July 20, 2024

Running locally all looks correct:

list(ext._generate_all_urls()) generates correct, i.e. localhost/index

SITEMAP_INCLUDE_RULES_WITHOUT_PARAMS = True also generates correct site map locally

problem is when running on server localhost remains. Is there a global setting like SITEMAP_BASE_URL that could be used to override?

Thx again

from flask-sitemap.

jirikuncar avatar jirikuncar commented on July 20, 2024

@brunlid have you managed to solve this issue? Can you please provide snippets of your server configuration?

I'm closing it for now as can't reproduce. Feel free to re-open with additional details. Thanks

from flask-sitemap.

kennethreitz avatar kennethreitz commented on July 20, 2024

I'm having the same issue.

from flask-sitemap.

jirikuncar avatar jirikuncar commented on July 20, 2024

@kennethreitz can you please give me more details?

  1. Python version
  2. pip freeze output
  3. Minimal code that can trigger the error.

I would like to help, but I can't reproduce it.

from flask-sitemap.

jirikuncar avatar jirikuncar commented on July 20, 2024

Did you enable caching?

from flask-sitemap.

jirikuncar avatar jirikuncar commented on July 20, 2024

Can you reproduce the error with #36?

from flask-sitemap.

mbtronics avatar mbtronics commented on July 20, 2024

I also have this issue.
I'm running nginx + uwsgi to server the flask app.
All URLs are localhost. This is a fully functional, large web application with a lot of different flask extensions. Never had any problem like this.

from flask-sitemap.

jirikuncar avatar jirikuncar commented on July 20, 2024

@mbtronics can you check if you still have the issue when you apply #36?

from flask-sitemap.

jirikuncar avatar jirikuncar commented on July 20, 2024

Hopefully it has been fixed in #36. Please re-open if you are still having the issue. Please paste the output of pip freeze.

from flask-sitemap.

Related Issues (20)

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.