Code Monkey home page Code Monkey logo

django-gsheets's People

Contributors

pollitux avatar sheiun avatar steinbachr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

django-gsheets's Issues

Optimize writeout of GUID on pull

Currently, upon creation of a new model instance during a sheet pull session we write out a single individual cell containing that model's GUID.

Desired:
Cache a list of instances that have been created and their GUID's (along with associated rows) and write out this list in batch(es).

python manage.py syncgsheets ValueError: 'Django GUID' is not in list

Hi. I am using ngrok and testing it in dev mode and when syncgsheet I ran across this problem:

ValueError: 'Django GUID' is not in list

self.upsert_sheet_data(**push_data)
existing_row_ix = self.existing_row(**data)
sheet_id_ix = self.column_index(self.sheet_id_field)

return self.sheet_headers.index(field_name)

ValueError: 'Django GUID' is not in list

Library is giving error

I am getting the issue , when Try model_name.sync_sheet(), it can detect the model but I get an error saying it hasn't provided a API key and when i run Python manage.py syncgsheets it says found
0 syncable models
Successfully finished sync

Sync will create duplicate

The current management command does both sync pull and push, this could create duplicates when the row deleted from the admin panel, then run the sync command.

How to reproduce

  1. Delete one/or all row from specific models via admin panel
  2. Run sync management command
  3. All data will be duplicated

My proposal was to be able to give the management command optional argument to run only pull or only push action. Can I make PR for this?

Sheet Parameters Issue

First, I love your project, So thank you a ton!
I also found a small issue which is when I assign the "sheet_name" variable with any value, or even use the default one.
the googleapi return " unable to parse issue".
I found a quick fix which is to assign the variable with an empty string ''

Is it possible to define from which row you want to start reading/syncing data?

Firstly, thank you for the awesome package 😎.
Right now, when pulling data from a Google sheet, it always starts from the first row; Is it possible to specify which row it should start pulling data from (Ability to specify from which rows I want to keep the sheet in sync)?

I have seen using data_range but I have a situation where A1 is the only row that contains field names that match model fields.
Is it possible to define something like data_range = 'A7:Z' where A7 is just a row that has data?

Use custom sheet_id raise `Model.DoesNotExist`

When I was pull sheet to use my own id that is already stored in google sheets

Traceback

Traceback (most recent call last):
  File "gsheets/gsheets.py", line 351, in upsert_model_data
    instance, created = self.model_cls.objects.get(**model_filter), False
  File "django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "django/db/models/query.py", line 429, in get
    raise self.model.DoesNotExist(
member.models.Model.DoesNotExist: Model matching query does not exist.

2 ways sync issue: my change is not push to google sheet

Use case:

  • data are filled first in the google sheet
  • I synchronized the data thanks to django-ghseets into a local database
  • I edit some row
  • I synchronized to push my change to google sheets
  • I get my row update from google sheets and I lost my change (and my change is not in the google sheet).

Is it possible to push my changes to the google sheet with a signals?

relation "gsheets_accesscredentials" does not exist?

ProgrammingError at /gsheets/auth-success/
relation "gsheets_accesscredentials" does not exist
LINE 1: ..., "gsheets_accesscredentials"."created_time" FROM "gsheets_a...

hi! I visited /gsheets/authorize and
the login form and etc showed up well and after that scope problem arose but I applied the solution
in this board and it's gone but now the above error turned up.
What should I do? thanks for your great package!

Suggestion: push a specific row only

Would it be of use if the library was able to push changes that happened only in specific rows?
I am encountering this, as I am using celery and there are multiple rows that are being updated and processed in parallel. Each updating the sheet, so for some time the sheet might have false information.
I believe enabling this will enhance the synchronization capabilities of the library.

Suggestion: Delete specific rows from the sheet with specific IDs

One of the issues is that in a lot of use cases, it would be tremendously useful to be able to delete rows from the sheet based on only the ID. I am still a bit new to the whole google sheet API thing. So I will research a bit and try to come up with a solution. So if anyone could help with that, it would be awesome :"D

Handle Write requests per user per 100 seconds quota

error details:

"Quota exceeded for quota group 'WriteGroup' and limit 'Write requests per user per 100 seconds' of service 'sheets.googleapis.com' for consumer 'project_number:XXXX'.". Details: "[{'@type': 'type.googleapis.com/google.rpc.Help', 'links': [{'description': 'Google developer console API key', 'url': 'https://console.developers.google.com/project/671191814931/apiui/credential'}]}]"

Desired:
Use a back-off to retry

TypeError: Object of type 'datetime' is not JSON serializable

Let me lead by saying this is an amazing plugin, thank you for putting in the time to make it functional.

As I set it up, I noticed that only string values seem to be pushing successfully - this is with mixins.SheetPushableMixin and I tried both a DecimalField and DateTimeField. Is there a plan to make additional field types compatible?

ValidationError on BooleanField

When I pull TRUE or FALSE value from sheet it shows:

Exception has occurred: ValidationError
['“FALSE” value must be either True or False.']

But when I type True in sheet, it cast into all uppercase.

Scope has changed from "https://www.googleapis.com/auth/spreadsheets"

@steinbachr

Warning at /gsheets/auth-success/
Scope has changed from "https://www.googleapis.com/auth/spreadsheets" to "https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/userinfo.profile openid https://www.googleapis.com/auth/userinfo.email".

Steps to recreate

  1. From local env
  2. using ngrok
  3. ngrok call back added to google auth
  4. navigate to https://####.ngrok.io/gsheets/authorize/
  5. redirected to https://accounts.google.com/o/oauth2/auth/####
  6. "Sign in with Google" choose you account
  7. Select allow "####.ngrok.io wants to access your Google Account"
  8. Up pops the error

Any help or clues would be most welcome.

cheers

auth/success timeout

Everything is working normal on my dev environement with ngrok but when its deployed to aws using public free dns of aws the reequest is always timed out

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.