Comments (7)
Maybe Affiliation would be a better name for it. That is what Wookiepedia calls it.
from swapi.
Might be good to put affiliations in an array to accommodate for those who have defected/changed affiliation at some point and would need multiple entries.
from swapi.
Sounds good. The affiliations that a person has defected from will have (formerly) afterwards.
The affiliations I am thinking of are these:
- Separatist State
- Jedi Order
- Galactic Republic
- Order of Sith Lords
- Galactic Empire
- New Republic
- Rebel Alliance
- First Order
- Resistance
- Hutt Clan
- Luke Skywalker's Jedi
What do you think?
from swapi.
Looks like a solid list! My only question with that is, how do we determine what affiliation is "current"? For example, a character from SWRebels could have one "current" affiliation in the show (and have an arc that hasn't resolved), but then could hypothetically show up in a future movie with another "current" affiliation. When you think about it, everything in SW happened "a long, long time ago", so it might be cleaner not to list any as formerly.
To me the solution depends on how in depth we want to get. The simple solution would be to just list all affiliations without indicating "formerly" or anything like that. A more complicated solution would be something along the lines of giving each affiliation a rough year range for when they held that affiliation, or associating their affiliation with major events (for example, Anakin could be listed as being affiliated with the Jedi order up through the clone wars).
Not sure what the best solution is, just some thoughts.
from swapi.
I think you are right. I was thinking of giving Han Solo an affiliation with Hutt Clan, then saying formerly. But I think that it might be clearer just to leave it off. I think that the complicated solution will be too complicated, I am willing to put the basic affiliations in and if someone wants to do that then they are welcome.
One question, how do I update models.py to show that Affiliations is an array. For instance, name is a string and it is written like this: name = models.CharField(max_length=100)
I am not sure how to do this.
from swapi.
Yeah I agree, going the simple route is probably best. As far as your question with models.py, I can't help ya there. Hopefully someone else chimes in.
from swapi.
@jhdoak Use the date 0 ABY (After the Battle of Yavin, or the episode 4) for the "currentness".
@euanwho You want to make a relationship between a character and a new model called affiliation. The character should have a foreign key to affiliation (because an affiliation can have many characters, but a character can only have one affiliation) See the Django documentation: https://docs.djangoproject.com/en/1.10/ref/models/fields/#foreignkey
from swapi.
Related Issues (20)
- Search with names. HOT 2
- Add a midi-chlorian count for the Force users
- Height of R2-D2 HOT 3
- Limit results number per page
- Films id does not match url id HOT 1
- SwapiSwift framework
- Does not provide all star wars films HOT 1
- The API is down HOT 1
- The Website is Down HOT 1
- Forked my own verson of SWAPI HOT 7
- swapi.dev - running service HOT 21
- swapi.py4e.com asking for donations?
- SSL Cert
- Swapi
- No heading "https"
- website has gone down in last 12 hours.
- The Website is down again
- Certification expired HOT 3
- No image for api resources
- All schemas return 404 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swapi.