Code Monkey home page Code Monkey logo

django-classified's Introduction

Hi there ๐Ÿ‘‹

django-classified's People

Contributors

4bimcad avatar damascene avatar inoks avatar miratcan avatar rooterkyberian avatar slyapustin avatar teolemon avatar typonaut 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-classified's Issues

Where modify search form / post ad form

Hello,
i'm beginner in python and i have searched how to modify search form and post form for change the style but nothing...
Apparently these two forms were written in python.
If you can give me help pls, thx.
If possible i want edit the html code in link with these forms.

instal problems

Hi,

after installation requirements, I have two issues.

RuntimeError: Model class django.contrib.sites.models.Site doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

I changed in the source two lines in django_classified\urls.py


# -*- coding:utf-8 -*-
from django.conf.urls import url
from django.contrib.auth.views import LogoutView
from django.contrib.sitemaps.views import sitemap as sitemap_view
from django.views.decorators.cache import cache_page, never_cache

**from . import views, sitemap#, feeds**

app_name = 'django_classified'

urlpatterns = [
    url(r'^$', views.SectionListView.as_view(), name='index'),
    url(r'^new/$', never_cache(views.ItemCreateView.as_view()), name='item-new'),
    url(r'^edit/(?P<pk>\d+)/$', never_cache(views.ItemUpdateView.as_view()), name='item-edit'),
    url(r'^(?P<pk>\d+)-(?P<slug>[-\w]+)/$', views.ItemDetailView.as_view(), name='item'),
    url(r'^group/(?P<pk>\d+)-(?P<slug>[-\w]+)/$', views.GroupDetail.as_view(), name='group'),
    url(r'^search/', views.SearchView.as_view(), name='search'),
    url(r'^robots\.txt$', cache_page(60 * 60)(views.RobotsView.as_view()), name='robots'),
    url(r'^sitemap\.xml$', sitemap_view, {'sitemaps': sitemap.sitemaps_dict}, name='sitemap'),
    **#url(r'^rss\.xml$', cache_page(60 * 15)(feeds.LatestItemFeed()), name='rss'),**
    url(r'^user/$', views.MyItemsView.as_view(), name='user-items'),
    url(r'^user/profile/$', views.ProfileView.as_view(), name='profile'),
    url(r'^user/my/delete/(?P<pk>\d+)/$', views.ItemDeleteView.as_view(), name='my-delete'),
    url(r'^user/logout/$', LogoutView.as_view(), name='logout'),
    url(r'^user/set-area/$', views.SetAreaView.as_view(), name='set-area'),
]

After this running via console is possible: python manage.py runserver

But when Iclick on login button Top-Right, I get this error

Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/accounts/login/?next=/user/profile/

Maybe you can prvide me help?

Where is the "INSTALLED_APPS"

INSTALLED_APPS = (
...
'django.contrib.sites', # This is required by Django Classified

'bootstrapform',  # This is required by Django Classified
'sorl.thumbnail',  # This is required by Django Classified

'django_classified',

)

Where exactly needs to input those entries above?

App changes native item title in URL to latin

I've created an item with name "ุจูŠุช ู„ู„ุฃุฌุงุฑ" which means "houses for rent", my website shows the url for the item "1-byt-lljr" which seems to be a transliteration of the "ุจูŠุช ู„ู„ุฃุฌุงุฑ".

I wonder if I can disable this conversion and just use the original title.

It's not only not in the original language but transliteration vary a lot from original sound of the word.

Por DOCs

I am using this project, I need to know how to use this with Django 2 and Python 3.7?

Problems with social_auth in demo project

social_auth, as configured in the demo project, appears to have a huge security hole in it.

Once you have verified a new user with a URL link (user verified via email address, not social media), anyone using the email address of that user can log-in to their account using any password.

I've checked this a number of times using different browsers (to ensure it wasn't a cookie issue) and deleting the project database and setting-up from scratch.

Make DCF translatable

Can you start adding translations tags to DCF so that at some point it can be used in different languages ?

Livereload 404 Error

I'm getting these errors in my logs, I've tried to install the package from pip and also the django server package and added it to installed app and middle-ware but that didn't fix it.

[19/Dec/2022 09:22:49] "GET /livereload/128067681/128068068 HTTP/1.1" 404 179
[19/Dec/2022 09:22:52] "GET /livereload/128067681/128068068 HTTP/1.1" 404 179
[19/Dec/2022 09:22:55] "GET /livereload/128067681/128068068 HTTP/1.1" 404 179
[19/Dec/2022 09:22:58] "GET /livereload/128067681/128068068 HTTP/1.1" 404 179

How can I solve it?

URLs in item description field are unclickable text

When I post a URL in my item description field it just appear as an unclickable text. Would be useful to have them as clickable links, maybe with non indexing flag?

Possibly make this as an option in the Admin page

German Translation

Hi!
I would like to contribute to the german translation, can you please accept my request on transifex?
Thanks,
Damian

Having big challenges to start using this project

Hi there,

Actually I am having big challenges to start using this project. I have a few questions:

  • Should I use heroku ?
  • how can I start the django-classified?
  • should I configure something else before start using django-classified? For example, some postgre databse, configure some key?

Thank you a lot... @inoks

Update veersion for distribution

Can you update the version number and make available for distribution (ie pip), to reflect the changes in admin interface. Thanks

Initial installation

I have a few queries on initial installation.
The first one is that I get this error on "runserver"

?: (urls.E004) Your URL pattern (<module 'django_classified.urls' from '/Users/โ€ฆ/Documents/django/domosia2/mysite/django_classified/urls.py'>, 'django_classified', 'django_classified') is invalid. Ensure that urlpatterns is a list of path() and/or re_path() instances. HINT: Try using path() instead of a tuple.

I'd inserted this into /urls.py:
include('django_classified.urls', namespace='django_classified')

But changed to this, which seemed to solve the issue:
path('django_classified/', include('django_classified.urls', namespace='django_classified'))

After this I can "runserver" and see the initial view of classifieds at "/django_classified". However I see no listing of section names.

If I then click on "Add new" I seem to get the same error as noted in #29:

Page not found: (404)
Request Method: | GET
http://127.0.0.1:8000/accounts/login/?next=/django_classified/new/

However, I have checked the INSTALLED_APPS and "django.contrib.sites" is listed.

Here's a list of pip installed packages:

asgiref==3.2.3
Babel==2.8.0
certifi==2019.9.11
Django==2.2.9
django-bootstrap-form==3.4
django-classified==0.8.12
django-filter==2.2.0
Pillow==7.0.0
pytz==2019.3
sorl-thumbnail==12.5.0
sqlparse==0.3.0
Unidecode==1.1.1

Any help appreciated.

Deactivate outdated items

Old items needs to be removed (deactivated).

  • Items should be deactivated after DCF_ITEM_MAX_AGE_DAYS.
  • Couple days prior to deactivation date user should be notified about upcoming item deactivation.

Add item to Favorites

It will be nice if someone implement feature, which allow users to add some Items to favorites list.
So it will be easy for users to go back to some items later.

Please send me PR.

image upload fails

When attempting to upload an image I get an extensive error/debug message.

add a demo page

hi, I am interested in checking out this project, but the readme didn't have any links to any demo pages. This discouraged me from checking it out.

Just thought I'd mention it, incase the maintainers would like to add a demo app to the readme so people can check it out without running it locally.

NameError: name 'patterns' is not defined

If I just add

urlpatterns = patterns(
    url(r'', include('django_classified.urls', namespace='django_classified'),
)

to uls.py - as described in Installation - I get this error:

 )
     ^
SyntaxError: unexpected EOF while parsing

If I add an additional bracket at the end...

urlpatterns = patterns(
    url(r'', include('django_classified.urls', namespace='django_classified'),
))

I get:

urlpatterns = patterns(
NameError: name 'patterns' is not defined

Drop Python2 support

Python 2.7 reached the end of the support this year.
No needs to keep compatibility.

Ideas

Hi all, I want to congratulate you all for this awesome app.
It would be great if the following features can be implemented:

  • User profile

  • Ability to follow a user

  • Pay for promoting an ad (SMS, PayPal), example: promote ad, featured ad ...

  • Rating system for ads and for users

  • Groups like Facebook groups.

  • Admin role system (moderator, editor)

  • Ban IPs, ranges or email address

  • Blacklist of bad words

  • Searchable custom fields for ads

  • Custom fields for ads, per example for jobs. the ability for a user to attach a cab in the message for poster/ seller

  • Ability to call and message seller (phone no field and send message field on the ad page)

Missing installation instructions

Seems like some instructions are missing from instructions and I had to try to figure it out, here is my settings file. it should work but login wouldn't work as the software doesn't have a login page. I login to /admin/ for testing.

from pathlib import Path

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-)wo8l*m1cld6dnr7q#c4no3b1)wy&9dh5z&zgg&^=nc2bhog@3'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []

SITE_ID = 1

# Application definition

INSTALLED_APPS = [
    # Default Django 4 applications
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.messages',
    'django.contrib.sessions',
    'django.contrib.staticfiles',

     # Not installed by django
    'django.contrib.sites',
    'django.contrib.humanize',
    'django.contrib.sitemaps',

     # External applications required by Django Classified
    'bootstrapform',
    'sorl.thumbnail',

    # Django Classified
    'django_classified',
]

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'myproject.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
               # Added for django-classified
                'django_classified.context_processors.common_values',
            ],
        },
    },
]


WSGI_APPLICATION = 'myproject.wsgi.application'


# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',
    }
}


# Password validation
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
    },
]


# Internationalization
# https://docs.djangoproject.com/en/4.0/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.0/howto/static-files/

STATIC_URL = 'static/'

# Default primary key field type
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

Here is my urls.py, url is replaced with path or re_path and they should be imported from django.urls:

from django.contrib import admin
from django.urls import path, include

urlpatterns = [
    path(r'', include('django_classified.urls', namespace='django_classified')),
    path('admin/', admin.site.urls),
]

Unhandled Exception when user Cancel Facebook registration

line 68, in auth_complete
self.process_error(self.data)
File "/var/django/dcf/dcf/ENV/local/lib/python2.7/site-packages/social/backends/facebook.py", line 63, in process_error
data.get('error_code'))
AuthCanceled: Authentication process canceled

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.