Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin composite primary key (zip argument #2 must support iteration) #127

Open
iddqd1 opened this issue Feb 21, 2019 · 0 comments
Open

admin composite primary key (zip argument #2 must support iteration) #127

iddqd1 opened this issue Feb 21, 2019 · 0 comments

Comments

@iddqd1
Copy link

iddqd1 commented Feb 21, 2019

class Data(DjangoCassandraModel):
    stream_name = columns.Text(primary_key=True, partition_key=True, max_length=10)
    date = columns.Date(primary_key=True,  partition_key=True)
    id = columns.UUID(primary_key=True, default=uuid.uuid4)
    created = columns.DateTime(primary_key=True)
    stream_type = columns.Text(max_length=10, required=True)
    text = columns.Text(required=True)

    class Meta:
        get_pk_field = 'id'

# admin

from django.contrib import admin

from .models import Data


@admin.register(Data)
class DataAdmin(admin.ModelAdmin):
    list_display = ['id', 'stream_name', 'date', 'created']
    # list_filter = ['date', 'stream_type']
    search_fields = ['text']



django_cassandra_engine/models/init.py", line 351, in
zip(partition_keys.keys(), val))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant