Skip to content

Commit

Permalink
Merge pull request #78 from afkiwers/fixed_issue_django_4
Browse files Browse the repository at this point in the history
Fixed URL import issue for Django 4
  • Loading branch information
afkiwers authored Feb 8, 2024
2 parents 8a4bacf + a374466 commit b191ae2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,19 @@ The plugin allows you to set default values when the child part lacks specific d

![image](/images/admin_add_category.png)

#### Using Footprint Parameter Mappings
#### Utilizing Footprint Parameter Mapping

If you already have Footprint/Package Type parameters on your parts and
don't want to specify a separate KiCad Footprint Parameter for them, you
can use the Footprint Parameter Mapping functionality to map from it to
KiCad Footprint names. Simply add the desired mappings to the KiCad
Category:
If you have existing Footprint/Package Type parameters assigned to your components and prefer not to define a separate KiCad Footprint Parameter for them, you can leverage the Footprint Parameter Mapping functionality to establish a connection to KiCad Footprint names. Simply incorporate the desired mappings into the KiCad category:

![image](/images/admin_footprint_mappings.png)

You can also use this in combination with the per category "Footprint
Parameter Template" override to use a different Parameter to map from.
Additionally, you can combine this with the per-category "Footprint Parameter Template" override to utilize a different parameter for mapping purposes.

![image](/images/admin_footprint_parameter_override.png)

## Creating User Access Tokens

Head back to the admin backend and click on Tokens. Click on "ADD Token" to generate a token dedicated to a particular user. It is important to emphasize that it is highly advisable to create individual tokens for each user, rather than employing a single token for everyone.
Return to the administrative backend, navigate to the USER model, and access API Tokens. Select "ADD API Token" to generate a token designated for a specific user. It's crucial to highlight the importance of creating separate tokens for each user, rather than using a universal token for everyone.

![image](/images/admin_tokens.png)

Expand Down
5 changes: 2 additions & 3 deletions inventree_kicad/KiCadLibraryPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

from django.core.validators import URLValidator

from django.conf.urls import url
from django.http import JsonResponse
from django.template.loader import render_to_string
from django.urls import include, re_path
Expand Down Expand Up @@ -168,8 +167,8 @@ def setup_urls(self):
re_path('^.*$', viewsets.Index.as_view(), name='kicad-index'),
])),

url(r'upload(?:\.(?P<format>json))?$', self.import_meta_data, name='meta_data_upload'),
url(r'progress_bar_status', self.get_import_progress, name='get_import_progress'),
re_path(r'upload(?:\.(?P<format>json))?$', self.import_meta_data, name='meta_data_upload'),
re_path(r'progress_bar_status', self.get_import_progress, name='get_import_progress'),

# Anything else, redirect to our top-level v1 page
re_path('^.*$', viewsets.Index.as_view(), name='kicad-index'),
Expand Down
2 changes: 1 addition & 1 deletion inventree_kicad/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
KICAD_PLUGIN_VERSION = "1.3.14"
KICAD_PLUGIN_VERSION = "1.3.15"

0 comments on commit b191ae2

Please sign in to comment.