Sibyx / django_api_forms

Declarative Django request validation for RESTful APIs

Home Page:https://sibyx.github.io/django_api_forms/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RRuleField

Sibyx opened this issue · comments

It will be nice to have RRuleField which will normalize from RRULE to dateutil.rrule object.

Field should be available only if dateutil is installed (it's not required dependency).

I am a novice programmer with regards, to Django Programming in Python. I would love to contribute to this Issue. Please Assign this Issue to Me.

Hi @iamhardikat11. Feel free to take the issue, implementation is quite simple. I have a few recommendations regarding to this issue:

Notes

You suppose to implement a new Field class (for example RRuleField) in the fields. Check the implementation of the existing ones to get familiar (all fields suppose to inherit from Field class). The purpose of the field is to consume an rrule string and return rrule object from dateutil library. Please note that dateutil is not suppose to be an mandatory dependency. Check how are extras implemented in the ImageField class.

TODO

  • Implement an RRuleField
  • Write new unit tests (do not change old ones)
  • Write docs
  • Change setup.py and pyproject.toml (for extras)

Sir, I have started working on the Issue and updated the Docs, can you help me know what exactly is a TOML File?

And what modifications do I have to Make in order to Complete this Issue?

Hello,

file pyproject.toml is file originaly specified in PEP518. Poetry and some other tools also use it to store it's configuration.

It looks like I made a little mistake in defining the TODO list. You don't have to change pyproject.toml (I thought I already specified extras in the pyproject,.toml). You just have to specify new extras in EXTRAS dictionary (let's say extras called rrule witch points to the dateutil dependency).

Feel free to create a PR, it simplifies the code-review process.

Hi @iamhardikat11,
how are you doing? Do you have any updates or thinks you need to help with?

Hi,
i did few changes as below however i need more information on receiving input string and returning object type and also special validations on string.
class RRuleField.docx

hi ,
can i start working on it?

Hey there!

I've created a pull request, let me know what changes could i make
#52