MAKENTNU/web

View on GitHub
src/news/urls.py

Summary

Maintainability
C
1 day
Test Coverage

Similar blocks of code found in 2 locations. Consider refactoring.
Open

event_adminpatterns = [
    path("", event_views.AdminEventListView.as_view(), name='admin_event_list'),
    path("add/", event_views.EventCreateView.as_view(), name='event_create'),
    path("<int:pk>/", include(specific_event_adminpatterns)),
    path("participants/search/", event_views.AdminEventParticipantsSearchView.as_view(), name='admin_event_participants_search'),
Severity: Major
Found in src/news/urls.py and 1 other location - About 3 hrs to fix
src/make_queue/urls.py on lines 103..107

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 64.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

article_adminpatterns = [
    path("", article_views.AdminArticleListView.as_view(), name='admin_article_list'),
    path("add/", article_views.ArticleCreateView.as_view(), name='article_create'),
    path("<int:pk>/", include(specific_article_adminpatterns)),
Severity: Major
Found in src/news/urls.py and 4 other locations - About 1 hr to fix
src/announcements/urls.py on lines 16..19
src/faq/urls.py on lines 16..19
src/faq/urls.py on lines 26..29
src/makerspace/urls.py on lines 24..27

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

specific_ticket_urlpatterns = [
    path("", event_views.EventTicketDetailView.as_view(), name='event_ticket_detail'),
    path("cancel/", login_required(event_views.EventTicketCancelView.as_view()), name='event_ticket_cancel'),
Severity: Major
Found in src/news/urls.py and 1 other location - About 1 hr to fix
src/make_queue/urls.py on lines 17..19

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 42.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 17 locations. Consider refactoring.
Open

specific_article_adminpatterns = [
    path("change/", article_views.ArticleUpdateView.as_view(), name='article_update'),
    path("delete/", article_views.ArticleDeleteView.as_view(), name='article_delete'),
Severity: Major
Found in src/news/urls.py and 16 other locations - About 1 hr to fix
src/announcements/urls.py on lines 11..13
src/faq/urls.py on lines 12..14
src/faq/urls.py on lines 22..24
src/groups/urls.py on lines 6..8
src/groups/urls.py on lines 13..15
src/make_queue/urls.py on lines 12..14
src/make_queue/urls.py on lines 47..49
src/make_queue/urls.py on lines 52..54
src/make_queue/urls.py on lines 65..67
src/make_queue/urls.py on lines 78..80
src/make_queue/urls.py on lines 87..89
src/make_queue/urls.py on lines 99..101
src/makerspace/urls.py on lines 7..9
src/makerspace/urls.py on lines 20..22
src/news/urls.py on lines 9..11
src/news/urls.py on lines 93..95

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 38.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 17 locations. Consider refactoring.
Open

article_urlpatterns = [
    path("", article_views.ArticleListView.as_view(), name='article_list'),
    path("<int:pk>/", article_views.ArticleDetailView.as_view(), name='article_detail'),
Severity: Major
Found in src/news/urls.py and 16 other locations - About 1 hr to fix
src/announcements/urls.py on lines 11..13
src/faq/urls.py on lines 12..14
src/faq/urls.py on lines 22..24
src/groups/urls.py on lines 6..8
src/groups/urls.py on lines 13..15
src/make_queue/urls.py on lines 12..14
src/make_queue/urls.py on lines 47..49
src/make_queue/urls.py on lines 52..54
src/make_queue/urls.py on lines 65..67
src/make_queue/urls.py on lines 78..80
src/make_queue/urls.py on lines 87..89
src/make_queue/urls.py on lines 99..101
src/makerspace/urls.py on lines 7..9
src/makerspace/urls.py on lines 20..22
src/news/urls.py on lines 48..50
src/news/urls.py on lines 93..95

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 38.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 17 locations. Consider refactoring.
Open

specific_event_adminapipatterns = [
    path("toggle/", api_views.AdminAPIEventToggleView.as_view(), name='admin_api_event_toggle'),
    path("timeplaces/<int:time_place_pk>/toggle/", api_views.AdminAPITimePlaceToggleView.as_view(), name='admin_api_time_place_toggle'),
Severity: Major
Found in src/news/urls.py and 16 other locations - About 1 hr to fix
src/announcements/urls.py on lines 11..13
src/faq/urls.py on lines 12..14
src/faq/urls.py on lines 22..24
src/groups/urls.py on lines 6..8
src/groups/urls.py on lines 13..15
src/make_queue/urls.py on lines 12..14
src/make_queue/urls.py on lines 47..49
src/make_queue/urls.py on lines 52..54
src/make_queue/urls.py on lines 65..67
src/make_queue/urls.py on lines 78..80
src/make_queue/urls.py on lines 87..89
src/make_queue/urls.py on lines 99..101
src/makerspace/urls.py on lines 7..9
src/makerspace/urls.py on lines 20..22
src/news/urls.py on lines 9..11
src/news/urls.py on lines 48..50

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 38.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

urlpatterns = [
    path("articles/", include(article_urlpatterns)),
    path("events/", include(event_urlpatterns)),
    path("tickets/", include(ticket_urlpatterns)),
Severity: Minor
Found in src/news/urls.py and 1 other location - About 50 mins to fix
src/make_queue/urls.py on lines 35..38

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 36.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

event_urlpatterns = [
    path("", event_views.EventListView.as_view(), name='event_list'),
    path("<int:pk>/", include(specific_event_urlpatterns)),
Severity: Major
Found in src/news/urls.py and 4 other locations - About 30 mins to fix
src/make_queue/urls.py on lines 21..23
src/make_queue/urls.py on lines 69..71
src/make_queue/urls.py on lines 82..84
src/news/urls.py on lines 64..66

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

ticket_urlpatterns = [
    path("<uuid:pk>/", include(specific_ticket_urlpatterns)),
    path("me/", event_views.EventTicketMyListView.as_view(), name='event_ticket_my_list'),
Severity: Minor
Found in src/news/urls.py and 1 other location - About 30 mins to fix
src/make_queue/urls.py on lines 73..75

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

time_place_adminpatterns = [
    path("add/", event_views.TimePlaceCreateView.as_view(), name='time_place_create'),
    path("<int:time_place_pk>/", include(specific_time_place_adminpatterns)),
Severity: Major
Found in src/news/urls.py and 4 other locations - About 30 mins to fix
src/make_queue/urls.py on lines 21..23
src/make_queue/urls.py on lines 69..71
src/make_queue/urls.py on lines 82..84
src/news/urls.py on lines 26..28

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 32.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

There are no issues that match your filters.

Category
Status