1. 22 Ara, 2013 5 kayıt (commit)
    • Aymeric Augustin's avatar
      Implemented two-stage app-cache population. · 2b56d691
      Aymeric Augustin yazdı
      First stage imports app modules. It doesn't catch import errors. This
      matches the previous behavior and keeps the code simple.
      
      Second stage import models modules. It catches import errors and retries
      them after walking through the entire list once. This matches the
      previous behavior and seems useful.
      
      populate_models() is intended to be equivalent to populate(). It isn't
      wired yet. That is coming in the next commit.
      2b56d691
    • Aymeric Augustin's avatar
      Removed the app_config.installed flag. · 9b3389b7
      Aymeric Augustin yazdı
      Since applications that aren't installed no longer have an application
      configuration, it is now always True in practice.
      
      Provided an abstraction to temporarily add or remove applications as
      several tests messed with app_config.installed to achieve this effect.
      For now this API is _-prefixed because it looks dangerous.
      9b3389b7
    • Aymeric Augustin's avatar
      Removed the only_installed argument of get_app_config[s]. · 972babc3
      Aymeric Augustin yazdı
      It wasn't used anywhere and couldn't be implemented any more since
      non-installed apps no longer have a configuration.
      972babc3
    • Aymeric Augustin's avatar
      Refactored registration of models. · 742ed987
      Aymeric Augustin yazdı
      Got rid of AppConfig._stub. As a side effect, app_cache.app_configs now
      only contains entries for applications that are in INSTALLED_APPS, which
      is a good thing and will allow dramatic simplifications (which I will
      perform in the next commit). That required adjusting all methods that
      iterate on app_configs without checking the "installed" flag, hence the
      large changes in get_model[s].
      
      Introduced AppCache.all_models to store models:
      - while the app cache is being populated and a suitable app config
        object to register models isn't available yet;
      - for applications that aren't in INSTALLED_APPS since they don't have
        an app config any longer.
      
      Replaced get_model(seed_cache=False) by registered_model() which can be
      kept simple and safe to call at any time, and removed the seed_cache
      argument to get_model[s]. There's no replacement for that private API.
      
      Allowed non-master app caches to go through populate() as it is now
      safe to do so. They were introduced in 1.7 so backwards compatibility
      isn't a concern as long as the migrations framework keeps working.
      742ed987
    • Aymeric Augustin's avatar
      73c9e65b
  2. 21 Ara, 2013 1 kayıt (commit)
  3. 20 Ara, 2013 4 kayıt (commit)
  4. 18 Ara, 2013 9 kayıt (commit)
  5. 17 Ara, 2013 21 kayıt (commit)