These are chat archives for django/django

Apr 2016
karim amer
Apr 30 2016 00:10 UTC
i can’t figure out how to resolve this error
Got AttributeError when attempting to get a value for field `trailertype_set` on serializer `TruckSerializer`.
The serializer field might be named incorrectly and not match any attribute or key on the `Truck` instance.
Original exception text was: 'Truck' object has no attribute 'trailertype_set'.
karim amer
Apr 30 2016 00:16 UTC
here is the code
class TruckSerializer(GeoFeatureModelSerializer):
    trailertype_set = load_choice_serializer(many=True)

    class Meta:
        model = Truck
        geo_field = "origin"
        geo_field = "destination"
        fields = ('destination', 'origin','city', 'state', ‘trailertype_set’)

    def create(self, validated_data):
      trailertype_data = validated_data.pop('trailertype_set')
      truck = Truck.objects.create(**validated_data)
      for item in trailertype_data:
        Truck.objects.create(truck =truck , **trailertype_data)
      return truck
Alain Abrahan Paz
Apr 30 2016 05:52 UTC
your traylertype_set is using wrong quotes I beleive
in fields
fields =
karim amer
Apr 30 2016 06:14 UTC
that was a typo in the example sorry
Apr 30 2016 08:13 UTC
Who knows the completed list types of Fakers of factoryboy in django?
Anagha Todalbagi
Apr 30 2016 08:57 UTC
@natsn - Have you tried the collectstatic command?
Hello all,
My mentee and I followed the DjangoGirls tutorial and we're ready with the Django blog on the local setup. We have pushed this code onto The local SQLite3 database has been populated with the blog posts we want to publish on the web, however, we are having difficulty in accessing the SQLite3 database on bash console. We have a blog_data.dmp db dump file that we want to unpack on Has anybody experimented with this before? Any pointers on how to proceed to access SQLite3 db on will help us complete our goal of publishing the blog on the internet :D Will wait to hear from you guys, thank you :D
Mauro Oviedo
Apr 30 2016 14:30 UTC
@AnaghaTodalbagi_twitter I’m not sure where pythonanywhere places teh location of the sqlite file but it u find it, should be based on your Database config, just use the sqlite3 my_database_file.db command
Apr 30 2016 21:03 UTC
arg, nested relations are so much easier in rails :|