slyapustin / django-classified Goto Github PK
View Code? Open in Web Editor NEWDjango Classified
Home Page: https://github.com/slyapustin/django-classified-demo
License: MIT License
Django Classified
Home Page: https://github.com/slyapustin/django-classified-demo
License: MIT License
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.
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?
Search fails in django admin for Item model.
GET http://127.0.0.1:8000/admin/django_classified/item/?q=test
FieldError: Cannot resolve keyword 'body' into field. Choices are: area, area_id, description, group, group_id, id, image, is_active, posted, price, slug, title, updated, user, user_id
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?
'django.contrib.humanize' needs to be in the installed_apps list, this isn't mentioned in the "read me".
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.
I am using this project, I need to know how to use this with Django 2 and Python 3.7?
Please, refresh demo link of your project on Heroku. Thanks.
$ ./manage.py migrate
django.db.utils.ProgrammingError: (1146, "Table 'myproj.django_site' doesn't exist")
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.
Can you start adding translations tags to DCF so that at some point it can be used in different languages ?
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?
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
Hi, this project is amazing! I would love to see this project grow - how can I create new login methods like eMail and password?
The second image I uploaded was quite large (1.4 Mb). Uploading smaller pictures solves this issue. Is there a size limit somewhere? Would be great to automatically scale too large images down.
Hi!
I would like to contribute to the german translation, can you please accept my request on transifex?
Thanks,
Damian
I've tried doing it with groups but then I'd need to create the same section for each city multiple times - a cumbersome task.
I have changed default sorting of areas and groups from pk (none) to alphabetical. I am too new to github to know how to contribute.
Hello, a newbie here. Is it possible to switch back to default django authentication and how ?
Hi there,
Actually I am having big challenges to start using this project. I have a few questions:
Thank you a lot... @inoks
Can you update the version number and make available for distribution (ie pip), to reflect the changes in admin interface. Thanks
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.
When the item detail page is displayed, the _base.html url links are not active except the home button. Do you have any idea about this issue?
Old items needs to be removed (deactivated).
DCF_ITEM_MAX_AGE_DAYS
.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.
Currently app API is limited to only display items, it will be nice if user can access to full CRUD operations via RESTful API.
When attempting to upload an image I get an extensive error/debug message.
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.
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
Python 2.7 reached the end of the support this year.
No needs to keep compatibility.
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)
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),
]
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.