Git Product home page Git Product logo

Comments (16)

dustinfarris avatar dustinfarris commented on July 4, 2024

@dbinetti the API_NAMESPACE setting is on master (hasn't been released yet). Hoping to release 0.3.0 today.

from ember-django-adapter.

dustinfarris avatar dustinfarris commented on July 4, 2024

@dbinetti check out the changelog: https://github.com/dustinfarris/ember-django-adapter/blob/master/CHANGELOG.md

from ember-django-adapter.

dbinetti avatar dbinetti commented on July 4, 2024

super β€” thanks

On Sat, Jul 26, 2014 at 9:25 AM, Dustin Farris [email protected]
wrote:

@dbinetti check out the changelog: https://github.com/dustinfarris/ember-django-adapter/blob/master/CHANGELOG.md

Reply to this email directly or view it on GitHub:
#4 (comment)

from ember-django-adapter.

briarsweetbriar avatar briarsweetbriar commented on July 4, 2024

I'm still experiencing this issue with 0.4.0. Ember CLI is at 0.1.1. Any idea what might be happening?

from ember-django-adapter.

dustinfarris avatar dustinfarris commented on July 4, 2024

Looking into it. May need to update the way addon config is set.

from ember-django-adapter.

jsalva avatar jsalva commented on July 4, 2024

I'm having the same issue using 0.5.1 from ember-cli; I noticed the docs example uses NAMESPACE rather than API_NAMESPACE. However, neither of these are changing adapter urls from root.

I'm using CLI 0.1.7

from ember-django-adapter.

dustinfarris avatar dustinfarris commented on July 4, 2024

@jsalva I've been having a lot of issues with ember-cli 0.1.7. I actually downgraded to 0.1.5.

It looks like 0.1.8 and 0.1.9 were released today. Let's try that out and see if it resolves anything.

from ember-django-adapter.

jsalva avatar jsalva commented on July 4, 2024

sadly, upgrading to 0.1.9 didn't help.
It's not terribly difficult for me to set that stuff in an application adapter, but it'd be nice to be able to configure that in the environment.js too since it's what the docs recommend

from ember-django-adapter.

dustinfarris avatar dustinfarris commented on July 4, 2024

@jsalva it should work in the config definitely. It has been working for me, but something must have changed in ember-cli after 0.1.5. Something is wrongβ€”thanks for bringing it up. I will open a new issue to fix this.

from ember-django-adapter.

dustinfarris avatar dustinfarris commented on July 4, 2024

@jsalva I cannot reproduce this. I just upgraded to 0.1.9 and everything is working.

Are you configuring the adapter in environment.js like this:

module.exports = function(environment) {
  var ENV = {
    APP: {
      API_NAMESPACE: 'my-api'
    }
  };

  ...

  return ENV;
};

from ember-django-adapter.

jsalva avatar jsalva commented on July 4, 2024

Yep here it is:

//config/environment.js
module.exports = function(environment) {
  var ENV = {
    modulePrefix: 'myapp',
    environment: environment,
    baseURL: '/',
    locationType: 'auto',
    EmberENV: {
      FEATURES: {
        // Here you can enable experimental features on an ember canary build
        // e.g. 'with-controller': true
      }
    },

    APP: {
      // Here you can pass flags/options to your application instance
      // when it is created
      API_NAMESPACE: 'myapp/api1'
    },


  };
  if (environment === 'development') {
    // ENV.APP.LOG_RESOLVER = true;
    // ENV.APP.LOG_ACTIVE_GENERATION = true;
    ENV.APP.LOG_TRANSITIONS = true;
    // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
    // ENV.APP.LOG_VIEW_LOOKUPS = true;

  }

  if (environment === 'test') {
    // Testem prefers this...
    ENV.baseURL = '/';
    ENV.locationType = 'none';

    // keep test console output quieter
    ENV.APP.LOG_ACTIVE_GENERATION = false;
    ENV.APP.LOG_VIEW_LOOKUPS = false;

    ENV.APP.rootElement = '#ember-testing';

  }

  if (environment === 'production') {
    // set this to your production API
  }

  return ENV;
};

from ember-django-adapter.

dustinfarris avatar dustinfarris commented on July 4, 2024

@jsalva Do you have anything in app/adapters/?

from ember-django-adapter.

jsalva avatar jsalva commented on July 4, 2024

at first, no (assumed the setting would configure an application adapter w/ my API_NAMESPACE for me. Eventually I just used ember cli to generate app/adapters/application.js and put the desired namespace explicitly in there.

from ember-django-adapter.

dustinfarris avatar dustinfarris commented on July 4, 2024

I really am having trouble reproducing. Have started a brand new project with ember new and the fiddled with the API_NAMESPACE setting and everything works as expected. Can you throw up a quick sample project on GitHub to demonstrate that I can clone and try?

from ember-django-adapter.

dustinfarris avatar dustinfarris commented on July 4, 2024

@jsalva nevermind. I have been able to confirm this.

from ember-django-adapter.

dustinfarris avatar dustinfarris commented on July 4, 2024

@jsalva we aren't setting a default API_HOST which I believe is the main issue here. Your namespace is indeed being respected, but it doesn't matter because it was pointed at the ember server.

from ember-django-adapter.

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.