import autocomplete_light

from cities_light.contrib.autocomplete_light_restframework import RemoteCountryChannel, RemoteCityChannel
from cities_light.models import City, Country

class RemoteCountryChannel(RemoteCountryChannel):
    source_url = 'http://localhost:8000/cities_light/country/'

class RemoteCityChannel(RemoteCityChannel):
    source_url = 'http://localhost:8000/cities_light/city/'

autocomplete_light.register(Country, RemoteCountryChannel)
autocomplete_light.register(City, RemoteCityChannel)

import autocomplete_light

from cities_light.contrib.autocomplete_light_restframework import RemoteCountryChannel, RemoteCityChannel
from cities_light.models import City, Country

autocomplete_light.register(Country, RemoteCountryChannel,
    source_url = 'http://localhost:8000/cities_light/country/')
autocomplete_light.register(City, RemoteCityChannel,
    source_url = 'http://localhost:8000/cities_light/city/')

Update example to match current register signature, avoids subclassing
Update example to match current register signature, avoids subclassing

  import autocomplete_light
  
  from cities_light.contrib.autocomplete_light_restframework import RemoteCountryChannel, RemoteCityChannel
  from cities_light.models import City, Country
  
- class RemoteCountryChannel(RemoteCountryChannel):
+ autocomplete_light.register(Country, RemoteCountryChannel,
-     source_url = 'http://localhost:8000/cities_light/country/'
+     source_url = 'http://localhost:8000/cities_light/country/')
+ autocomplete_light.register(City, RemoteCityChannel,
+     source_url = 'http://localhost:8000/cities_light/city/')
  
- class RemoteCityChannel(RemoteCityChannel):
-     source_url = 'http://localhost:8000/cities_light/city/'
- 
- autocomplete_light.register(Country, RemoteCountryChannel)
- autocomplete_light.register(City, RemoteCityChannel)
- 
Update example to match current register signature, avoids subclassing
## Code Before:
import autocomplete_light

from cities_light.contrib.autocomplete_light_restframework import RemoteCountryChannel, RemoteCityChannel
from cities_light.models import City, Country

class RemoteCountryChannel(RemoteCountryChannel):
    source_url = 'http://localhost:8000/cities_light/country/'

class RemoteCityChannel(RemoteCityChannel):
    source_url = 'http://localhost:8000/cities_light/city/'

autocomplete_light.register(Country, RemoteCountryChannel)
autocomplete_light.register(City, RemoteCityChannel)

## Instruction:
Update example to match current register signature, avoids subclassing
## Code After:
import autocomplete_light

from cities_light.contrib.autocomplete_light_restframework import RemoteCountryChannel, RemoteCityChannel
from cities_light.models import City, Country

autocomplete_light.register(Country, RemoteCountryChannel,
    source_url = 'http://localhost:8000/cities_light/country/')
autocomplete_light.register(City, RemoteCityChannel,
    source_url = 'http://localhost:8000/cities_light/city/')
