Skip to main content
django-parsesync
============

> Parse.com is a powerful cloud database with many services included. Its data browser is simple and not suited for everyday editing (yet).
> This lib is intended to alow the use of Django admin to manage your data and sync it to your Parse.com app. Notice that you will have a local database and your data will be synced. For faster use, this local data, stored in any database engine supported on Django and configured by you, will be queried from and saved to Parse.com when necessary.

Installation
------------

```sh
pip install django-parsesync
```

Defining your settings
----------------------

- There are 2 settings you must define in your Django settings:
- PARSE_APPLICATION_ID
- PARSE_REST_API_KEY
- You can also provide your master key to realize operations such as creating a new Parse.com class or list your app schemas:
- PARSE_MASTER_API_KEY

Saving your model instance to Parse.com
---------------------------------------

- To sync your model you should make it a subclass of ParseModel (that subclasses Django model)
- As soon as you do that, your model will have 3 new read-only fields: objectId, createdAt and updatedAt.
- Any time you save your model instance, it will be synced.

```python
from parsesync.models import ParseModel

class MyModel(ParseModel):
pass
```

Deleting your model instance to Parse.com
-----------------------------------------

- Deleting a model instance is not made by the model class itself and to extend it is not enough.
- Everytime a content is deleted, a signal is triggered and then the magic happens.
- To make sure the signal will be expected and noticed by our app you should import it to your INSTALLED_APPS on your settings.py:

```python
INSTALLED_APPS = (
...
'parsesync',
)
```

Using Django admin customizations
---------------------------------

- To make objectId, createdAt and updatedAt visible on your Django model change form and content list you should make your ModelAdmin a subclass of ParseAdmin. ObjectId will also be added as a searchable field on your admin.
- ParseAdmin.parse_list_display method allows you to add your list display fields right before Parse fields.

```python
from parsesync.admin import ParseAdmin

class ProductAdmin(ParseAdmin):
list_display = ParseAdmin.parse_list_display('__unicode__',)
```

Bringing data from Parse.com to your local database
---------------------------------------------------

- If you already have data on your Parse.com app or some of it was edited right from Parse.com Data Browser, you would want to bring it back to your Django admin by using the manage.py command parsetodjango.
- By default, the updated date for the last content is recorded and the next time the command is called, only new data is gathered. You can avoid this behavior by using the --all flag and everything will be started over.
- You may also want to grab data from an especific model by using the flag ---model followed by your model name. If your model is called FooBar, then foobar, Foobar, FOOBAR, foobaR are valid options, this parameter is case insensitive.

```
usage: manage.py parsetodjango [--model MODEL] [--all]

Sync data from parse to Django

optional arguments:
--model MODEL Sync only provided model name
--all Query content from the beggining of time
```

License
-------

MIT

Metadata

Release files for django-parsesync 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-parsesync 1.1.3
File Size Uploaded Provenance Actions
django-parsesync-1.1.3.tar.gz 9.7 kB Without provenance Details for django-parsesync-1.1.3.tar.gz

Release files / django-parsesync-1.1.3.tar.gz

Download URL django-parsesync-1.1.3.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a32b61d3083ca653666ccf62ba8291870ad9ffabfea9ad465907066347af678d
BLAKE2b-256 checksum
How to use checksums
e321e4df295ca3dc065800c0a4f84bdff4aa114ad181676d37e02c563a0382b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-parsesync 1.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page